Page LayoutPackage paracol: no parallel texts, inserts blank pages

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Caslon Palatino
Posts: 4
Joined: Sun Dec 19, 2021 11:53 pm

Package paracol: no parallel texts, inserts blank pages

Post by Caslon Palatino »

I am attempting to create a critical edition with parallel texts in two languages. The paracol package seems to create all the left pages first with facing blank right pages, then all the right pages with facing blank left pages. The Contents page is followed by 3 blank pages with "Contents" in the header. Following is an MWE with lorem ipsum text. What am I coding wrong?

Code: Select all

% Preamble
\documentclass{book}

\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{tocloft} 
\usepackage{paracol}
\usepackage{emptypage}
\usepackage{lipsum}

\begin{document}
	
\frontmatter

% Title page
\title{Parallel Texts}
\author{Castor and Pollux}
\date{495 B.C.}
\maketitle	

% Contents page
\tableofcontents

% Foreword
\begin{paracol}[1]*{2}
	\switchcolumn
	\begin{leftcolumn}
		\chapter{Foreword}
		\lipsum[1-1]
	\end{leftcolumn}
	\switchcolumn
	\begin{rightcolumn}
		\chapter*{Foreword}
		\lipsum[1-1]
	\end{rightcolumn}
	\switchcolumn
\end{paracol}

\mainmatter

\begin{paracol}[1]*{2}
	\switchcolumn
	\begin{leftcolumn}
		\chapter{Chapter First}
		\lipsum[2-4]
	\end{leftcolumn}
	\switchcolumn
	\begin{rightcolumn}
		\chapter*{Chapter First}
		\lipsum[2-4]
	\end{rightcolumn}
	\switchcolumn
\end{paracol}

\backmatter

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Package paracol: no parallel texts, inserts blank pages

Post by Stefan Kottwitz »

Hi Caslon,

welcome to the forum!

I noticed three things here:
  • I would use \begin{paracol}{2}, you had [1]*{2} here.
  • I guess you don't need \switchcolumn if you have leftcolumn and rightcolumn environments already.
  • \chapter makes a page break even if you are in a column.
Compare:

Code: Select all

% Preamble
\documentclass{book}

\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{tocloft} 
\usepackage{paracol}
\usepackage{emptypage}
\usepackage{lipsum}

\begin{document}
	
\frontmatter

% Title page
\title{Parallel Texts}
\author{Castor and Pollux}
\date{495 B.C.}
\maketitle	

% Contents page
\tableofcontents

% Foreword
\begin{paracol}{2}
	\switchcolumn
	\begin{leftcolumn}
		\section*{Foreword}
		\lipsum[1-1]
	\end{leftcolumn}
	%\switchcolumn
	\begin{rightcolumn}
		\section*{Foreword}
		\lipsum[1-1]
	\end{rightcolumn}
	\switchcolumn
\end{paracol}

\mainmatter

\begin{paracol}{2}
	\switchcolumn
	\begin{leftcolumn}
		\section*{Chapter First}
		\lipsum[2-4]
	\end{leftcolumn}
	%\switchcolumn
	\begin{rightcolumn}
		\section*{Chapter First}
		\lipsum[2-4]
	\end{rightcolumn}
	\switchcolumn
\end{paracol}

\backmatter

\end{document}
Stefan
LaTeX.org admin
Caslon Palatino
Posts: 4
Joined: Sun Dec 19, 2021 11:53 pm

Package paracol: no parallel texts, inserts blank pages

Post by Caslon Palatino »

Dear Mr. Kottwitz:

Many thanks for your suggestions!

My question should have explained that my goal is facing pages: left columns on left pages that face right columns on right pages. You recommended removing the /switchcolumn commands. That worked.

Footnote: The book is a translated novel. It has named chapters. No sections.
  • Thus: \begin{paracol}[1]*{2} is what puts left columns on left pages and right columns on right pages.

    Removing the \switchcolumn commands removed the unwanted blank pages.

    Because I cannot use \chapter with the paracol package, the script cannot automatically create entries for the table of contents. I have added \contentsline commands to write the Contents page.
Thank you again.

Fixed code below:

% Preamble
\documentclass[openany]{book}

\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\usepackage{tocloft}
\renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}} % for parts
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % for chapters
%\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}} % for sections, if you really want! (It is default in report and book class (So you may not need it).


\usepackage{paracol}
\usepackage{emptypage}
\usepackage{lipsum}

\begin{document}

\frontmatter

% Title page
\title{Parallel Texts}
\author{Castor and Pollux}
\date{495 B.C.}
\maketitle
\cleardoublepage
\newpage

% Contents page
\tableofcontents
\contentsline {chapter}{Foreword}{v}{}%
\contentsline {chapter}{\numberline {I}Chapter First}{10}{}%
\cleardoublepage
%\newpage

% Foreword
\setcounter{page}{6}

\begin{paracol}[1]*{2}
%\switchcolumn % Not needed if use leftcolumn and rightcolumn.
\begin{leftcolumn}
\section*{Foreword}
\lipsum[20-25]
\end{leftcolumn}
%\switchcolumn % Not needed if use leftcolumn and rightcolumn.
\begin{rightcolumn}
\section*{Foreword}
\lipsum[21-26]
\end{rightcolumn}
%\switchcolumn % Not needed if use leftcolumn and rightcolumn.
\end{paracol}
\cleardoublepage
\newpage

% Named chapters
\mainmatter
\setcounter{page}{8}

\begin{paracol}[1]*{2}
%\switchcolumn % Not needed if use leftcolumn and rightcolumn.
\begin{leftcolumn}
\section*{Chapter First}
\lipsum[2-8]
\end{leftcolumn}
%\switchcolumn % Not needed if use leftcolumn and rightcolumn.
\begin{rightcolumn}
\section*{Chapter First}
\lipsum[3-9]
\end{rightcolumn}
%\switchcolumn % Not needed if use leftcolumn and rightcolumn.
\end{paracol}

\backmatter

\end{document}
Post Reply