Simultaneous flexible vertical space with page breaksHow can I create a chapter with graphics only divided...

Can inspiration allow the Rogue to make a Sneak Attack?

Rationale to prefer local variables over instance variables?

Did Amazon pay $0 in taxes last year?

Does the in-code argument passing conventions used on PDP-11's have a name?

Why would the IRS ask for birth certificates or even audit a small tax return?

Can you run a ground wire from stove directly to ground pole in the ground

Can a space-faring robot still function over a billion years?

Dukha vs legitimate need

Searching for a string that contains the file name

How can friction do no work in case of pure rolling?

Where do you go through passport control when transiting through another Schengen airport on your way out of the Schengen area?

How spaceships determine each other's mass in space?

A bug in Excel? Conditional formatting for marking duplicates also highlights unique value

Why is, for a group scheme of finite type, "smooth" (resp. irreducible) equivalent to "geometrically reduced" (resp. geometrically irreducible)?

Should we avoid writing fiction about historical events without extensive research?

Computing the volume of a simplex-like object with constraints

Are angels creatures (Mark 16:15) and can they repent (Rev 2:5 and Rom 8:21)

Genitives like "axeos"

Practical reasons to have both a large police force and bounty hunting network?

Named nets not connected in Eagle board design

Does the US political system, in principle, allow for a no-party system?

PTIJ: Mouthful of Mitzvos

3.5% Interest Student Loan or use all of my savings on Tuition?

Under what conditions would I NOT add my Proficiency Bonus to a Spell Attack Roll (or Saving Throw DC)?



Simultaneous flexible vertical space with page breaks


How can I create a chapter with graphics only divided into different sections?Image vs Text Arrangementhow to remove unwanted space between pagesUnwanted vertical space/glue between consecutive custom section macro callsAdjusting the width of a displaymath environmentTwo maketitles in one pageminipage 15.0pt too wideHow to really prevent loner section/subsection heads at end of page?Miktex/XeLaTeX - non-working wrapped images (wrapfigure)LaTeX: figure + includegraphics unwanted page breaks and wrong spacing between caption













1















Running into an issue I can't figure out. In essence, I have a page that has some text, possibly some equations, a couple graphics and maybe a table, all separated by flexible white-space. Sometimes everything fits on one page, but sometimes the graphics are too large so multiple pages are needed.



Let's say I have 3 graphics. In the case they're all to big to fit on one page, I'd expect that the first two graphics stay on the first page, distributed evenly along with any preceding text, and the third graphic would be on the next page along with the following text or tables, etc. However, my code always keeps all three graphics together.



I'm of the impression it's due to vspace creating an unbreakable vbox, but I don't know how else to handle what I want without manually adding a clearpage or similar. This is undesirable; the end goal is templates that pretty much automagically do this for me, of course!



Here's a MWE. In this example, images A and B end up on page 2. My desire is for image A to end up on page 1, and B, C and the next section on page 2.



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}
usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

begin{document}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

vfill

begin{center}
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}

vfill

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

vfill

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{center}

subsection{The next subsection}

end{document}


Result:
Result



Rough MSPaint rendition of what I expect:
enter image description here










share|improve this question









New contributor




Shamtam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • ! Undefined control sequence. <argument> undefinedpagestyle l.10 pagestyle{fancy}

    – David Carlisle
    2 hours ago






  • 1





    don't put a vfill before the begin{center}. Or better replace them all by e.g. medskip

    – Ulrike Fischer
    2 hours ago











  • No it must have given an error, check the log, perhaps latexmk is scrolling past by default.

    – David Carlisle
    2 hours ago






  • 1





    @DavidCarlisle Ah yes, you're right. My mistake!

    – Shamtam
    2 hours ago
















1















Running into an issue I can't figure out. In essence, I have a page that has some text, possibly some equations, a couple graphics and maybe a table, all separated by flexible white-space. Sometimes everything fits on one page, but sometimes the graphics are too large so multiple pages are needed.



Let's say I have 3 graphics. In the case they're all to big to fit on one page, I'd expect that the first two graphics stay on the first page, distributed evenly along with any preceding text, and the third graphic would be on the next page along with the following text or tables, etc. However, my code always keeps all three graphics together.



