1

MWE:

\documentclass[11pt]{book}
\usepackage{paracol}

\begin{document}

\begin{paracol}{2}

    \switchcolumn[1]* \section*{Heading in Language 1}
    \switchcolumn[0]  \section*{Heading in Language 2}

    \begin{enumerate}
        \switchcolumn[1]* \item Text in language 1
        \switchcolumn[0]  \item Text in language 2
            \begin{itemize}
                \item \switchcolumn[1]* Why does this spill over? Shouldn't it wrap?
                \item \switchcolumn[0]  Why does this spill over? It shouldn't go into margins.
            \end{itemize}
        \switchcolumn[1]* \item More text in language 1
        \switchcolumn[0]  \item More text in language 2
        \switchcolumn[1]* \item Yet more text in language 1
        \switchcolumn[0]  \item Yet more text in language 2
    \end{enumerate}

\end{paracol}

\end{document}

Output:

enter image description here

How do I change the column width of the itemize environment and prevent it from spilling over?

2 Answers 2

3

Again, your MWE violates the rule "don't do \switchcolumn in a list-like environments (enumerate, itemize, etc.) included in paracol." The following obeys the rule and thus works well.

    \begin{enumerate}
      \begin{paracol}{2}
        \switchcolumn[1]* \item ...
        \switchcolumn[0]  \item ...
        \switchcolumn[1]*
          \begin{itemize} \item ...
          \end{itemize}
        \switchcolumn[0]
          \begin{itemize} \item ...
          \end{itemize}
        \switchcolumn[1]* \item ...
        \switchcolumn[0]  \item ...
        \switchcolumn[1]* \item ...
        \switchcolumn[0]  \item ...
     \end{paracol}
    \end{enumerate}

If you have two or more \item-s to be aligned in the itemize environment, you need to do some dirty trick to have proper inter-\item spaces. For example, with the following \def-initions in your preamble;

    \makeatlatter
    \def\FirstList{\@topsepadd\z@}
    \def\MidList{\@newlistfalse \@topsepadd\z@}
    \def\LastList{\@newlistfalse}
    \makeatother

you'll have proper spaces by adding one of them to \begin{itemize} as follows.

    \begin{itemize}\Firstlist % for the first chunk
    \begin{itemize}\MidList   % for non-first/non-last chunks
    \begin{itemize}\LastList  % for the last chunk
1

Use \usepackage{enumitem} and add something like [rightmargin=\leftmargin] at the end of \begin{itemize}.

Result:

enter image description here

2
  • Trying this with enumerate instead of itemize (but also with itemize), the text of the left column still spills into the numbering (or bullet points) of the right column. Feb 23 at 22:09
  • One more note, by using \selectlanguage and having babel primed to the language I use, I can also minimize the spillover, because now hyphenation works properly. Feb 23 at 23:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .