Margin spacing of footer for landscape page











up vote
2
down vote

favorite












I put a lot of time into figuring out how to have the page numbers on the long side of my landscape pages as per my school's formatting requirements (yes I'm sure) but now the numbers are apparently slightly too high. I need to make it 0.5 inch from the bottom of the page and centered in order to get my PhD. (I'm not bitter...)



Current code:



usepackage{pdflscape}
usepackage{fancyhdr}
usepackage{floatpag}
....


fancypagestyle{floatpage}{%
fancyhf{}% Clear page header/footer
fancyfoot{
makebox[textwidth][r]{% Right
rlap{hspace{footskip}% Push out of margin by footskip
smash{% Remove vertical height
raisebox{dimexpr.7baselineskip+footskip+.5textheight}{% Raise vertically
rotatebox{90}{thepage}}}}}}% Rotate counter-clockwise
renewcommand{headrulewidth}{0pt}% No header rule
renewcommand{footrulewidth}{0pt}% No footer rule
}


And then for the figure:



 begin{landscape}
begin{figure}
centeringthisfloatpagestyle{floatpage}%
begin{subfigure}{.6textwidth}
centering
includegraphics[width=linewidth]{chapters/ProgrammedCellDeath/lyse_benefit.pdf}
caption{Science}label{helping}
end{subfigure} %
begin{subfigure}{.6textwidth}
centering
includegraphics[width=linewidth]{chapters/ProgrammedCellDeath/explode_benefit.pdf}
caption{Science}label{harming}

end{subfigure}
caption{Science is cool.}
end{figure}
end{landscape}









share|improve this question
















bumped to the homepage by Community 4 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.



















    up vote
    2
    down vote

    favorite












    I put a lot of time into figuring out how to have the page numbers on the long side of my landscape pages as per my school's formatting requirements (yes I'm sure) but now the numbers are apparently slightly too high. I need to make it 0.5 inch from the bottom of the page and centered in order to get my PhD. (I'm not bitter...)



    Current code:



    usepackage{pdflscape}
    usepackage{fancyhdr}
    usepackage{floatpag}
    ....


    fancypagestyle{floatpage}{%
    fancyhf{}% Clear page header/footer
    fancyfoot{
    makebox[textwidth][r]{% Right
    rlap{hspace{footskip}% Push out of margin by footskip
    smash{% Remove vertical height
    raisebox{dimexpr.7baselineskip+footskip+.5textheight}{% Raise vertically
    rotatebox{90}{thepage}}}}}}% Rotate counter-clockwise
    renewcommand{headrulewidth}{0pt}% No header rule
    renewcommand{footrulewidth}{0pt}% No footer rule
    }


    And then for the figure:



     begin{landscape}
    begin{figure}
    centeringthisfloatpagestyle{floatpage}%
    begin{subfigure}{.6textwidth}
    centering
    includegraphics[width=linewidth]{chapters/ProgrammedCellDeath/lyse_benefit.pdf}
    caption{Science}label{helping}
    end{subfigure} %
    begin{subfigure}{.6textwidth}
    centering
    includegraphics[width=linewidth]{chapters/ProgrammedCellDeath/explode_benefit.pdf}
    caption{Science}label{harming}

    end{subfigure}
    caption{Science is cool.}
    end{figure}
    end{landscape}









    share|improve this question
















    bumped to the homepage by Community 4 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I put a lot of time into figuring out how to have the page numbers on the long side of my landscape pages as per my school's formatting requirements (yes I'm sure) but now the numbers are apparently slightly too high. I need to make it 0.5 inch from the bottom of the page and centered in order to get my PhD. (I'm not bitter...)



      Current code:



      usepackage{pdflscape}
      usepackage{fancyhdr}
      usepackage{floatpag}
      ....


      fancypagestyle{floatpage}{%
      fancyhf{}% Clear page header/footer
      fancyfoot{
      makebox[textwidth][r]{% Right
      rlap{hspace{footskip}% Push out of margin by footskip
      smash{% Remove vertical height
      raisebox{dimexpr.7baselineskip+footskip+.5textheight}{% Raise vertically
      rotatebox{90}{thepage}}}}}}% Rotate counter-clockwise
      renewcommand{headrulewidth}{0pt}% No header rule
      renewcommand{footrulewidth}{0pt}% No footer rule
      }


      And then for the figure:



       begin{landscape}
      begin{figure}
      centeringthisfloatpagestyle{floatpage}%
      begin{subfigure}{.6textwidth}
      centering
      includegraphics[width=linewidth]{chapters/ProgrammedCellDeath/lyse_benefit.pdf}
      caption{Science}label{helping}
      end{subfigure} %
      begin{subfigure}{.6textwidth}
      centering
      includegraphics[width=linewidth]{chapters/ProgrammedCellDeath/explode_benefit.pdf}
      caption{Science}label{harming}

      end{subfigure}
      caption{Science is cool.}
      end{figure}
      end{landscape}









      share|improve this question















      I put a lot of time into figuring out how to have the page numbers on the long side of my landscape pages as per my school's formatting requirements (yes I'm sure) but now the numbers are apparently slightly too high. I need to make it 0.5 inch from the bottom of the page and centered in order to get my PhD. (I'm not bitter...)



      Current code:



      usepackage{pdflscape}
      usepackage{fancyhdr}
      usepackage{floatpag}
      ....


      fancypagestyle{floatpage}{%
      fancyhf{}% Clear page header/footer
      fancyfoot{
      makebox[textwidth][r]{% Right
      rlap{hspace{footskip}% Push out of margin by footskip
      smash{% Remove vertical height
      raisebox{dimexpr.7baselineskip+footskip+.5textheight}{% Raise vertically
      rotatebox{90}{thepage}}}}}}% Rotate counter-clockwise
      renewcommand{headrulewidth}{0pt}% No header rule
      renewcommand{footrulewidth}{0pt}% No footer rule
      }


      And then for the figure:



       begin{landscape}
      begin{figure}
      centeringthisfloatpagestyle{floatpage}%
      begin{subfigure}{.6textwidth}
      centering
      includegraphics[width=linewidth]{chapters/ProgrammedCellDeath/lyse_benefit.pdf}
      caption{Science}label{helping}
      end{subfigure} %
      begin{subfigure}{.6textwidth}
      centering
      includegraphics[width=linewidth]{chapters/ProgrammedCellDeath/explode_benefit.pdf}
      caption{Science}label{harming}

      end{subfigure}
      caption{Science is cool.}
      end{figure}
      end{landscape}






      header-footer fancyhdr landscape






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 12 '17 at 10:59









      Johannes_B

      20.7k249198




      20.7k249198










      asked Jun 5 '17 at 19:37









      Anya J

      112




      112





      bumped to the homepage by Community 4 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 4 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote













          This code did the trick:



            fancypagestyle{floatpage}{%
          fancyhf{}% Clear page header/footer
          fancyfoot{
          makebox[textwidth][r]{% Right
          rlap{hspace{footskip}% Push out of margin by footskip
          smash{% Remove vertical height
          raisebox{dimexpr6baselineskip+footskip+.5textheight}{% Raise vertically
          rotatebox{90}{thepage}}}}}}% Rotate counter-clockwise
          renewcommand{headrulewidth}{0pt}% No header rule
          renewcommand{footrulewidth}{0pt}% No footer rule
          }


          Just changed the dimrexp.7 to dimrexp6 though I still have no real clue as to why that worked and would love an explanation.






          share|improve this answer





















          • The .7 or 6 is the multiplier for the baselineskip, so you are adding a larger multiple of that number than before, and so moving the text. However a correct computation should use more information. See my answer instead.
            – Andrew Swann
            Mar 10 at 18:35


















          up vote
          0
          down vote













          The exact position is a little complicated to calculate. Assuming we start at the right-hand side of the footer, then we want a vertical box centered at .5textheight + footskip above the baseline of the footer. This needs to be pushed to the right by the width of the margin and then moved back on to the page by .5in. The width of the margin is



          pagewidth-textwidth-1in-hoffset-oddsidemargin


          (have a look at the diagram in the fancyhdr documentation)
          Putting this together we get:



          Sample output



          documentclass{article}

          usepackage{fancyhdr}
          usepackage{rotating}
          usepackage{floatpag}
          usepackage{graphicx}
          usepackage{subcaption}

          fancypagestyle{rotfloatpage}{%
          fancyhf{}%
          rfoot{makebox[0pt]{smash{rotatebox{90}{%
          makebox[dimexprtextheight+2footskip]{%
          raisebox{dimexprtextwidth+1in+hoffset+oddsidemargin-paperwidth
          +.5inrelax}[0pt][0pt]{thepage}}}}}}%
          renewcommand{headrulewidth}{0pt}%
          renewcommand{footrulewidth}{0pt}%
          }

          rotfloatpagestyle{rotfloatpage}

          begin{document}

          begin{sidewaysfigure}
          centering
          begin{subfigure}{.49textwidth}
          centering
          includegraphics[width=textwidth]{example-image-a.jpg}
          caption{Science}label{helping}
          end{subfigure} %
          begin{subfigure}{.49textwidth}
          centering
          includegraphics[width=textwidth]{example-image-b.jpg}
          caption{Science}label{harming}
          end{subfigure}
          caption{Science is cool.}
          end{sidewaysfigure}

          end{document}


          Note I have used the rotating package rather than pdflscape as in combination with floatpag one set the corresponding page style for all such floats at once.






          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',
            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%2f373434%2fmargin-spacing-of-footer-for-landscape-page%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            This code did the trick:



              fancypagestyle{floatpage}{%
            fancyhf{}% Clear page header/footer
            fancyfoot{
            makebox[textwidth][r]{% Right
            rlap{hspace{footskip}% Push out of margin by footskip
            smash{% Remove vertical height
            raisebox{dimexpr6baselineskip+footskip+.5textheight}{% Raise vertically
            rotatebox{90}{thepage}}}}}}% Rotate counter-clockwise
            renewcommand{headrulewidth}{0pt}% No header rule
            renewcommand{footrulewidth}{0pt}% No footer rule
            }


            Just changed the dimrexp.7 to dimrexp6 though I still have no real clue as to why that worked and would love an explanation.






            share|improve this answer





















            • The .7 or 6 is the multiplier for the baselineskip, so you are adding a larger multiple of that number than before, and so moving the text. However a correct computation should use more information. See my answer instead.
              – Andrew Swann
              Mar 10 at 18:35















            up vote
            0
            down vote













            This code did the trick:



              fancypagestyle{floatpage}{%
            fancyhf{}% Clear page header/footer
            fancyfoot{
            makebox[textwidth][r]{% Right
            rlap{hspace{footskip}% Push out of margin by footskip
            smash{% Remove vertical height
            raisebox{dimexpr6baselineskip+footskip+.5textheight}{% Raise vertically
            rotatebox{90}{thepage}}}}}}% Rotate counter-clockwise
            renewcommand{headrulewidth}{0pt}% No header rule
            renewcommand{footrulewidth}{0pt}% No footer rule
            }


            Just changed the dimrexp.7 to dimrexp6 though I still have no real clue as to why that worked and would love an explanation.






            share|improve this answer





















            • The .7 or 6 is the multiplier for the baselineskip, so you are adding a larger multiple of that number than before, and so moving the text. However a correct computation should use more information. See my answer instead.
              – Andrew Swann
              Mar 10 at 18:35













            up vote
            0
            down vote










            up vote
            0
            down vote









            This code did the trick:



              fancypagestyle{floatpage}{%
            fancyhf{}% Clear page header/footer
            fancyfoot{
            makebox[textwidth][r]{% Right
            rlap{hspace{footskip}% Push out of margin by footskip
            smash{% Remove vertical height
            raisebox{dimexpr6baselineskip+footskip+.5textheight}{% Raise vertically
            rotatebox{90}{thepage}}}}}}% Rotate counter-clockwise
            renewcommand{headrulewidth}{0pt}% No header rule
            renewcommand{footrulewidth}{0pt}% No footer rule
            }


            Just changed the dimrexp.7 to dimrexp6 though I still have no real clue as to why that worked and would love an explanation.






            share|improve this answer












            This code did the trick:



              fancypagestyle{floatpage}{%
            fancyhf{}% Clear page header/footer
            fancyfoot{
            makebox[textwidth][r]{% Right
            rlap{hspace{footskip}% Push out of margin by footskip
            smash{% Remove vertical height
            raisebox{dimexpr6baselineskip+footskip+.5textheight}{% Raise vertically
            rotatebox{90}{thepage}}}}}}% Rotate counter-clockwise
            renewcommand{headrulewidth}{0pt}% No header rule
            renewcommand{footrulewidth}{0pt}% No footer rule
            }


            Just changed the dimrexp.7 to dimrexp6 though I still have no real clue as to why that worked and would love an explanation.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jun 6 '17 at 16:32









            Anya J

            112




            112












            • The .7 or 6 is the multiplier for the baselineskip, so you are adding a larger multiple of that number than before, and so moving the text. However a correct computation should use more information. See my answer instead.
              – Andrew Swann
              Mar 10 at 18:35


















            • The .7 or 6 is the multiplier for the baselineskip, so you are adding a larger multiple of that number than before, and so moving the text. However a correct computation should use more information. See my answer instead.
              – Andrew Swann
              Mar 10 at 18:35
















            The .7 or 6 is the multiplier for the baselineskip, so you are adding a larger multiple of that number than before, and so moving the text. However a correct computation should use more information. See my answer instead.
            – Andrew Swann
            Mar 10 at 18:35




            The .7 or 6 is the multiplier for the baselineskip, so you are adding a larger multiple of that number than before, and so moving the text. However a correct computation should use more information. See my answer instead.
            – Andrew Swann
            Mar 10 at 18:35










            up vote
            0
            down vote













            The exact position is a little complicated to calculate. Assuming we start at the right-hand side of the footer, then we want a vertical box centered at .5textheight + footskip above the baseline of the footer. This needs to be pushed to the right by the width of the margin and then moved back on to the page by .5in. The width of the margin is



            pagewidth-textwidth-1in-hoffset-oddsidemargin


            (have a look at the diagram in the fancyhdr documentation)
            Putting this together we get:



            Sample output



            documentclass{article}

            usepackage{fancyhdr}
            usepackage{rotating}
            usepackage{floatpag}
            usepackage{graphicx}
            usepackage{subcaption}

            fancypagestyle{rotfloatpage}{%
            fancyhf{}%
            rfoot{makebox[0pt]{smash{rotatebox{90}{%
            makebox[dimexprtextheight+2footskip]{%
            raisebox{dimexprtextwidth+1in+hoffset+oddsidemargin-paperwidth
            +.5inrelax}[0pt][0pt]{thepage}}}}}}%
            renewcommand{headrulewidth}{0pt}%
            renewcommand{footrulewidth}{0pt}%
            }

            rotfloatpagestyle{rotfloatpage}

            begin{document}

            begin{sidewaysfigure}
            centering
            begin{subfigure}{.49textwidth}
            centering
            includegraphics[width=textwidth]{example-image-a.jpg}
            caption{Science}label{helping}
            end{subfigure} %
            begin{subfigure}{.49textwidth}
            centering
            includegraphics[width=textwidth]{example-image-b.jpg}
            caption{Science}label{harming}
            end{subfigure}
            caption{Science is cool.}
            end{sidewaysfigure}

            end{document}


            Note I have used the rotating package rather than pdflscape as in combination with floatpag one set the corresponding page style for all such floats at once.






            share|improve this answer

























              up vote
              0
              down vote













              The exact position is a little complicated to calculate. Assuming we start at the right-hand side of the footer, then we want a vertical box centered at .5textheight + footskip above the baseline of the footer. This needs to be pushed to the right by the width of the margin and then moved back on to the page by .5in. The width of the margin is



              pagewidth-textwidth-1in-hoffset-oddsidemargin


              (have a look at the diagram in the fancyhdr documentation)
              Putting this together we get:



              Sample output



              documentclass{article}

              usepackage{fancyhdr}
              usepackage{rotating}
              usepackage{floatpag}
              usepackage{graphicx}
              usepackage{subcaption}

              fancypagestyle{rotfloatpage}{%
              fancyhf{}%
              rfoot{makebox[0pt]{smash{rotatebox{90}{%
              makebox[dimexprtextheight+2footskip]{%
              raisebox{dimexprtextwidth+1in+hoffset+oddsidemargin-paperwidth
              +.5inrelax}[0pt][0pt]{thepage}}}}}}%
              renewcommand{headrulewidth}{0pt}%
              renewcommand{footrulewidth}{0pt}%
              }

              rotfloatpagestyle{rotfloatpage}

              begin{document}

              begin{sidewaysfigure}
              centering
              begin{subfigure}{.49textwidth}
              centering
              includegraphics[width=textwidth]{example-image-a.jpg}
              caption{Science}label{helping}
              end{subfigure} %
              begin{subfigure}{.49textwidth}
              centering
              includegraphics[width=textwidth]{example-image-b.jpg}
              caption{Science}label{harming}
              end{subfigure}
              caption{Science is cool.}
              end{sidewaysfigure}

              end{document}


              Note I have used the rotating package rather than pdflscape as in combination with floatpag one set the corresponding page style for all such floats at once.






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                The exact position is a little complicated to calculate. Assuming we start at the right-hand side of the footer, then we want a vertical box centered at .5textheight + footskip above the baseline of the footer. This needs to be pushed to the right by the width of the margin and then moved back on to the page by .5in. The width of the margin is



                pagewidth-textwidth-1in-hoffset-oddsidemargin


                (have a look at the diagram in the fancyhdr documentation)
                Putting this together we get:



                Sample output



                documentclass{article}

                usepackage{fancyhdr}
                usepackage{rotating}
                usepackage{floatpag}
                usepackage{graphicx}
                usepackage{subcaption}

                fancypagestyle{rotfloatpage}{%
                fancyhf{}%
                rfoot{makebox[0pt]{smash{rotatebox{90}{%
                makebox[dimexprtextheight+2footskip]{%
                raisebox{dimexprtextwidth+1in+hoffset+oddsidemargin-paperwidth
                +.5inrelax}[0pt][0pt]{thepage}}}}}}%
                renewcommand{headrulewidth}{0pt}%
                renewcommand{footrulewidth}{0pt}%
                }

                rotfloatpagestyle{rotfloatpage}

                begin{document}

                begin{sidewaysfigure}
                centering
                begin{subfigure}{.49textwidth}
                centering
                includegraphics[width=textwidth]{example-image-a.jpg}
                caption{Science}label{helping}
                end{subfigure} %
                begin{subfigure}{.49textwidth}
                centering
                includegraphics[width=textwidth]{example-image-b.jpg}
                caption{Science}label{harming}
                end{subfigure}
                caption{Science is cool.}
                end{sidewaysfigure}

                end{document}


                Note I have used the rotating package rather than pdflscape as in combination with floatpag one set the corresponding page style for all such floats at once.






                share|improve this answer












                The exact position is a little complicated to calculate. Assuming we start at the right-hand side of the footer, then we want a vertical box centered at .5textheight + footskip above the baseline of the footer. This needs to be pushed to the right by the width of the margin and then moved back on to the page by .5in. The width of the margin is



                pagewidth-textwidth-1in-hoffset-oddsidemargin


                (have a look at the diagram in the fancyhdr documentation)
                Putting this together we get:



                Sample output



                documentclass{article}

                usepackage{fancyhdr}
                usepackage{rotating}
                usepackage{floatpag}
                usepackage{graphicx}
                usepackage{subcaption}

                fancypagestyle{rotfloatpage}{%
                fancyhf{}%
                rfoot{makebox[0pt]{smash{rotatebox{90}{%
                makebox[dimexprtextheight+2footskip]{%
                raisebox{dimexprtextwidth+1in+hoffset+oddsidemargin-paperwidth
                +.5inrelax}[0pt][0pt]{thepage}}}}}}%
                renewcommand{headrulewidth}{0pt}%
                renewcommand{footrulewidth}{0pt}%
                }

                rotfloatpagestyle{rotfloatpage}

                begin{document}

                begin{sidewaysfigure}
                centering
                begin{subfigure}{.49textwidth}
                centering
                includegraphics[width=textwidth]{example-image-a.jpg}
                caption{Science}label{helping}
                end{subfigure} %
                begin{subfigure}{.49textwidth}
                centering
                includegraphics[width=textwidth]{example-image-b.jpg}
                caption{Science}label{harming}
                end{subfigure}
                caption{Science is cool.}
                end{sidewaysfigure}

                end{document}


                Note I have used the rotating package rather than pdflscape as in combination with floatpag one set the corresponding page style for all such floats at once.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 10 at 18:34









                Andrew Swann

                76.2k9127324




                76.2k9127324






























                    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%2f373434%2fmargin-spacing-of-footer-for-landscape-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

                    サソリ

                    広島県道265号伴広島線

                    Setup Asymptote in Texstudio