How to set the new margin on the next page?












0















I have a large footer that needs to be placed on the first page of a document. To make it fit, I've used the geometry package and increased the bottom margin.



For the header/footer manipulation, I'm using fancyhdr. How do I use newgeometry{bottom=2cm} again on the 2nd page of the text, without using newpage and guessing where in the text the second page starts?



Can LaTex execute commands on next page? Something like



NextPageExecute{newgeometry{bottom=3cm}}



would solve the problem. Here is the MWE:



documentclass{article} 

usepackage{xcolor}
usepackage{lipsum}

usepackage[left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}

% Header customization, get the reference to the last page.
usepackage{fancyhdr, lastpage}
pagestyle{fancy}

% Header customization, get the reference to the last page.
usepackage{fancyhdr, lastpage}
% Fancy pagestyle for the rest of the document.
pagestyle{fancy}
lhead{My form 11/17}
rhead{Page thepage of pageref{LastPage}}
% Remove the horizontal line from the header.
renewcommand{headrulewidth}{0pt}
% Remove everything from the footline.
cfoot{}

definecolor{CUSTOM}{HTML}{00529e}

% Set the header and footer style.
fancypagestyle{empty}{%
fancyhf{}% Clear header/footer
lhead{My form 11/17}
rhead{Page thepage of pageref{LastPage}}
lfoot{
Something something. \
Memo text. \
Some address information. \
Telephone numbers. \
}
rfoot{
textcolor{CUSTOM}{Huge{HUGE TEXT}}
}
}


begin{document}

thispagestyle{empty}

lipsum

lipsum

lipsum

end{document}.


The first page looks like this:



enter image description here



And the second page has this unnecessarily large footer space:



enter image description here










