Custom counter for oddside and evenside margins











up vote
0
down vote

favorite
1












When using the twoside in the article class, resetting the page counter creates an issue in regards to the odd and even side margins. Is it possible to declare a custom counter that article considers the page counter for odd/even sides?



documentclass[twoside]{article}
usepackage{everypage}
usepackage{lipsum}
newcounter{technicalpage}
setcounter{technicalpage}{1}
AddEverypageHook{stepcounter{technicalpage}}
begin{document}
pagenumbering{roman}%
%On page 1 (even)
This is intro stuff and the page counter will reset further down. Technically page thetechnicalpage.parlipsum
pagenumbering{arabic}
Claims to be page thepage, but is technically page thetechnicalpagespace and should, internally, be treated as such.
% Should say page 1, as it is, but should be treated like even with regards to margins,
% because it's technically the second page. So I want't article to consider
% c@technicalpage as the counter for determining odd/even page.
end{document}


I found it really odd that I couldn't find any answers on this? Maybe I've searched for the wrong things?



Related: Odd/even page margins - an odd page has "even page margins", which does not in my opinion provide a sufficient answer at the time of writing.



Edit/remark: I am aware of the cleardoublepage and how it should be used before pagenumbering, as pagenumbering intends. However, I'd like to solve this matter in another way than skipping an extra page.










share|improve this question


























    up vote
    0
    down vote

    favorite
    1












    When using the twoside in the article class, resetting the page counter creates an issue in regards to the odd and even side margins. Is it possible to declare a custom counter that article considers the page counter for odd/even sides?



    documentclass[twoside]{article}
    usepackage{everypage}
    usepackage{lipsum}
    newcounter{technicalpage}
    setcounter{technicalpage}{1}
    AddEverypageHook{stepcounter{technicalpage}}
    begin{document}
    pagenumbering{roman}%
    %On page 1 (even)
    This is intro stuff and the page counter will reset further down. Technically page thetechnicalpage.parlipsum
    pagenumbering{arabic}
    Claims to be page thepage, but is technically page thetechnicalpagespace and should, internally, be treated as such.
    % Should say page 1, as it is, but should be treated like even with regards to margins,
    % because it's technically the second page. So I want't article to consider
    % c@technicalpage as the counter for determining odd/even page.
    end{document}


    I found it really odd that I couldn't find any answers on this? Maybe I've searched for the wrong things?



    Related: Odd/even page margins - an odd page has "even page margins", which does not in my opinion provide a sufficient answer at the time of writing.



    Edit/remark: I am aware of the cleardoublepage and how it should be used before pagenumbering, as pagenumbering intends. However, I'd like to solve this matter in another way than skipping an extra page.










    share|improve this question
























      up vote
      0
      down vote

      favorite
      1









      up vote
      0
      down vote

      favorite
      1






      1





      When using the twoside in the article class, resetting the page counter creates an issue in regards to the odd and even side margins. Is it possible to declare a custom counter that article considers the page counter for odd/even sides?



      documentclass[twoside]{article}
      usepackage{everypage}
      usepackage{lipsum}
      newcounter{technicalpage}
      setcounter{technicalpage}{1}
      AddEverypageHook{stepcounter{technicalpage}}
      begin{document}
      pagenumbering{roman}%
      %On page 1 (even)
      This is intro stuff and the page counter will reset further down. Technically page thetechnicalpage.parlipsum
      pagenumbering{arabic}
      Claims to be page thepage, but is technically page thetechnicalpagespace and should, internally, be treated as such.
      % Should say page 1, as it is, but should be treated like even with regards to margins,
      % because it's technically the second page. So I want't article to consider
      % c@technicalpage as the counter for determining odd/even page.
      end{document}


      I found it really odd that I couldn't find any answers on this? Maybe I've searched for the wrong things?



      Related: Odd/even page margins - an odd page has "even page margins", which does not in my opinion provide a sufficient answer at the time of writing.



      Edit/remark: I am aware of the cleardoublepage and how it should be used before pagenumbering, as pagenumbering intends. However, I'd like to solve this matter in another way than skipping an extra page.










      share|improve this question













      When using the twoside in the article class, resetting the page counter creates an issue in regards to the odd and even side margins. Is it possible to declare a custom counter that article considers the page counter for odd/even sides?



      documentclass[twoside]{article}
      usepackage{everypage}
      usepackage{lipsum}
      newcounter{technicalpage}
      setcounter{technicalpage}{1}
      AddEverypageHook{stepcounter{technicalpage}}
      begin{document}
      pagenumbering{roman}%
      %On page 1 (even)
      This is intro stuff and the page counter will reset further down. Technically page thetechnicalpage.parlipsum
      pagenumbering{arabic}
      Claims to be page thepage, but is technically page thetechnicalpagespace and should, internally, be treated as such.
      % Should say page 1, as it is, but should be treated like even with regards to margins,
      % because it's technically the second page. So I want't article to consider
      % c@technicalpage as the counter for determining odd/even page.
      end{document}


      I found it really odd that I couldn't find any answers on this? Maybe I've searched for the wrong things?



      Related: Odd/even page margins - an odd page has "even page margins", which does not in my opinion provide a sufficient answer at the time of writing.



      Edit/remark: I am aware of the cleardoublepage and how it should be used before pagenumbering, as pagenumbering intends. However, I'd like to solve this matter in another way than skipping an extra page.







      margins page-numbering counters double-sided






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 17 mins ago









      Andreas Storvik Strauman

      2,361418




      2,361418



























          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f464638%2fcustom-counter-for-oddside-and-evenside-margins%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f464638%2fcustom-counter-for-oddside-and-evenside-margins%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Accessing regular linux commands in Huawei's Dopra Linux

          Can't connect RFCOMM socket: Host is down

          Kernel panic - not syncing: Fatal Exception in Interrupt