7

With the following code...

\documentclass[draft,10pt,a5paper]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}
\usepackage{parallel}
\setlength\parindent{0pt}

\begin{document}

\section{My Section}  % kill this line and the result is OK

BAD: % or kill this line and the result is ok

\begin{Parallel}{.47\textwidth}{.47\textwidth}
\ParallelLText{Lorem ipsum dolor sit amet.}
\ParallelRText{Sed do eiusmod tempor incididunt ut labore et dolore.}
\end{Parallel}

\bigskip

GOOD:

\begin{Parallel}{.47\textwidth}{.47\textwidth}  % same as above...
\ParallelLText{Lorem ipsum dolor sit amet.}
\ParallelRText{Sed do eiusmod tempor incididunt ut labore et dolore.}
\end{Parallel}

\end{document}

I get this result:

enter image description here

See the blank line between "BAD" and "Lorem ipsum"?

To me, it seems like a parallel bug. I know there are other package for typesetting parallel text, such as paracol or parcolumns, but usually I have better results with parallel (fewer widows for instance).

4
  • Welcome to TeX.SX!
    – mafp
    Commented Jun 3, 2013 at 13:01
  • Placing ~\par\vskip -\baselineskip before the BAD line provides a workaround, but not really a fix. Commented Jun 3, 2013 at 13:09
  • 2
    parallel overwrites the \everypar set by \@afterheading and so \clubpenalty is not reset correctly after the first paragraph ("BAD"). You could add \makeatletter\clubpenalty \@clubpenalty\makeatother before \begin{parallel}. Commented Jun 3, 2013 at 13:14
  • My code for the parallel text is actually inside a macro and the command you mentioned failed with a "spacefactor" error, because of the "@". So I added \clubpenalty=500 before \begin{parallel} (inside the macro), and this fixes the bug. Thanks a lot for your hint, Ulrike!
    – BertS
    Commented Jun 3, 2013 at 14:42

1 Answer 1

3

Package parallel overwrites the \everypar set by \@afterheading and so \clubpenalty is not reset correctly after the first paragraph ("BAD"). You could add \makeatletter\clubpenalty \@clubpenalty\makeatother before \begin{parallel}.

You must log in to answer this question.

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