I'm of the impression it's due to vspace creating an unbreakable vbox, but I don't know how else to handle what I want without manually adding a clearpage or similar. This is undesirable; the end goal is templates that pretty much automagically do this for me, of course!



Here's a MWE. In this example, images A and B end up on page 2. My desire is for image A to end up on page 1, and B, C and the next section on page 2.



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}
usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

begin{document}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

vfill

begin{center}
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}

vfill

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

vfill

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{center}

subsection{The next subsection}

end{document}


Result:
Result



Rough MSPaint rendition of what I expect:
enter image description here










share|improve this question









New contributor




Shamtam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • ! Undefined control sequence. <argument> undefinedpagestyle l.10 pagestyle{fancy}

    – David Carlisle
    2 hours ago






  • 1





    don't put a vfill before the begin{center}. Or better replace them all by e.g. medskip

    – Ulrike Fischer
    2 hours ago











  • No it must have given an error, check the log, perhaps latexmk is scrolling past by default.

    – David Carlisle
    2 hours ago






  • 1





    @DavidCarlisle Ah yes, you're right. My mistake!

    – Shamtam
    2 hours ago














1












1








1








Running into an issue I can't figure out. In essence, I have a page that has some text, possibly some equations, a couple graphics and maybe a table, all separated by flexible white-space. Sometimes everything fits on one page, but sometimes the graphics are too large so multiple pages are needed.



Let's say I have 3 graphics. In the case they're all to big to fit on one page, I'd expect that the first two graphics stay on the first page, distributed evenly along with any preceding text, and the third graphic would be on the next page along with the following text or tables, etc. However, my code always keeps all three graphics together.



I'm of the impression it's due to vspace creating an unbreakable vbox, but I don't know how else to handle what I want without manually adding a clearpage or similar. This is undesirable; the end goal is templates that pretty much automagically do this for me, of course!



Here's a MWE. In this example, images A and B end up on page 2. My desire is for image A to end up on page 1, and B, C and the next section on page 2.



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}
usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

begin{document}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

vfill

begin{center}
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}

vfill

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

vfill

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{center}

subsection{The next subsection}

end{document}


Result:
Result



Rough MSPaint rendition of what I expect:
enter image description here










share|improve this question









New contributor




Shamtam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












Running into an issue I can't figure out. In essence, I have a page that has some text, possibly some equations, a couple graphics and maybe a table, all separated by flexible white-space. Sometimes everything fits on one page, but sometimes the graphics are too large so multiple pages are needed.



Let's say I have 3 graphics. In the case they're all to big to fit on one page, I'd expect that the first two graphics stay on the first page, distributed evenly along with any preceding text, and the third graphic would be on the next page along with the following text or tables, etc. However, my code always keeps all three graphics together.



I'm of the impression it's due to vspace creating an unbreakable vbox, but I don't know how else to handle what I want without manually adding a clearpage or similar. This is undesirable; the end goal is templates that pretty much automagically do this for me, of course!



Here's a MWE. In this example, images A and B end up on page 2. My desire is for image A to end up on page 1, and B, C and the next section on page 2.



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}
usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

begin{document}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

vfill

begin{center}
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}

vfill

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

vfill

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{center}

subsection{The next subsection}

end{document}


Result:
Result



Rough MSPaint rendition of what I expect:
enter image description here







spacing page-breaking






share|improve this question









New contributor




Shamtam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Shamtam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 hours ago







Shamtam













New contributor




Shamtam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 hours ago









ShamtamShamtam

1063




1063




New contributor




Shamtam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Shamtam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Shamtam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • ! Undefined control sequence. <argument> undefinedpagestyle l.10 pagestyle{fancy}

    – David Carlisle
    2 hours ago






  • 1





    don't put a vfill before the begin{center}. Or better replace them all by e.g. medskip

    – Ulrike Fischer
    2 hours ago











  • No it must have given an error, check the log, perhaps latexmk is scrolling past by default.

    – David Carlisle
    2 hours ago






  • 1





    @DavidCarlisle Ah yes, you're right. My mistake!

    – Shamtam
    2 hours ago



















  • ! Undefined control sequence. <argument> undefinedpagestyle l.10 pagestyle{fancy}

    – David Carlisle
    2 hours ago






  • 1





    don't put a vfill before the begin{center}. Or better replace them all by e.g. medskip

    – Ulrike Fischer
    2 hours ago











  • No it must have given an error, check the log, perhaps latexmk is scrolling past by default.

    – David Carlisle
    2 hours ago






  • 1





    @DavidCarlisle Ah yes, you're right. My mistake!

    – Shamtam
    2 hours ago

















