1

Compiling the following documents throws an error: "! Paragraph ended before \@sect was complete." I just want to add an alternative name to the table of contents and have no idea why this should be a problem using multicol :-)

\documentclass[%
paper=B5,%
]{scrbook}%
\usepackage{multicol}

\begin{document}

\begin{multicols}{2}[\section[test]{Test}]

Test

\end{multicols}

\end{document}
  • 2
    You have to use a {} pair around the [] of \section macro, i.e. \begin{multicols}{2}[\section{[test]}{Test}], since LaTeX's \@ifnextchar macro is confused about the wrapped [ and it ends prematurely –  Mar 29 '18 at 11:35
  • aha, that works (actually putting braces around the complete \section[]{}, too). But why? :-) – Ferdinand Kern Mar 29 '18 at 11:36
  • It is actually explained in the linked question/answer –  Mar 29 '18 at 11:39
  • aha, somehow it wasn't displayed some seconds ago. thank you so much :-) – Ferdinand Kern Mar 29 '18 at 11:44
  • Actually I meant the first ] is the cause of premature ending –  Mar 29 '18 at 12:14

0 Answers0