2

I'm am using the multicols environment in a subsubsection. But in the Output in prints the Title of the subsubsection on a different page than the content, i.e. the multicols text. already tried \nopagebreak and \begin{samepage} - \end{samepage} but nothing works. I just want the title to be with the content as it usually works in LaTeX.

%text
\end{multicols}
\subsubsection{Konzentrationsmaße}
\begin{multicols}{2}
%text

enter image description here

  • Welcome to TeX.SX! Why are you ending and restarting multicols? – egreg Mar 2 '16 at 0:29
  • Because otherwise the title will be in one of the columns. I want the title to be above the columns, so exactly the way it looks in the picture. I only want the title to be with the content. I also want the line in the middle to break etc. – KatyFisch Mar 2 '16 at 1:08
  • \begin{multicols}{2}[\subsubsection{Konzentrationsmaße}] – egreg Mar 2 '16 at 7:14
  • well, that helps a little bit. But it will still write the title on the bottom of the page, then start the line in the middle even though there is not enough space to write in any content and then the next page looks exactly the same. – KatyFisch Mar 2 '16 at 7:44
2

The start of a multicols environment is a valid page breakpoint. If you like to have material in front of the environment attached to the environment you need to place it into the first optional argument which is provided for this purpose. However, that may not be enough if that material is large because then multicols may start only to find that there is not enough space left to actually generate columns.

The solution to that is to request to multicols to start only if there is a minimal amount of space left on the page and otherwise generate a page break. This minimal amount needs to include the amount taken up by the first optional argument. So a solution to your problem would be something like

\begin{multicols}{2}[\subsubsection{Konzentrationsmaße}][7\baselineskip] 

which (assuming your heading and separation takes roughly 3 lines) means you have at least 4 lines in the multicol columns. You may need an even larger value here given that your column material contains large displays near the beginning.

See the multicol.pdf documentation for details.

  • Thank you, now it works :) Next time I'll read the manual first, sorry^^ – KatyFisch Mar 2 '16 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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