Can I make a flexible page length?
up vote
4
down vote
favorite
In my document, I have many large unbreakable boxes. Sometimes, the text will take up most of the page before a box that is a little too big to still fit. Consequently, I am often manually using enlargethispage{baselineskip}
and clearpage
to adjust the page height for good page breaks. I know that I can use flexible lengths between boxes, and that would help if my boxes almost fill a page. But what if my boxes are a bit too long? Is there a way that I can tell TeX that the available page height can be stretched if it needs to?
The following illustrates what I'm having. The box is a bit too big to fit on the page. But if I shrink the bottom margin by only .1in, then the page is large enough to fit everything. I'd like to be able to specify a flexible length for the bottom margin, but the geometry package doesn't allow that to happen, and I'm not proficient enough with the page dimension lengths to be able to manually specify the appropriate spots.
documentclass[letterpaper]{article}
usepackage[margin=2in]{geometry} % document default causes two mostly empty pages
%geometry{bottom=1.9in} % enlarging allows me to get one full page this time
%geometry{bottom=2in plus 0in minus .1in}
% I'd like to keep the default, but allow it to stretch if necessary
% this command isn't valid - it acts like
%geometry{bottom=2in}plus 0in minus .1in
usepackage{lipsum}
begin{document}
lipsum[1-3]
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
There are a few other questions that deal with adjusting page dimensions and big unbreakable boxes, but the usual response ends up being that the user should manually adjust the layout. I'm wanting to find a way for TeX to automatically make the adjustments, so that I don't have to fiddle with every page. This question is close to what I'm asking about, but it's focusing on adjusting the box, not the height of the page. (And I don't understand the accepted answer.)
page-breaking lengths
add a comment |
up vote
4
down vote
favorite
In my document, I have many large unbreakable boxes. Sometimes, the text will take up most of the page before a box that is a little too big to still fit. Consequently, I am often manually using enlargethispage{baselineskip}
and clearpage
to adjust the page height for good page breaks. I know that I can use flexible lengths between boxes, and that would help if my boxes almost fill a page. But what if my boxes are a bit too long? Is there a way that I can tell TeX that the available page height can be stretched if it needs to?
The following illustrates what I'm having. The box is a bit too big to fit on the page. But if I shrink the bottom margin by only .1in, then the page is large enough to fit everything. I'd like to be able to specify a flexible length for the bottom margin, but the geometry package doesn't allow that to happen, and I'm not proficient enough with the page dimension lengths to be able to manually specify the appropriate spots.
documentclass[letterpaper]{article}
usepackage[margin=2in]{geometry} % document default causes two mostly empty pages
%geometry{bottom=1.9in} % enlarging allows me to get one full page this time
%geometry{bottom=2in plus 0in minus .1in}
% I'd like to keep the default, but allow it to stretch if necessary
% this command isn't valid - it acts like
%geometry{bottom=2in}plus 0in minus .1in
usepackage{lipsum}
begin{document}
lipsum[1-3]
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
There are a few other questions that deal with adjusting page dimensions and big unbreakable boxes, but the usual response ends up being that the user should manually adjust the layout. I'm wanting to find a way for TeX to automatically make the adjustments, so that I don't have to fiddle with every page. This question is close to what I'm asking about, but it's focusing on adjusting the box, not the height of the page. (And I don't understand the accepted answer.)
page-breaking lengths
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
In my document, I have many large unbreakable boxes. Sometimes, the text will take up most of the page before a box that is a little too big to still fit. Consequently, I am often manually using enlargethispage{baselineskip}
and clearpage
to adjust the page height for good page breaks. I know that I can use flexible lengths between boxes, and that would help if my boxes almost fill a page. But what if my boxes are a bit too long? Is there a way that I can tell TeX that the available page height can be stretched if it needs to?
The following illustrates what I'm having. The box is a bit too big to fit on the page. But if I shrink the bottom margin by only .1in, then the page is large enough to fit everything. I'd like to be able to specify a flexible length for the bottom margin, but the geometry package doesn't allow that to happen, and I'm not proficient enough with the page dimension lengths to be able to manually specify the appropriate spots.
documentclass[letterpaper]{article}
usepackage[margin=2in]{geometry} % document default causes two mostly empty pages
%geometry{bottom=1.9in} % enlarging allows me to get one full page this time
%geometry{bottom=2in plus 0in minus .1in}
% I'd like to keep the default, but allow it to stretch if necessary
% this command isn't valid - it acts like
%geometry{bottom=2in}plus 0in minus .1in
usepackage{lipsum}
begin{document}
lipsum[1-3]
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
There are a few other questions that deal with adjusting page dimensions and big unbreakable boxes, but the usual response ends up being that the user should manually adjust the layout. I'm wanting to find a way for TeX to automatically make the adjustments, so that I don't have to fiddle with every page. This question is close to what I'm asking about, but it's focusing on adjusting the box, not the height of the page. (And I don't understand the accepted answer.)
page-breaking lengths
In my document, I have many large unbreakable boxes. Sometimes, the text will take up most of the page before a box that is a little too big to still fit. Consequently, I am often manually using enlargethispage{baselineskip}
and clearpage
to adjust the page height for good page breaks. I know that I can use flexible lengths between boxes, and that would help if my boxes almost fill a page. But what if my boxes are a bit too long? Is there a way that I can tell TeX that the available page height can be stretched if it needs to?
The following illustrates what I'm having. The box is a bit too big to fit on the page. But if I shrink the bottom margin by only .1in, then the page is large enough to fit everything. I'd like to be able to specify a flexible length for the bottom margin, but the geometry package doesn't allow that to happen, and I'm not proficient enough with the page dimension lengths to be able to manually specify the appropriate spots.
documentclass[letterpaper]{article}
usepackage[margin=2in]{geometry} % document default causes two mostly empty pages
%geometry{bottom=1.9in} % enlarging allows me to get one full page this time
%geometry{bottom=2in plus 0in minus .1in}
% I'd like to keep the default, but allow it to stretch if necessary
% this command isn't valid - it acts like
%geometry{bottom=2in}plus 0in minus .1in
usepackage{lipsum}
begin{document}
lipsum[1-3]
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
There are a few other questions that deal with adjusting page dimensions and big unbreakable boxes, but the usual response ends up being that the user should manually adjust the layout. I'm wanting to find a way for TeX to automatically make the adjustments, so that I don't have to fiddle with every page. This question is close to what I'm asking about, but it's focusing on adjusting the box, not the height of the page. (And I don't understand the accepted answer.)
page-breaking lengths
page-breaking lengths
asked Nov 14 at 18:47
Teepeemm
1,640616
1,640616
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
this allows an overrun of 15pt, enough in this case
documentclass[letterpaper]{article}
usepackage[margin=2in]{geometry} % document default causes two mostly empty pages
%geometry{bottom=1.9in} % enlarging allows me to get one full page this time
%geometry{bottom=2in plus 0in minus .1in}
% I'd like to keep the default, but allow it to stretch if necessary
% this command isn't valid - it acts like
%geometry{bottom=2in}plus 0in minus .1in
usepackage{lipsum}
maxdepth=15pt
begin{document}
lipsum[1-3]
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
With the tcolorbox mentioned in the comments of the other answer, one probably will have to set the[baseline=15pt]
to that it actually has a large depth.
– Ulrike Fischer
Nov 14 at 21:14
@UlrikeFischer I was misremembering - I'm using a tikzpicture to mimic a tcolorbox. But I should look into switching to tcolorbox anyway. By the way, it appears that in addition to[baseline=15pt]
, I'll also needvspace{4pt}
after the box to undo the baseline change.
– Teepeemm
Nov 15 at 18:52
add a comment |
up vote
1
down vote
You can use occasionally enlargethispage{some skip}
:
documentclass[letterpaper]{article}
usepackage[margin=2in, showframe]{geometry} % document default causes two mostly empty pages
usepackage{lipsum}
begin{document}
lipsum[1-3]
enlargethispage{1baselineskip}
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
Yes, that's my current approach. But that means I have to go through the document looking for bad breaks and manually adjusting them. And potentially remove manual adjustments that are no longer necessary. I'm hoping to offload some of that work onto the TeX page breaking algorithm.
– Teepeemm
Nov 14 at 19:13
Do you boxes really have to be unbreakable?
– Bernard
Nov 14 at 19:15
Each is atcolorbox
of a theorem or definition. So thetcolorbox
prevents breaking, and from a semantic point of view the content shouldn't be broken.
– Teepeemm
Nov 14 at 19:32
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
this allows an overrun of 15pt, enough in this case
documentclass[letterpaper]{article}
usepackage[margin=2in]{geometry} % document default causes two mostly empty pages
%geometry{bottom=1.9in} % enlarging allows me to get one full page this time
%geometry{bottom=2in plus 0in minus .1in}
% I'd like to keep the default, but allow it to stretch if necessary
% this command isn't valid - it acts like
%geometry{bottom=2in}plus 0in minus .1in
usepackage{lipsum}
maxdepth=15pt
begin{document}
lipsum[1-3]
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
With the tcolorbox mentioned in the comments of the other answer, one probably will have to set the[baseline=15pt]
to that it actually has a large depth.
– Ulrike Fischer
Nov 14 at 21:14
@UlrikeFischer I was misremembering - I'm using a tikzpicture to mimic a tcolorbox. But I should look into switching to tcolorbox anyway. By the way, it appears that in addition to[baseline=15pt]
, I'll also needvspace{4pt}
after the box to undo the baseline change.
– Teepeemm
Nov 15 at 18:52
add a comment |
up vote
3
down vote
accepted
this allows an overrun of 15pt, enough in this case
documentclass[letterpaper]{article}
usepackage[margin=2in]{geometry} % document default causes two mostly empty pages
%geometry{bottom=1.9in} % enlarging allows me to get one full page this time
%geometry{bottom=2in plus 0in minus .1in}
% I'd like to keep the default, but allow it to stretch if necessary
% this command isn't valid - it acts like
%geometry{bottom=2in}plus 0in minus .1in
usepackage{lipsum}
maxdepth=15pt
begin{document}
lipsum[1-3]
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
With the tcolorbox mentioned in the comments of the other answer, one probably will have to set the[baseline=15pt]
to that it actually has a large depth.
– Ulrike Fischer
Nov 14 at 21:14
@UlrikeFischer I was misremembering - I'm using a tikzpicture to mimic a tcolorbox. But I should look into switching to tcolorbox anyway. By the way, it appears that in addition to[baseline=15pt]
, I'll also needvspace{4pt}
after the box to undo the baseline change.
– Teepeemm
Nov 15 at 18:52
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
this allows an overrun of 15pt, enough in this case
documentclass[letterpaper]{article}
usepackage[margin=2in]{geometry} % document default causes two mostly empty pages
%geometry{bottom=1.9in} % enlarging allows me to get one full page this time
%geometry{bottom=2in plus 0in minus .1in}
% I'd like to keep the default, but allow it to stretch if necessary
% this command isn't valid - it acts like
%geometry{bottom=2in}plus 0in minus .1in
usepackage{lipsum}
maxdepth=15pt
begin{document}
lipsum[1-3]
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
this allows an overrun of 15pt, enough in this case
documentclass[letterpaper]{article}
usepackage[margin=2in]{geometry} % document default causes two mostly empty pages
%geometry{bottom=1.9in} % enlarging allows me to get one full page this time
%geometry{bottom=2in plus 0in minus .1in}
% I'd like to keep the default, but allow it to stretch if necessary
% this command isn't valid - it acts like
%geometry{bottom=2in}plus 0in minus .1in
usepackage{lipsum}
maxdepth=15pt
begin{document}
lipsum[1-3]
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
answered Nov 14 at 20:22
David Carlisle
477k3811061840
477k3811061840
With the tcolorbox mentioned in the comments of the other answer, one probably will have to set the[baseline=15pt]
to that it actually has a large depth.
– Ulrike Fischer
Nov 14 at 21:14
@UlrikeFischer I was misremembering - I'm using a tikzpicture to mimic a tcolorbox. But I should look into switching to tcolorbox anyway. By the way, it appears that in addition to[baseline=15pt]
, I'll also needvspace{4pt}
after the box to undo the baseline change.
– Teepeemm
Nov 15 at 18:52
add a comment |
With the tcolorbox mentioned in the comments of the other answer, one probably will have to set the[baseline=15pt]
to that it actually has a large depth.
– Ulrike Fischer
Nov 14 at 21:14
@UlrikeFischer I was misremembering - I'm using a tikzpicture to mimic a tcolorbox. But I should look into switching to tcolorbox anyway. By the way, it appears that in addition to[baseline=15pt]
, I'll also needvspace{4pt}
after the box to undo the baseline change.
– Teepeemm
Nov 15 at 18:52
With the tcolorbox mentioned in the comments of the other answer, one probably will have to set the
[baseline=15pt]
to that it actually has a large depth.– Ulrike Fischer
Nov 14 at 21:14
With the tcolorbox mentioned in the comments of the other answer, one probably will have to set the
[baseline=15pt]
to that it actually has a large depth.– Ulrike Fischer
Nov 14 at 21:14
@UlrikeFischer I was misremembering - I'm using a tikzpicture to mimic a tcolorbox. But I should look into switching to tcolorbox anyway. By the way, it appears that in addition to
[baseline=15pt]
, I'll also need vspace{4pt}
after the box to undo the baseline change.– Teepeemm
Nov 15 at 18:52
@UlrikeFischer I was misremembering - I'm using a tikzpicture to mimic a tcolorbox. But I should look into switching to tcolorbox anyway. By the way, it appears that in addition to
[baseline=15pt]
, I'll also need vspace{4pt}
after the box to undo the baseline change.– Teepeemm
Nov 15 at 18:52
add a comment |
up vote
1
down vote
You can use occasionally enlargethispage{some skip}
:
documentclass[letterpaper]{article}
usepackage[margin=2in, showframe]{geometry} % document default causes two mostly empty pages
usepackage{lipsum}
begin{document}
lipsum[1-3]
enlargethispage{1baselineskip}
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
Yes, that's my current approach. But that means I have to go through the document looking for bad breaks and manually adjusting them. And potentially remove manual adjustments that are no longer necessary. I'm hoping to offload some of that work onto the TeX page breaking algorithm.
– Teepeemm
Nov 14 at 19:13
Do you boxes really have to be unbreakable?
– Bernard
Nov 14 at 19:15
Each is atcolorbox
of a theorem or definition. So thetcolorbox
prevents breaking, and from a semantic point of view the content shouldn't be broken.
– Teepeemm
Nov 14 at 19:32
add a comment |
up vote
1
down vote
You can use occasionally enlargethispage{some skip}
:
documentclass[letterpaper]{article}
usepackage[margin=2in, showframe]{geometry} % document default causes two mostly empty pages
usepackage{lipsum}
begin{document}
lipsum[1-3]
enlargethispage{1baselineskip}
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
Yes, that's my current approach. But that means I have to go through the document looking for bad breaks and manually adjusting them. And potentially remove manual adjustments that are no longer necessary. I'm hoping to offload some of that work onto the TeX page breaking algorithm.
– Teepeemm
Nov 14 at 19:13
Do you boxes really have to be unbreakable?
– Bernard
Nov 14 at 19:15
Each is atcolorbox
of a theorem or definition. So thetcolorbox
prevents breaking, and from a semantic point of view the content shouldn't be broken.
– Teepeemm
Nov 14 at 19:32
add a comment |
up vote
1
down vote
up vote
1
down vote
You can use occasionally enlargethispage{some skip}
:
documentclass[letterpaper]{article}
usepackage[margin=2in, showframe]{geometry} % document default causes two mostly empty pages
usepackage{lipsum}
begin{document}
lipsum[1-3]
enlargethispage{1baselineskip}
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
You can use occasionally enlargethispage{some skip}
:
documentclass[letterpaper]{article}
usepackage[margin=2in, showframe]{geometry} % document default causes two mostly empty pages
usepackage{lipsum}
begin{document}
lipsum[1-3]
enlargethispage{1baselineskip}
noindent
fbox{parbox[t][2in]{.97textwidth}{large unbreakable box}}
end{document}
answered Nov 14 at 19:07
Bernard
162k767192
162k767192
Yes, that's my current approach. But that means I have to go through the document looking for bad breaks and manually adjusting them. And potentially remove manual adjustments that are no longer necessary. I'm hoping to offload some of that work onto the TeX page breaking algorithm.
– Teepeemm
Nov 14 at 19:13
Do you boxes really have to be unbreakable?
– Bernard
Nov 14 at 19:15
Each is atcolorbox
of a theorem or definition. So thetcolorbox
prevents breaking, and from a semantic point of view the content shouldn't be broken.
– Teepeemm
Nov 14 at 19:32
add a comment |
Yes, that's my current approach. But that means I have to go through the document looking for bad breaks and manually adjusting them. And potentially remove manual adjustments that are no longer necessary. I'm hoping to offload some of that work onto the TeX page breaking algorithm.
– Teepeemm
Nov 14 at 19:13
Do you boxes really have to be unbreakable?
– Bernard
Nov 14 at 19:15
Each is atcolorbox
of a theorem or definition. So thetcolorbox
prevents breaking, and from a semantic point of view the content shouldn't be broken.
– Teepeemm
Nov 14 at 19:32
Yes, that's my current approach. But that means I have to go through the document looking for bad breaks and manually adjusting them. And potentially remove manual adjustments that are no longer necessary. I'm hoping to offload some of that work onto the TeX page breaking algorithm.
– Teepeemm
Nov 14 at 19:13
Yes, that's my current approach. But that means I have to go through the document looking for bad breaks and manually adjusting them. And potentially remove manual adjustments that are no longer necessary. I'm hoping to offload some of that work onto the TeX page breaking algorithm.
– Teepeemm
Nov 14 at 19:13
Do you boxes really have to be unbreakable?
– Bernard
Nov 14 at 19:15
Do you boxes really have to be unbreakable?
– Bernard
Nov 14 at 19:15
Each is a
tcolorbox
of a theorem or definition. So the tcolorbox
prevents breaking, and from a semantic point of view the content shouldn't be broken.– Teepeemm
Nov 14 at 19:32
Each is a
tcolorbox
of a theorem or definition. So the tcolorbox
prevents breaking, and from a semantic point of view the content shouldn't be broken.– Teepeemm
Nov 14 at 19:32
add a comment |
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%2f459998%2fcan-i-make-a-flexible-page-length%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