0

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

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
0

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

Result:

enter image description here

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.