3

How do I make paracol's first column on the left side of even pages and on the right side of odd pages (and vice versa for paracol's second column)?

Even pages:

| Column #1 | Column #2 |
|           |           |
|           |           |

Odd pages:

| Column #2 | Column #1 |
|           |           |
|           |           |

Do I have to use conditionals (e.g., \makeatletter\ifodd\c@page)?

3
  • Hmm, having a quick look through the manual, I think you have to use conditionals
    – user156344
    Commented Apr 16, 2019 at 10:44
  • @JouleV It would seem a bit tricky to account for breaks in ¶s between pages.
    – Geremia
    Commented Apr 16, 2019 at 14:28
  • 2
    can you provide a test document... Commented Apr 16, 2019 at 19:20

1 Answer 1

3
+50

No, you don't have to use conditionals. paracol has the option/command \twosided for that, which, according to what is written in the manual in p. 18 supersedes \swapcolumninevenpages (which is how I found this command, i.e. even though \swapcolumninevenpages is lengthy it describes more clearly what this does). This is illustrated in the following MWE where the Y column is left/right depending on whether the page number is even/odd.

\documentclass[12pt,a4paper]{book}
\usepackage{paracol}
\newcounter{dummy}
\newcommand{\dummycolumn}[2]{\setcounter{dummy}{0}%
    \loop
    #1\stepcounter{dummy}\par
    \ifnum\number\value{dummy}<#2
    \repeat}

\begin{document}
\twosided
\begin{paracol}{2}
 \dummycolumn{X}{200}
\switchcolumn
 \dummycolumn{Y}{200}
\end{paracol}
\end{document}

enter image description here

You must log in to answer this question.

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