! Undefined control sequence. <argument> undefinedpagestyle l.10 pagestyle{fancy}

– David Carlisle
2 hours ago





! Undefined control sequence. <argument> undefinedpagestyle l.10 pagestyle{fancy}

– David Carlisle
2 hours ago




1




1





don't put a vfill before the begin{center}. Or better replace them all by e.g. medskip

– Ulrike Fischer
2 hours ago





don't put a vfill before the begin{center}. Or better replace them all by e.g. medskip

– Ulrike Fischer
2 hours ago













No it must have given an error, check the log, perhaps latexmk is scrolling past by default.

– David Carlisle
2 hours ago





No it must have given an error, check the log, perhaps latexmk is scrolling past by default.

– David Carlisle
2 hours ago




1




1





@DavidCarlisle Ah yes, you're right. My mistake!

– Shamtam
2 hours ago





@DavidCarlisle Ah yes, you're right. My mistake!

– Shamtam
2 hours ago










2 Answers
2






active

oldest

votes


















2














enter image description here



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}

usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

begin{document}

%pagestyle{fancy}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

vfill

{centering
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}


vfill

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

vfill

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}

}

subsection{The next subsection}

end{document}


You get slightly luckier with centering but really the issue is using \* rather than proper sectioning or item commands. In the scope of centering (and center) \ is really par rather than its usual definition of newline that means it exercises the page breaker, \* adds a nobreak penalty, so if it happens that a page break is considered after the heading a break is prevented there because of the * but a zero penalty break is available before the first image due to the vfill being available to fill the space, so TeX takes that page break rather than looking ahead.





A perhaps better markup avoiding using explicit spacing font changes and \ in favour of the more idiomatic latex caption markup would be



enter image description here



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}

usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe,float}

begin{document}

%pagestyle{fancy}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}
end{figure}

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}
end{figure}

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{figure}



subsection{The next subsection}

end{document}


You can use the facilities of the float (and related caption) to customise the caption formatting as required.






share|improve this answer


























  • Yes, it's definitely (un)luck. In my actual document, I'm using a localized centering block exactly as in your example, in fact! Your explanation about the \* definitely makes sense to me though. Is using multiple figures the best solution to this, or are there other solutions? I'm not very well-versed in (La)TeX, if it's not obvious ;)

    – Shamtam
    2 hours ago











  • @Shamtam I added a second suggestion

    – David Carlisle
    1 hour ago



















1














I am not sure what you mean "flexible white space" but you could define a new command that would use vspace with a predefined "flexible length".



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}
usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

newlength{mylength}
setlength{mylength}{20pt plus 10pt minus 5pt}
newcommand{myskip}{vspace{mylength}}
begin{document}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

myskip

begin{center}
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}

myskip

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

myskip

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{center}

subsection{The next subsection}

end{document}


PS: Not sure if I understood the question, so, feel free to ask me to delete it.






share|improve this answer
























  • Apologies for my poor explanation. By "flexible white space" I mean a white-space that expands to fill the vbox it's contained in, e.g. if I have two paragraphs with a vfill between them, the top paragraph will anchor to the top of the page, and the second to the bottom. My problem is that if I use something like vspace{0.1in plus 1fil}, instead of breaking after the first image, it breaks before the first image instead.

    – Shamtam
    2 hours ago











  • Thanks for explaining... I could not see the reason of that vfill before. Deleting the answer in 5'

    – koleygr
    2 hours ago











  • @koleygr don't delete I was just going to tell the OP to do this!

    – David Carlisle
    2 hours ago













  • @DavidCarlisle... I think that this answer doesn't help him with the request of having figures only on top and bottom... If the figures are small enough they could leave empty space at the bottom and thus the answer doesn't give the required output. (Already upvoted your answer but this one will just waste the time of future readers)

    – koleygr
    2 hours ago













  • @koleygr my answer isn't an answer at all really I just changed center to centering which affects the space before the first image and then gets luck with the page breaks in this example. Perhaps we both delete and let someone else have a go:-)

    – David Carlisle
    2 hours ago











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
});


}
});






