1

I recently upgrade MikTex and TexMaker to the latest version (2.9.5840 and 4.5 respectively) for another reason. the problem is that the command \null \vfill before and after column content won't work as the old version I got this in the new version : enter image description here

but a want the result to be as a got in the old version :

enter image description here

I don't know where the problem is because i didn't change anything in the code

thank's for all !

egreg
  • 1,121,712
  • (1) Welcome, (2) This has nothing to do with texmaker as it has nothing to do with the compilation of your document other than starting LaTeX. (3) As long as we do not know anything about your document we cannot help, giving us images does not help much – daleif Apr 20 '16 at 06:45
  • Welcome to TeX.SX! You mean \null\vfill (with f), right?! (would be the typo in your document also?). Would How do I force a column-break in a two-column document? help you? Anyway, the best way to help us help you is to provide a minimal working example (MWE)! – ebosi Apr 20 '16 at 06:51
  • Yep, I'm talking about the \vfill comman, here is my code :

    \documentclass[11pt,a4paper,oneside]{book} \clearpage \begin{multicols}{2} \vfill \null \subsubsection{Vitesse du Vent} bla bla bla ...... \vfill \null \columnbreak \null \vfill \begin{figure}[H] \begin{center} \includegraphics[width=7.5cm]{SatelliteWindSpeedAnalyse.jpeg} \caption{blablalbalbalaba ...... } \end{center} \end{figure} \null \vfill \end{multicols} \clearpage

    – Benallal Mohamed Anis Apr 20 '16 at 07:13

2 Answers2

2

Works fine for me

\documentclass{book}

\usepackage{multicol,lipsum}

\begin{document}
\begin{multicols}{2}
\null
\vfill
\subsubsection{Vitesse du Vent}
\lipsum[1]
\vfill
\null
\columnbreak

\rule{4cm}{0.8\textheight}
\end{multicols}
\end{document}

enter image description here

Edit

As mentioned by egreg in a comment it would be better to use LaTeX-commands instead of the low-level \null. (But he is not right, that a \vfill at the end is enough, one needs \vspace*{\fill} there too.)

\documentclass{book}

\usepackage{multicol,lipsum}

\begin{document}
\begin{multicols}{2}
\vspace*{\fill}
\subsubsection{Vitesse du Vent}
\lipsum[1]
\vspace*{\fill}
\columnbreak

\rule{4cm}{0.8\textheight}
\end{multicols}
\end{document}
Ulrike Fischer
  • 327,261
  • thanks !! the problem was just that we should use \null \vfill before the text and \vfill \null after the text , not \null \vfill before and after .... thank you very much ! – Benallal Mohamed Anis Apr 20 '16 at 07:38
  • 1
    @BenallalMohamedAnis Actually you should use neither \null\vfill nor \vfill\null. The former should be \vspace*{\fill}, the latter can simply be \vfill. – egreg Apr 20 '16 at 08:48
2

Last year I fixed the incorrect handling of vertical space at the end of columns: a space there should get removed unless it is explicitly requested which wasn't the case in all circumstances. From the changelog:

2015-03-31 Frank Mittelbach  <Frank.Mittelbach@latex-project.org>

    * multicol.dtx: Another rewrite of \remove@discardable@items to
    capture the case of \vspace (remove) and \vspace* (keep) correctly

2015-03-23  Frank Mittelbach  <latex-bugs@latex-project.org>

    * multicol.dtx: Detect when columns get too large during balancing
    because the user requested more forced breaks than available
    columns.

    Fixed the logic for removing excess white space at column bottoms
    (this is a source of trouble for sure)

So in the past \null\vfill at the end may have survived, while it would have been correct to remove the \vfill. These days it is removed. Moving the box after the fill at this point hides it so it stays.

However, as pointed out, the correct LaTeX command would be \vsapce*{\fill} --- that works correctly above and below.