Parallel texts with header on each page?
The parcolumns
package might be useful here. A MWE follows- there are many options that can be tweaked (such as colwidths
); see the documentation for more examples.
\documentclass{article}
\usepackage{parcolumns}
\usepackage{lipsum}
\begin{document}
\begin{parcolumns}{2}
\colchunk{\section{1st column}
\lipsum }
\colchunk{\section{2nd column}
\lipsum}
\end{parcolumns}
\end{document}
You might also find the following post helpful:
How do I create separate columns in LaTeX without text flow?
Okay, here's a hack that uses atbegshi
to add a header to parcolumns
:
\documentclass{article}
\usepackage{parcolumns}
\usepackage{atbegshi}
\newcommand{\pcheaderfmt}[1]{{\large\sf\textbf{#1}}}
\newcommand{\pcheader}{}
\AtBeginShipout{\pcheader}
\begin{document}
\section{Latin and Piglatin}
\renewcommand{\pcheader}
{\par\noindent\pcheaderfmt{Latin}\hfill\pcheaderfmt{Piglatin}%
\vspace{0.5ex}\hrule\vspace{1.5ex}}
\pcheader
\begin{parcolumns}{2}
%
\colchunk{Latin}
%
\colchunk{Piglatin}
\colplacechunks
%
\colchunk{Latin}
%
\colchunk{Piglatin}
%
\end{parcolumns}
\renewcommand{\pcheader}{}
\section{English and Pigenglish}
\renewcommand{\pcheader}
{\par\noindent\pcheaderfmt{English}\hfill\pcheaderfmt{Pigenglish?}%
\vspace{0.5ex}\hrule\vspace{1.5ex}}
\pcheader
\begin{parcolumns}{2}
%
\colchunk{English}
%
\colchunk{Pigenglish}
%
\end{parcolumns}
\renewcommand{\pcheader}{}
\end{document}
I'm not sure I fully understand the requirements of your question, but it seems to me that you might want to try the longtable
package along with the fancyhdr
package.
\documentclass{article}
\usepackage{longtable}
\usepackage{fancyhdr}
\usepackage{lipsum}
\def\chapterName{}
\def\leftName{}
\def\rightName{}
\newcommand*{\Chapter}[3]{%
\endlongtable%
\gdef\chapterName{#1}%
\gdef\leftName{#2}%
\gdef\rightName{#3}%
%% ELIMINATE THE || characters to remove the vertical rules
\longtable[c]{||p{0.45\textwidth}|p{0.45\textwidth}||}
\multicolumn{2}{c}{\Large\chapterName} \tabularnewline
\textbf{\leftName} & \textbf{\rightName} \endhead
}
\let\Title=\chead
% \renewcommand{\headrulewidth}{0pt} %% OPTIONAL
\begin{document}
\pagestyle{fancy}
\Title{A Polyglot Tale}
\begin{longtable}[c]{||p{0.45\textwidth}|p{0.45\textwidth}||}
\Chapter{The taming of Lipsum}{Language A}{Language B}
\lipsum[1] & \lipsum[2] \\
\lipsum[3] & \lipsum[4] \\
\Chapter{The breaking of Lipsum}{Language C}{Language D}
\lipsum[5] & \lipsum[6] \\
\lipsum[7] & \lipsum[8]
\end{longtable}
\end{document}
This will show "A Polyglot Tale" centered on every page header, then have a running table head of the chapter name, followed by the language names. The one restriction it currently has (baked into longtable
) is that no individual row---which here corresponds to a pair of paragraphs---can span pages. If that is your requirement, then longtable
can't help you. But if that's acceptable, then there's no limit on how long a longtable
can grow...and in any case, this particular solution finishes and restarts the longtable
environment at the close of each chapter. (Also, the various rules are entirely optional; they're there to show the extent of the page and the table.)