Shamtam is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478309%2fsimultaneous-flexible-vertical-space-with-page-breaks%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









2














enter image description here



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}

usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

begin{document}

%pagestyle{fancy}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

vfill

{centering
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}


vfill

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

vfill

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}

}

subsection{The next subsection}

end{document}


You get slightly luckier with centering but really the issue is using \* rather than proper sectioning or item commands. In the scope of centering (and center) \ is really par rather than its usual definition of newline that means it exercises the page breaker, \* adds a nobreak penalty, so if it happens that a page break is considered after the heading a break is prevented there because of the * but a zero penalty break is available before the first image due to the vfill being available to fill the space, so TeX takes that page break rather than looking ahead.





A perhaps better markup avoiding using explicit spacing font changes and \ in favour of the more idiomatic latex caption markup would be



enter image description here



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}

usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe,float}

begin{document}

%pagestyle{fancy}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}
end{figure}

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}
end{figure}

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{figure}



subsection{The next subsection}

end{document}


You can use the facilities of the float (and related caption) to customise the caption formatting as required.






share|improve this answer


























  • Yes, it's definitely (un)luck. In my actual document, I'm using a localized centering block exactly as in your example, in fact! Your explanation about the \* definitely makes sense to me though. Is using multiple figures the best solution to this, or are there other solutions? I'm not very well-versed in (La)TeX, if it's not obvious ;)

    – Shamtam
    2 hours ago











  • @Shamtam I added a second suggestion

    – David Carlisle
    1 hour ago
















2














enter image description here



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}

usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

begin{document}

%pagestyle{fancy}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

vfill

{centering
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}


vfill

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

vfill

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}

}

subsection{The next subsection}

end{document}


You get slightly luckier with centering but really the issue is using \* rather than proper sectioning or item commands. In the scope of centering (and center) \ is really par rather than its usual definition of newline that means it exercises the page breaker, \* adds a nobreak penalty, so if it happens that a page break is considered after the heading a break is prevented there because of the * but a zero penalty break is available before the first image due to the vfill being available to fill the space, so TeX takes that page break rather than looking ahead.





A perhaps better markup avoiding using explicit spacing font changes and \ in favour of the more idiomatic latex caption markup would be



enter image description here



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}

usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe,float}

begin{document}

%pagestyle{fancy}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}
end{figure}

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}
end{figure}

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{figure}



subsection{The next subsection}

end{document}


You can use the facilities of the float (and related caption) to customise the caption formatting as required.






share|improve this answer


























  • Yes, it's definitely (un)luck. In my actual document, I'm using a localized centering block exactly as in your example, in fact! Your explanation about the \* definitely makes sense to me though. Is using multiple figures the best solution to this, or are there other solutions? I'm not very well-versed in (La)TeX, if it's not obvious ;)

    – Shamtam
    2 hours ago











  • @Shamtam I added a second suggestion

    – David Carlisle
    1 hour ago














2












2








2







enter image description here



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}

usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

begin{document}

%pagestyle{fancy}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

vfill

{centering
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}


vfill

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

vfill

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}

}

subsection{The next subsection}

end{document}


You get slightly luckier with centering but really the issue is using \* rather than proper sectioning or item commands. In the scope of centering (and center) \ is really par rather than its usual definition of newline that means it exercises the page breaker, \* adds a nobreak penalty, so if it happens that a page break is considered after the heading a break is prevented there because of the * but a zero penalty break is available before the first image due to the vfill being available to fill the space, so TeX takes that page break rather than looking ahead.





A perhaps better markup avoiding using explicit spacing font changes and \ in favour of the more idiomatic latex caption markup would be



enter image description here



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}

usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe,float}

begin{document}

%pagestyle{fancy}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}
end{figure}

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}
end{figure}

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{figure}



subsection{The next subsection}

end{document}


You can use the facilities of the float (and related caption) to customise the caption formatting as required.






share|improve this answer















enter image description here



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}

usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

begin{document}

