Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In my previous question, I asked about a problem with vertical alignment at the bottom of the page; the solution (provided by egreg) was simple and obvious. However, here is a less-minimal example (i.e., one closer to my real problem), including multicols environment. The problem (again) is that even a really infinitely stretchable glue won't help move the two-column text down, so that its bottom is aligned with other pages. Any hints?

\documentclass[12pt]{article}

\usepackage{vgrid}% here only to help visualize the problem
\usepackage{multicol}
\setlength{\multicolsep}{0pt}
\usepackage[height=11\baselineskip,paperheight=20\baselineskip]{geometry}
\usepackage{lipsum}

\begin{document}
\flushbottom
\lipsum[1-2]

\vskip 0pt plus 1filll
{\begin{multicols}{2}\footnotesize
\lipsum[2-3]
\par\end{multicols}}

\end{document}
share|improve this question

2 Answers 2

up vote 5 down vote accepted

Your problem has only partially to do with the way multicols handles spacing, there are a bunch of issues and unfortunately some that you will get no automatic answer for.

You are asking for 11\baselineskip of height which gets you 159.5pt. However on a page the first line has a height of \topskip which is 12pt (not 14.5pt).

Now as your first page consists of a single paragraph there is nothing in there to stretch, therefore the page comes out short and you get a warning saying:

Underfull \vbox (badness 10000) has occurred while \output is active [1{...

You could see that this pages is coming out short if you actually put in anything that is allowed to stretch, e.g., a second paragraph. To repar that you would need to substract 2.5pt from your calculated \textheight (or use the geometry option that does this for you --- I think there is one).

However if you do this nothing will get better on the second page, unfortunately. The reason is the following:

  • the multicols environment starts somewhere on that page
  • the stuff above (including your \vskip) is measured and saved away in some box (therefore your \vskip is considered to be 0pt and the 1filll is not going to make a difference whatsoever later on
  • from that the remaining space is calculated (you can see this if you use the balancingshow option of multicol), i.e.,

    Package multicol: Starting environment with 2 columns on input line 25.

    Package multicol: Current page: (multicol) height=157.0pt: used 101.33331pt -> free=55.66669pt (multicol) needed 50.0pt (for \premulticols ) on input line 25.

  • So 55.66669pt are remaining on the page and as the environment is not finished when the page gets full all that multicols does is to cut of columns from the galley at the height available. Now 4 lines in \footnotesize (12pt) comes out at 48pt which is 6.66669pt short of the column height target. and you should see another bunch of underfull boxes. However, with multicols doing so much trials the underfull messages are suppressed as most of the trial would give you those. As a result you see no such warning but the fact is that for TeX the column boxes have a nominal height of 55.66669pt at the end of the day even if they are not properly filled. Again to try it out put something like

    xxx\par \lipsum[2-3]

    in there and you will see how the first column changes downwards.

  • Also because the column height is "nominally" making up the rest the two blocks when put together again, just fit and thus the 1fill has nothing to stretch.

So to come out right, you would need to put in the "right" amount of real space, e.g., 6.66669pt (unless I have miscalculated) but that amount differs each time due to the number of lines in a smaller size or due to the depth of the material above.

So basically you are out of luck in that multicols isn't being set up to make this scenario work. I'm a bit wondering about whether or not it can be made to work (or even if some of this could called a bug) and I made a note in my huge list of things to look at "one day". But don't get your hope up --- chances that this gets a fix are slim (especially as any change there will likely have effects on most documents using multicols and if so that would rule it out)

share|improve this answer
2  
There is the option for geometry: lines=14 –  egreg Jun 13 at 11:01
1  
Thanks a lot for the explanation! At least I know that I'll have to fix this manually (that's what I did anyway). And I hope that the LaTeX3 output routine will handle such things...;) –  mbork Jun 13 at 21:36
\documentclass[12pt]{article}

\usepackage{vgrid}% here only to help visualize the problem
\usepackage{multicol}
\setlength{\multicolsep}{0pt}
\usepackage[height=11\baselineskip,paperheight=20\baselineskip]{geometry}
\usepackage{lipsum}

\begin{document}
\flushbottom
\lipsum[1-2]

\setlength\multicolsep{2\baselineskip minus \baselineskip}
{\begin{multicols}{2}\footnotesize
\lipsum[2-3]
\par\end{multicols}}

\end{document}
share|improve this answer
    
Thanks, but it doesn't work here... I changed [2-3] to [2-10] and the pages are still "ragged". –  mbork Jun 12 at 17:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.