share|improve this question



























    0















    I have a large footer that needs to be placed on the first page of a document. To make it fit, I've used the geometry package and increased the bottom margin.



    For the header/footer manipulation, I'm using fancyhdr. How do I use newgeometry{bottom=2cm} again on the 2nd page of the text, without using newpage and guessing where in the text the second page starts?



    Can LaTex execute commands on next page? Something like



    NextPageExecute{newgeometry{bottom=3cm}}



    would solve the problem. Here is the MWE:



    documentclass{article} 

    usepackage{xcolor}
    usepackage{lipsum}

    usepackage[left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}

    % Header customization, get the reference to the last page.
    usepackage{fancyhdr, lastpage}
    pagestyle{fancy}

    % Header customization, get the reference to the last page.
    usepackage{fancyhdr, lastpage}
    % Fancy pagestyle for the rest of the document.
    pagestyle{fancy}
    lhead{My form 11/17}
    rhead{Page thepage of pageref{LastPage}}
    % Remove the horizontal line from the header.
    renewcommand{headrulewidth}{0pt}
    % Remove everything from the footline.
    cfoot{}

    definecolor{CUSTOM}{HTML}{00529e}

    % Set the header and footer style.
    fancypagestyle{empty}{%
    fancyhf{}% Clear header/footer
    lhead{My form 11/17}
    rhead{Page thepage of pageref{LastPage}}
    lfoot{
    Something something. \
    Memo text. \
    Some address information. \
    Telephone numbers. \
    }
    rfoot{
    textcolor{CUSTOM}{Huge{HUGE TEXT}}
    }
    }


    begin{document}

    thispagestyle{empty}

    lipsum

    lipsum

    lipsum

    end{document}.


    The first page looks like this:



    enter image description here



    And the second page has this unnecessarily large footer space:



    enter image description here










    share|improve this question

























      0












      0








      0


      1






      I have a large footer that needs to be placed on the first page of a document. To make it fit, I've used the geometry package and increased the bottom margin.



      For the header/footer manipulation, I'm using fancyhdr. How do I use newgeometry{bottom=2cm} again on the 2nd page of the text, without using newpage and guessing where in the text the second page starts?



      Can LaTex execute commands on next page? Something like



      NextPageExecute{newgeometry{bottom=3cm}}



      would solve the problem. Here is the MWE:



      documentclass{article} 

      usepackage{xcolor}
      usepackage{lipsum}

      usepackage[left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}

      % Header customization, get the reference to the last page.
      usepackage{fancyhdr, lastpage}
      pagestyle{fancy}

      % Header customization, get the reference to the last page.
      usepackage{fancyhdr, lastpage}
      % Fancy pagestyle for the rest of the document.
      pagestyle{fancy}
      lhead{My form 11/17}
      rhead{Page thepage of pageref{LastPage}}
      % Remove the horizontal line from the header.
      renewcommand{headrulewidth}{0pt}
      % Remove everything from the footline.
      cfoot{}

      definecolor{CUSTOM}{HTML}{00529e}

      % Set the header and footer style.
      fancypagestyle{empty}{%
      fancyhf{}% Clear header/footer
      lhead{My form 11/17}
      rhead{Page thepage of pageref{LastPage}}
      lfoot{
      Something something. \
      Memo text. \
      Some address information. \
      Telephone numbers. \
      }
      rfoot{
      textcolor{CUSTOM}{Huge{HUGE TEXT}}
      }
      }


      begin{document}

      thispagestyle{empty}

      lipsum

      lipsum

      lipsum

      end{document}.


      The first page looks like this:



      enter image description here



      And the second page has this unnecessarily large footer space:



      enter image description here










      share|improve this question














      I have a large footer that needs to be placed on the first page of a document. To make it fit, I've used the geometry package and increased the bottom margin.



      For the header/footer manipulation, I'm using fancyhdr. How do I use newgeometry{bottom=2cm} again on the 2nd page of the text, without using newpage and guessing where in the text the second page starts?



      Can LaTex execute commands on next page? Something like



      NextPageExecute{newgeometry{bottom=3cm}}



      would solve the problem. Here is the MWE:



      documentclass{article} 

      usepackage{xcolor}
      usepackage{lipsum}

      usepackage[left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}

      % Header customization, get the reference to the last page.
      usepackage{fancyhdr, lastpage}
      pagestyle{fancy}

      % Header customization, get the reference to the last page.
      usepackage{fancyhdr, lastpage}
      % Fancy pagestyle for the rest of the document.
      pagestyle{fancy}
      lhead{My form 11/17}
      rhead{Page thepage of pageref{LastPage}}
      % Remove the horizontal line from the header.
      renewcommand{headrulewidth}{0pt}
      % Remove everything from the footline.
      cfoot{}

      definecolor{CUSTOM}{HTML}{00529e}

      % Set the header and footer style.
      fancypagestyle{empty}{%
      fancyhf{}% Clear header/footer
      lhead{My form 11/17}
      rhead{Page thepage of pageref{LastPage}}
      lfoot{
      Something something. \
      Memo text. \
      Some address information. \
      Telephone numbers. \
      }
      rfoot{
      textcolor{CUSTOM}{Huge{HUGE TEXT}}
      }
      }


      begin{document}

      thispagestyle{empty}

      lipsum

      lipsum

      lipsum

      end{document}.


      The first page looks like this:



      enter image description here



      And the second page has this unnecessarily large footer space:



      enter image description here







      header-footer fancyhdr geometry






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 18 at 13:47









      tmarictmaric

      4481416




      4481416






















          1 Answer
          1






          active

          oldest

          votes


















          1














          The afterpage package does exactly what you are looking for. Seen as you only want the 3cm bottom margin on the first page and (for example) 2cm elsewhere, I would recommend having the default layout with 2cm and using newgeometry on the first page only (followed by a restoregeometryclearpage in afterpage):



          documentclass{article} 

          usepackage{xcolor}
          usepackage{lipsum}
          usepackage{afterpage}

          usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}% 2cm bottom (usual)

          % Header customization, get the reference to the last page.
          usepackage{fancyhdr, lastpage}
          pagestyle{fancy}

          % Header customization, get the reference to the last page.
          usepackage{fancyhdr, lastpage}
          % Fancy pagestyle for the rest of the document.
          pagestyle{fancy}
          lhead{My form 11/17}
          rhead{Page thepage of pageref{LastPage}}
          % Remove the horizontal line from the header.
          renewcommand{headrulewidth}{0pt}
          % Remove everything from the footline.
          cfoot{}

          definecolor{CUSTOM}{HTML}{00529e}

          % Set the header and footer style.
          fancypagestyle{empty}{%
          fancyhf{}% Clear header/footer
          lhead{My form 11/17}
          rhead{Page thepage of pageref{LastPage}}
          lfoot{
          Something something. \
          Memo text. \
          Some address information. \
          Telephone numbers. \
          }
          rfoot{
          textcolor{CUSTOM}{Huge{HUGE TEXT}}
          }
          }

          begin{document}
          newgeometry{left=2cm,right=2cm,top=2cm,bottom=3cm} % Change to 3cm bottom (temp)
          thispagestyle{empty}
          afterpage{restoregeometryclearpage}
          % CONTENT HERE

          lipsum

          lipsum

          lipsum

          end{document}


          Page 1:



          page1



          Page 2:



          page2






          share|improve this answer























            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',
            autoActivateHeartbeat: false,
            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%2f475493%2fhow-to-set-the-new-margin-on-the-next-page%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            The afterpage package does exactly what you are looking for. Seen as you only want the 3cm bottom margin on the first page and (for example) 2cm elsewhere, I would recommend having the default layout with 2cm and using newgeometry on the first page only (followed by a restoregeometryclearpage in afterpage):



            documentclass{article} 

            usepackage{xcolor}
            usepackage{lipsum}
            usepackage{afterpage}

            usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}% 2cm bottom (usual)

            % Header customization, get the reference to the last page.
            usepackage{fancyhdr, lastpage}
            pagestyle{fancy}

            % Header customization, get the reference to the last page.
            usepackage{fancyhdr, lastpage}
            % Fancy pagestyle for the rest of the document.
            pagestyle{fancy}
            lhead{My form 11/17}
            rhead{Page thepage of pageref{LastPage}}
            % Remove the horizontal line from the header.
            renewcommand{headrulewidth}{0pt}
            % Remove everything from the footline.
            cfoot{}

            definecolor{CUSTOM}{HTML}{00529e}

            % Set the header and footer style.
            fancypagestyle{empty}{%
            fancyhf{}% Clear header/footer
            lhead{My form 11/17}
            rhead{Page thepage of pageref{LastPage}}
            lfoot{
            Something something. \
            Memo text. \
            Some address information. \
            Telephone numbers. \
            }
            rfoot{
            textcolor{CUSTOM}{Huge{HUGE TEXT}}
            }
            }

            begin{document}
            newgeometry{left=2cm,right=2cm,top=2cm,bottom=3cm} % Change to 3cm bottom (temp)
            thispagestyle{empty}
            afterpage{restoregeometryclearpage}
            % CONTENT HERE

            lipsum

            lipsum

            lipsum

            end{document}


            Page 1:



            page1



            Page 2:



            page2






            share|improve this answer




























              1














              The afterpage package does exactly what you are looking for. Seen as you only want the 3cm bottom margin on the first page and (for example) 2cm elsewhere, I would recommend having the default layout with 2cm and using newgeometry on the first page only (followed by a restoregeometryclearpage in afterpage):



              documentclass{article} 

              usepackage{xcolor}
              usepackage{lipsum}
              usepackage{afterpage}

              usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}% 2cm bottom (usual)

              % Header customization, get the reference to the last page.
              usepackage{fancyhdr, lastpage}
              pagestyle{fancy}

              % Header customization, get the reference to the last page.
              usepackage{fancyhdr, lastpage}
              % Fancy pagestyle for the rest of the document.
              pagestyle{fancy}
              lhead{My form 11/17}
              rhead{Page thepage of pageref{LastPage}}
              % Remove the horizontal line from the header.
              renewcommand{headrulewidth}{0pt}
              % Remove everything from the footline.
              cfoot{}

              definecolor{CUSTOM}{HTML}{00529e}

              % Set the header and footer style.
              fancypagestyle{empty}{%
              fancyhf{}% Clear header/footer
              lhead{My form 11/17}
              rhead{Page thepage of pageref{LastPage}}
              lfoot{
              Something something. \
              Memo text. \
              Some address information. \
              Telephone numbers. \
              }
              rfoot{
              textcolor{CUSTOM}{Huge{HUGE TEXT}}
              }
              }

              begin{document}
              newgeometry{left=2cm,right=2cm,top=2cm,bottom=3cm} % Change to 3cm bottom (temp)
              thispagestyle{empty}
              afterpage{restoregeometryclearpage}
              % CONTENT HERE

              lipsum

              lipsum

              lipsum

              end{document}


              Page 1:



              page1



              Page 2:



              page2






              share|improve this answer


























                1












                1








                1







                The afterpage package does exactly what you are looking for. Seen as you only want the 3cm bottom margin on the first page and (for example) 2cm elsewhere, I would recommend having the default layout with 2cm and using newgeometry on the first page only (followed by a restoregeometryclearpage in afterpage):



                documentclass{article} 

                usepackage{xcolor}
                usepackage{lipsum}
                usepackage{afterpage}

                usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}% 2cm bottom (usual)

                % Header customization, get the reference to the last page.
                usepackage{fancyhdr, lastpage}
                pagestyle{fancy}

                % Header customization, get the reference to the last page.
                usepackage{fancyhdr, lastpage}
                % Fancy pagestyle for the rest of the document.
                pagestyle{fancy}
                lhead{My form 11/17}
                rhead{Page thepage of pageref{LastPage}}
                % Remove the horizontal line from the header.
                renewcommand{headrulewidth}{0pt}
                % Remove everything from the footline.
                cfoot{}

                definecolor{CUSTOM}{HTML}{00529e}

                % Set the header and footer style.
                fancypagestyle{empty}{%
                fancyhf{}% Clear header/footer
                lhead{My form 11/17}
                rhead{Page thepage of pageref{LastPage}}
                lfoot{
                Something something. \
                Memo text. \
                Some address information. \
                Telephone numbers. \
                }
                rfoot{
                textcolor{CUSTOM}{Huge{HUGE TEXT}}
                }
                }

                begin{document}
                newgeometry{left=2cm,right=2cm,top=2cm,bottom=3cm} % Change to 3cm bottom (temp)
                thispagestyle{empty}
                afterpage{restoregeometryclearpage}
                % CONTENT HERE

                lipsum

                lipsum

                lipsum

                end{document}


                Page 1:



                page1



                Page 2:



                page2






                share|improve this answer













                The afterpage package does exactly what you are looking for. Seen as you only want the 3cm bottom margin on the first page and (for example) 2cm elsewhere, I would recommend having the default layout with 2cm and using newgeometry on the first page only (followed by a restoregeometryclearpage in afterpage):



                documentclass{article} 

                usepackage{xcolor}
                usepackage{lipsum}
                usepackage{afterpage}

                usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}% 2cm bottom (usual)

                % Header customization, get the reference to the last page.
                usepackage{fancyhdr, lastpage}
                pagestyle{fancy}

                % Header customization, get the reference to the last page.
                usepackage{fancyhdr, lastpage}
                % Fancy pagestyle for the rest of the document.
                pagestyle{fancy}
                lhead{My form 11/17}
                rhead{Page thepage of pageref{LastPage}}
                % Remove the horizontal line from the header.
                renewcommand{headrulewidth}{0pt}
                % Remove everything from the footline.
                cfoot{}

                definecolor{CUSTOM}{HTML}{00529e}

                % Set the header and footer style.
                fancypagestyle{empty}{%
                fancyhf{}% Clear header/footer
                lhead{My form 11/17}
                rhead{Page thepage of pageref{LastPage}}
                lfoot{
                Something something. \
                Memo text. \
                Some address information. \
                Telephone numbers. \
                }
                rfoot{
                textcolor{CUSTOM}{Huge{HUGE TEXT}}
                }
                }

                begin{document}
                newgeometry{left=2cm,right=2cm,top=2cm,bottom=3cm} % Change to 3cm bottom (temp)
                thispagestyle{empty}
                afterpage{restoregeometryclearpage}
                % CONTENT HERE

                lipsum

                lipsum

                lipsum

                end{document}


                Page 1:



                page1



                Page 2:



                page2







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 18 at 14:47









                Pippip19Pippip19

                1,4188




                1,4188






























                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f475493%2fhow-to-set-the-new-margin-on-the-next-page%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

                    Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                    ComboBox Display Member on multiple fields

                    Is it possible to collect Nectar points via Trainline?