%pagestyle{fancy}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

vfill

{centering
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}


vfill

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

vfill

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}

}

subsection{The next subsection}

end{document}


You get slightly luckier with centering but really the issue is using \* rather than proper sectioning or item commands. In the scope of centering (and center) \ is really par rather than its usual definition of newline that means it exercises the page breaker, \* adds a nobreak penalty, so if it happens that a page break is considered after the heading a break is prevented there because of the * but a zero penalty break is available before the first image due to the vfill being available to fill the space, so TeX takes that page break rather than looking ahead.





A perhaps better markup avoiding using explicit spacing font changes and \ in favour of the more idiomatic latex caption markup would be



enter image description here



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}

usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe,float}

begin{document}

%pagestyle{fancy}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}
end{figure}

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}
end{figure}

begin{figure}[H]
centering
caption{Some title text}
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{figure}



subsection{The next subsection}

end{document}


You can use the facilities of the float (and related caption) to customise the caption formatting as required.







share|improve this answer














share|improve this answer



share|improve this answer








edited 1 hour ago

























answered 2 hours ago









David CarlisleDavid Carlisle

493k4111371885




493k4111371885













  • Yes, it's definitely (un)luck. In my actual document, I'm using a localized centering block exactly as in your example, in fact! Your explanation about the \* definitely makes sense to me though. Is using multiple figures the best solution to this, or are there other solutions? I'm not very well-versed in (La)TeX, if it's not obvious ;)

    – Shamtam
    2 hours ago











  • @Shamtam I added a second suggestion

    – David Carlisle
    1 hour ago



















  • Yes, it's definitely (un)luck. In my actual document, I'm using a localized centering block exactly as in your example, in fact! Your explanation about the \* definitely makes sense to me though. Is using multiple figures the best solution to this, or are there other solutions? I'm not very well-versed in (La)TeX, if it's not obvious ;)

    – Shamtam
    2 hours ago











  • @Shamtam I added a second suggestion

    – David Carlisle
    1 hour ago

















Yes, it's definitely (un)luck. In my actual document, I'm using a localized centering block exactly as in your example, in fact! Your explanation about the \* definitely makes sense to me though. Is using multiple figures the best solution to this, or are there other solutions? I'm not very well-versed in (La)TeX, if it's not obvious ;)

– Shamtam
2 hours ago





Yes, it's definitely (un)luck. In my actual document, I'm using a localized centering block exactly as in your example, in fact! Your explanation about the \* definitely makes sense to me though. Is using multiple figures the best solution to this, or are there other solutions? I'm not very well-versed in (La)TeX, if it's not obvious ;)

– Shamtam
2 hours ago













@Shamtam I added a second suggestion

– David Carlisle
1 hour ago





@Shamtam I added a second suggestion

– David Carlisle
1 hour ago











1














I am not sure what you mean "flexible white space" but you could define a new command that would use vspace with a predefined "flexible length".



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}
usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

newlength{mylength}
setlength{mylength}{20pt plus 10pt minus 5pt}
newcommand{myskip}{vspace{mylength}}
begin{document}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

myskip

begin{center}
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}

myskip

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

myskip

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{center}

subsection{The next subsection}

end{document}


PS: Not sure if I understood the question, so, feel free to ask me to delete it.






share|improve this answer
























  • Apologies for my poor explanation. By "flexible white space" I mean a white-space that expands to fill the vbox it's contained in, e.g. if I have two paragraphs with a vfill between them, the top paragraph will anchor to the top of the page, and the second to the bottom. My problem is that if I use something like vspace{0.1in plus 1fil}, instead of breaking after the first image, it breaks before the first image instead.

    – Shamtam
    2 hours ago











  • Thanks for explaining... I could not see the reason of that vfill before. Deleting the answer in 5'

    – koleygr
    2 hours ago











  • @koleygr don't delete I was just going to tell the OP to do this!

    – David Carlisle
    2 hours ago













  • @DavidCarlisle... I think that this answer doesn't help him with the request of having figures only on top and bottom... If the figures are small enough they could leave empty space at the bottom and thus the answer doesn't give the required output. (Already upvoted your answer but this one will just waste the time of future readers)

    – koleygr
    2 hours ago













  • @koleygr my answer isn't an answer at all really I just changed center to centering which affects the space before the first image and then gets luck with the page breaks in this example. Perhaps we both delete and let someone else have a go:-)

    – David Carlisle
    2 hours ago
















