3

I have a bilingual text in two columns using paracol. I want to number them in parallel while using switchcolumn commands, as shown below. How can I do this?

enter image description here

\documentclass[10pt,a4paper]{article}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage[T1]{fontenc}
\usepackage{paracol}

\begin{document}
I want this,
\begin{paracol}{2} 
    \begin{enumerate}
        \item Item.
        \item Item

\end{enumerate}
\switchcolumn
\begin{enumerate}
    \item Item.
    \item Item 2.
\end{enumerate}
\end{paracol}
which is tedious.

\vspace{2cm}
I do not want this:
\begin{paracol}{2} 
\begin{enumerate}
    \item Item.
    \switchcolumn
    \item Item.
    \switchcolumn*

    \item Item.
    \switchcolumn
    \item Item 2.
\end{enumerate}
\end{paracol}

\end{document}

======= Edit =====

The problem with the first is that, when the second column has a much longer text, the next numbers in the two columns do not start at the same level, as shown below: enter image description here

I want the two lists to be always at the same level.

usr203050
  • 373
  • 4
  • 16

2 Answers2

2

This is not an all-automatic solution, but it seems to work:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage[T1]{fontenc}
\usepackage{paracol, calc, blindtext}

\globalcounter{enumi}
\newcommand{\switchenum}{\setcounter{enumi}{\theenumi-1}\switchcolumn}



    \begin{document}

\vspace{2cm}

Some text.

\begin{paracol}{2} 
\begin{enumerate}
    \item Item left
    \switchenum
    \item \blindtext

    \switchcolumn*

    \item Second Item left
    \switchenum
    \item Second Item right
\end{enumerate}
\end{paracol}

Just to look for sideeffects:

\begin{paracol}{2} 
\begin{enumerate}
    \item Item left
    \switchenum
    \item Item right
    \switchcolumn

    \item Second Item left
    \switchenum
    \item Second Item right
\end{enumerate}\setcounter{enumi}{0}
\end{paracol}


\end{document}

screenshot of result

Keks Dose
  • 30,892
  • Works for me to, but I've changed the command a bit to allow for custom enumerate labels \newcommand{\switchenum}{\setcounter{enumi}{\arabic{enumi}-1}\switchcolumn} – dietervdf Oct 16 '17 at 20:04
1

Each column has separate enumi counters, but \begin{enumerate} only sets one of them to zero. One can use \synccounter{enumi} to fix this.

Note that some packages use different counters than enumi, enumii, etc.

\documentclass[10pt,a4paper]{article}
\usepackage{paracol}

\begin{document}
\noindent I do not want this:\setcounter{enumi}{6}%
\begin{paracol}{2} 
\begin{enumerate}
    \item Item.
    \switchcolumn
    \item Item.
    \switchcolumn*
    \item Item.
    \switchcolumn
    \item Item 2.
\end{enumerate}
\end{paracol}
I want this:
\begin{paracol}{2} 
\begin{enumerate}\synccounter{enumi}
    \item Item.
    \switchcolumn
    \item Item.
    \switchcolumn*
    \item Item.
    \switchcolumn
    \item Item 2.
\end{enumerate}
\end{paracol}

\end{document}

demo

John Kormylo
  • 79,712
  • 3
  • 50
  • 120