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}
header-footer fancyhdr landscape
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
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}
header-footer fancyhdr landscape
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
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}
header-footer fancyhdr landscape
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
header-footer fancyhdr landscape
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♦ 13 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♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
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.
The.7
or6
is the multiplier for thebaselineskip
, 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
add a comment |
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:
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.
add a comment |
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.
The.7
or6
is the multiplier for thebaselineskip
, 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
add a comment |
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.
The.7
or6
is the multiplier for thebaselineskip
, 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
add a comment |
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.
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.
answered Jun 6 '17 at 16:32
Anya J
112
112
The.7
or6
is the multiplier for thebaselineskip
, 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
add a comment |
The.7
or6
is the multiplier for thebaselineskip
, 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
add a comment |
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:
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.
add a comment |
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:
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.
add a comment |
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:
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.
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:
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.
answered Mar 10 at 18:34
Andrew Swann
76.2k9127324
76.2k9127324
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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