1














I am not sure what you mean "flexible white space" but you could define a new command that would use vspace with a predefined "flexible length".



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}
usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

newlength{mylength}
setlength{mylength}{20pt plus 10pt minus 5pt}
newcommand{myskip}{vspace{mylength}}
begin{document}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

myskip

begin{center}
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}

myskip

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

myskip

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{center}

subsection{The next subsection}

end{document}


PS: Not sure if I understood the question, so, feel free to ask me to delete it.






share|improve this answer
























  • Apologies for my poor explanation. By "flexible white space" I mean a white-space that expands to fill the vbox it's contained in, e.g. if I have two paragraphs with a vfill between them, the top paragraph will anchor to the top of the page, and the second to the bottom. My problem is that if I use something like vspace{0.1in plus 1fil}, instead of breaking after the first image, it breaks before the first image instead.

    – Shamtam
    2 hours ago











  • Thanks for explaining... I could not see the reason of that vfill before. Deleting the answer in 5'

    – koleygr
    2 hours ago











  • @koleygr don't delete I was just going to tell the OP to do this!

    – David Carlisle
    2 hours ago













  • @DavidCarlisle... I think that this answer doesn't help him with the request of having figures only on top and bottom... If the figures are small enough they could leave empty space at the bottom and thus the answer doesn't give the required output. (Already upvoted your answer but this one will just waste the time of future readers)

    – koleygr
    2 hours ago













  • @koleygr my answer isn't an answer at all really I just changed center to centering which affects the space before the first image and then gets luck with the page breaks in this example. Perhaps we both delete and let someone else have a go:-)

    – David Carlisle
    2 hours ago














1












1








1







I am not sure what you mean "flexible white space" but you could define a new command that would use vspace with a predefined "flexible length".



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}
usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

newlength{mylength}
setlength{mylength}{20pt plus 10pt minus 5pt}
newcommand{myskip}{vspace{mylength}}
begin{document}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

myskip

begin{center}
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}

myskip

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

myskip

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{center}

subsection{The next subsection}

end{document}


PS: Not sure if I understood the question, so, feel free to ask me to delete it.






share|improve this answer













I am not sure what you mean "flexible white space" but you could define a new command that would use vspace with a predefined "flexible length".



documentclass[letterpaper,10pt,article,oneside,openany]{memoir}
usepackage[T1]{fontenc}
usepackage[margin=0.8in]{geometry}
usepackage[utf8]{inputenc}
usepackage{mwe}

newlength{mylength}
setlength{mylength}{20pt plus 10pt minus 5pt}
newcommand{myskip}{vspace{mylength}}
begin{document}

mainmatter

section{A section}

subsection{the first subsection}

Some text here

myskip

begin{center}
textbf{Some title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-a}

myskip

textbf{More title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-b}

myskip

textbf{Even more title text} \*
includegraphics[width=0.75textwidth,keepaspectratio]{example-image-c}
end{center}

subsection{The next subsection}

end{document}


PS: Not sure if I understood the question, so, feel free to ask me to delete it.







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 hours ago









koleygrkoleygr

12k11038




