Generalquestions about \vfill

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
angelixd
Posts: 15
Joined: Thu Jul 26, 2007 4:53 pm

questions about \vfill

Post by angelixd »

Hello everyone,

I'm using \vfill at the end of sections to make sure that all of my content is evenly spaced and flush upwards for consistent reading. However, there are some parts where the content fills the page, and it appears that the \vfill isn't getting processed since there is a subsequent space request ( \vspace{.5in} ), and then content continues on the next page. Is there an way to make it print regardless? I'm looking for something that would behave like one would expect \vfill* to, but I haven't seen any documentation implying that it exists.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

olivares14031
Posts: 10
Joined: Sun Jan 14, 2007 6:48 pm

Re: questions about \vfill

Post by olivares14031 »

If I understand your question correctly, you want \vfill to let you put some stuff right before the end of the page.

Using the following

\vfill

\eject

pushes everything below the \vfill to the next page. However I do not know how to still allow some stuff after it. \vspace{*} might be your answer. Please try it.
angelixd
Posts: 15
Joined: Thu Jul 26, 2007 4:53 pm

Re: questions about \vfill

Post by angelixd »

Hey, thanks for the help. I am using \vfill in the sense you think, but I want everything at the top of the page, not the bottom. I'm using it in conjunction with \pagebreak, which I believe has the same effect. However, I'm going through 100+ page documents, and I would like to find a solution that doesn't require me to find every pagebreak and insert a \vfill. These documents are auto-generated, so every time I make a new one, I have to do this manually, and I'd like to find a solution that doesn't require me to do this every time.

Do you or anyone else know of a way to disable all stretchiness in a file? I'm thinking this may be the fix I'm looking for.
olivares14031
Posts: 10
Joined: Sun Jan 14, 2007 6:48 pm

Re: questions about \vfill

Post by olivares14031 »

Maybe you would be interested in looking at the following page

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=overfull

You can set lengths and emergency lengths as well

\setlength{\emergencystretch}{3em}

Try that and hopefully this helps you out.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

questions about \vfill

Post by localghost »

olivares14031 wrote: Maybe you would be interested in looking at the following page

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=overfull

You can set lengths and emergency lengths as well

\setlength{\emergencystretch}{3em}

Try that and hopefully this helps you out.

The length \emergencystretch is only an additional quantity of blank space serving for a line to be filled out with to avoid overfull or underfull hboxes.

From my point of view a simple \newpage command at the end of the text in a section would to the trick, but i still can't figure out clearly what is requested.
angelixd
Posts: 15
Joined: Thu Jul 26, 2007 4:53 pm

questions about \vfill

Post by angelixd »

Basically, I wanted to remove all vertical stretch in my documents, so that when elements got rendered, everything started rendering at the top. What I've ended up doing is the first portion of what Kaveh Bazargan discussed in this talk: http://www.river-valley.tv/conferences/tex/practex2006/ . Basically, to get a more controlled system, his company redefined all the whitespace elements to be integer multiples of \baselinestretch and removed all glue, so that all spaces are static. Unfortunately, I haven't found all the glue that's causing me problems, but I've found enough so that I only have to put \vfill\eject at the pagebreaks of maybe 10% of the pages.

If you know of any better ways to do this, though, I'd be all ears.
Post Reply