3

I want to make a command for translated text. My wish is to have two columns facing each other : the original on the left and the translated on the right, with the informations about the text beyond.

I have made two kinds of commands, which are working quite well, except when the text is too long, or when there is a page break in the text :

  • \kt is using the multicol package, whith the pagebreak I have the original text on both columns in the first page, and the translation begins on the second page, so they are not in front of each other.

  • \ktt is using a table environment, but to avoid pagebreak in the table, it will move the translated text further, and not respect the order I want to write in (even with [h!]). In my MWE for instance : I have written

    1. a normal paragraph,
    2. the translated text,
    3. a bold paragraph,

but the document shows the order 1,3,2 (normal, bold, translation) with a big blank.

\documentclass[12pt,a4paper,final]{report}

\usepackage[utf8]{inputenc}
\usepackage[frenchb]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[babel=true]{csquotes}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{relsize}

\newcommand{\kt}[5]{\begin{quote} \begin{singlespace} \begin{multicols}{2}
\smaller \og {\itshape  #4} \fg \vfill \columnbreak #5
\begin{flushright} #2, p. #1, trad. #3 \end{flushright} % normally I have \cite[#1]{#2}
\end{multicols} \end{singlespace} \end{quote}}

\newcommand{\ktt}[5]{%
\begin{table}[h!]
\centering
\begin{singlespace}
\begin{tabular}{p{0.43\textwidth}p{0.43\textwidth}}
\smaller \enquote{{\itshape #4}} (#2, p. #1) & \smaller #5 (#3)\\  % normally I have \cite[#1]{#2}
\end{tabular}
\end{singlespace}
\end{table}}

\begin{document}
\lipsum[1-3]
\kt{PAGE}{BOOK}{TRANSLATOR}{\lipsum[1-2]}{\lipsum[1-2]}

\pagebreak
\lipsum[1]
\ktt{PAGE}{BOOK}{TRANSLATOR}{\lipsum[1-2]}{\lipsum[1-2]}
\textbf{\lipsum[2]}

\end{document}

I think two kinds of solutions are possible :

  • using the multicol command, something to force the second columns to begin in front of the first one, even with a pagebreak
  • for the table environment, something to allow pagebreak and to force it to follow the order.

I've tried to use the longtable package, with this code for \ktt, but it doesn't change anything, maybe I'm not using it well :

\newcommand{\ktt}[5]{%
\begin{table}[h!]
\centering
\begin{singlespace}
\begin{longtable}{p{0.43\textwidth}p{0.43\textwidth}}
\smaller \enquote{{\itshape #4}} (#2, p. #1) & \smaller #5 (#3)\\  % normally I have \cite[#1]{#2}
\end{longtable}
\end{singlespace}
\end{table}}

Thanks if someone can help.

Two small words :

  • \lipsum gives me a bracket issue, but I don't have it with normal text instead, so it is not relevant here.

  • I have modified the command to avoid the \cite for #1 and #2, so that I don't have to add some bibliographic references in the MWE.

EDIT :

Thank you Arash and touhami. I've tried diffrent packages, and finally used paracol. As the two columns were inserted in a "quote" environment, I needed to use a negative value for \setlength{\columnsep}{...}, trying to adjust it to my needs.

But I have new problems now : the two columns were printed under the footnotes.

MWE of the columns under the footnotes

\documentclass[12pt,a4paper,final]{report}

\usepackage[utf8]{inputenc}
\usepackage[frenchb]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[babel=true]{csquotes}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{relsize}
\usepackage{paracol}

\newcommand{\kt}[5]{
\begin{quote}
\setlength{\columnsep}{-.12\textwidth}
\begin{paracol}{2}
\begin{singlespace}
\sloppy \smaller \og {\itshape  #4} \fg (#2, p. #1) \switchcolumn #5 (#3) % normally I have \cite[#1]{#2}
\end{singlespace}
\end{paracol}
\end{quote}
}

\begin{document}
\lipsum[1-3]\footnote{foo}
\kt{PAGE}{BOOK}{TRANSLATOR}{\lipsum[1]}{\lipsum[1]}
\end{document}

I've seen the problem there : Footnote problem using paracol package. I've pasted the code given by David-Carlisle in his answer, even if I don't understand it really, and now the footnotes have disappeared on the concerned pages.

MWE of the disappeared footnotes :

\documentclass[12pt,a4paper,titlepage,final]{report}

\usepackage[utf8]{inputenc}
\usepackage[frenchb]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[babel=true]{csquotes}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{relsize}
\usepackage{paracol}

\makeatletter
\newbox\mybox
\def\pcol@makenormalcol{%
  \ifvoid\footins 
  \else
\global\setbox\mybox\box\footins
   \fi
\setbox\@outputbox\box\@holdpg
  \let\@elt\relax
  \xdef\@freelist{\@freelist\@midlist}%
  \global\let\@midlist\@empty
  \@combinefloats}

\makeatother

\newcommand{\kt}[5]{
\begin{quote}
%\setcolumnwidth{.1\textwidth,.1\textwidth}[1,2]
\setlength{\columnsep}{-.12\textwidth}
\begin{paracol}{2}
\begin{singlespace}
\sloppy \smaller \og {\itshape  #4} \fg (#2, p. #1) \switchcolumn #5 (#3)
%\begin{flushright}trad. #3 \end{flushright} % normally I have \cite[#1]{#2}
\end{singlespace}
\end{paracol}
\end{quote}
}

\begin{document}
\lipsum[1-3]\footnote{foo}
\kt{PAGE}{BOOK}{TRANSLATOR}{\lipsum[1]}{\lipsum[1]}
\end{document}

SECOND EDIT :

It seems to work with touhami's suggestion using :

\footnotelayout{m}

I hadn't understood well how this command worked, I thought it was working only for footnotes made inside the translated text, but in fact, it solved my problem even if the footnote is outside my \kt environment.

Thanks !

  • 1
    In general, there are some packages for this kind of task; check here. I tried paracol and was happy with it. – Arash Esbati May 1 '15 at 16:07
2

multicol and longtable are not designed for such use and table environment don't allow page break.

Here a solution with paracol package

\documentclass[12pt,a4paper,final]{report}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{relsize}

\usepackage{paracol,lipsum}

\usepackage[frenchb]{babel}



%\columnratio{.5}
%\columnsep =10pt
\newcommand{\kt}[5]{%
\sloppy
\begin{paracol}{2}
\smaller \og {\itshape  #4} \fg    %  becarful here as \lipsum end with \par
\switchcolumn
#5
\end{paracol}
\begin{flushright} #2, p. #1, trad. #3 \end{flushright}}

\begin{document}
\lipsum[1-3]
\kt{PAGE}{BOOK}{TRANSLATOR}{\lipsum[1-2]}{\lipsum[1-2]}


\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.