12k11038













  • Apologies for my poor explanation. By "flexible white space" I mean a white-space that expands to fill the vbox it's contained in, e.g. if I have two paragraphs with a vfill between them, the top paragraph will anchor to the top of the page, and the second to the bottom. My problem is that if I use something like vspace{0.1in plus 1fil}, instead of breaking after the first image, it breaks before the first image instead.

    – Shamtam
    2 hours ago











  • Thanks for explaining... I could not see the reason of that vfill before. Deleting the answer in 5'

    – koleygr
    2 hours ago











  • @koleygr don't delete I was just going to tell the OP to do this!

    – David Carlisle
    2 hours ago













  • @DavidCarlisle... I think that this answer doesn't help him with the request of having figures only on top and bottom... If the figures are small enough they could leave empty space at the bottom and thus the answer doesn't give the required output. (Already upvoted your answer but this one will just waste the time of future readers)

    – koleygr
    2 hours ago













  • @koleygr my answer isn't an answer at all really I just changed center to centering which affects the space before the first image and then gets luck with the page breaks in this example. Perhaps we both delete and let someone else have a go:-)

    – David Carlisle
    2 hours ago



















  • Apologies for my poor explanation. By "flexible white space" I mean a white-space that expands to fill the vbox it's contained in, e.g. if I have two paragraphs with a vfill between them, the top paragraph will anchor to the top of the page, and the second to the bottom. My problem is that if I use something like vspace{0.1in plus 1fil}, instead of breaking after the first image, it breaks before the first image instead.

    – Shamtam
    2 hours ago











  • Thanks for explaining... I could not see the reason of that vfill before. Deleting the answer in 5'

    – koleygr
    2 hours ago











  • @koleygr don't delete I was just going to tell the OP to do this!

    – David Carlisle
    2 hours ago













  • @DavidCarlisle... I think that this answer doesn't help him with the request of having figures only on top and bottom... If the figures are small enough they could leave empty space at the bottom and thus the answer doesn't give the required output. (Already upvoted your answer but this one will just waste the time of future readers)

    – koleygr
    2 hours ago













  • @koleygr my answer isn't an answer at all really I just changed center to centering which affects the space before the first image and then gets luck with the page breaks in this example. Perhaps we both delete and let someone else have a go:-)

    – David Carlisle
    2 hours ago

















Apologies for my poor explanation. By "flexible white space" I mean a white-space that expands to fill the vbox it's contained in, e.g. if I have two paragraphs with a vfill between them, the top paragraph will anchor to the top of the page, and the second to the bottom. My problem is that if I use something like vspace{0.1in plus 1fil}, instead of breaking after the first image, it breaks before the first image instead.

– Shamtam
2 hours ago





Apologies for my poor explanation. By "flexible white space" I mean a white-space that expands to fill the vbox it's contained in, e.g. if I have two paragraphs with a vfill between them, the top paragraph will anchor to the top of the page, and the second to the bottom. My problem is that if I use something like vspace{0.1in plus 1fil}, instead of breaking after the first image, it breaks before the first image instead.

– Shamtam
2 hours ago













Thanks for explaining... I could not see the reason of that vfill before. Deleting the answer in 5'

– koleygr
2 hours ago





Thanks for explaining... I could not see the reason of that vfill before. Deleting the answer in 5'

– koleygr
2 hours ago













@koleygr don't delete I was just going to tell the OP to do this!

– David Carlisle
2 hours ago







@koleygr don't delete I was just going to tell the OP to do this!

– David Carlisle
2 hours ago















@DavidCarlisle... I think that this answer doesn't help him with the request of having figures only on top and bottom... If the figures are small enough they could leave empty space at the bottom and thus the answer doesn't give the required output. (Already upvoted your answer but this one will just waste the time of future readers)

– koleygr
2 hours ago







@DavidCarlisle... I think that this answer doesn't help him with the request of having figures only on top and bottom... If the figures are small enough they could leave empty space at the bottom and thus the answer doesn't give the required output. (Already upvoted your answer but this one will just waste the time of future readers)

– koleygr
2 hours ago















@koleygr my answer isn't an answer at all really I just changed center to centering which affects the space before the first image and then gets luck with the page breaks in this example. Perhaps we both delete and let someone else have a go:-)

– David Carlisle
2 hours ago





@koleygr my answer isn't an answer at all really I just changed center to centering which affects the space before the first image and then gets luck with the page breaks in this example. Perhaps we both delete and let someone else have a go:-)

– David Carlisle
2 hours ago










Shamtam is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Shamtam is a new contributor. Be nice, and check out our Code of Conduct.













Shamtam is a new contributor. Be nice, and check out our Code of Conduct.












Shamtam is a new contributor. Be nice, and check out our Code of Conduct.
















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%2f478309%2fsimultaneous-flexible-vertical-space-with-page-breaks%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

Installing LyX: “No textclass is found.”LyX installation error- text class not found- 'Reconfigure' or...

(1602) Indiana Índice Designación y nombre Características orbitales Véase...

Universidad Autónoma de Occidente Índice Historia Campus Facultades Programas Académicos Medios de...