I want to use two columns to place the English translation of a text in a foreign language next to the original text in that foreign language. How can I do that?
1 Answers
I use the package parallel CTAN -- parallel. I don't know if there are better solution, but this one fit my requerements.
There are some options to split between left/right pages or columns, and also adding lines between columns.
A simple column division is presented in the following MWE.
\documentclass{article}
\usepackage{parallel}
\usepackage[german, brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\begin{document}
CAPE -- MWE package parallel with bilingual -- single page
\clearpage
Before 1st Parallel with \verb|\textwidth|.
\begin{Parallel}{0.48\textwidth}{0.48\textwidth} %[options]{\linewidth}{\linewidth}
\ParallelLText{ %
\selectlanguage{brazil}
Este texto está em alemão.
left-text 1.1
\lipsum[1-5]
left-text 1.2
\vfill
}
\ParallelRText{ %
\selectlanguage{german}
Dieser Text ist auf Deutsch.
right-text 1.1
\lipsum[1-5]
right-text 1.2
\vfill
}
\ParallelPar
\ParallelLText{left-text 2}
\ParallelRText{right-text 2}
\ParallelPar
\renewcommand{\ParallelAtEnd}{text at end of 1st parallel.}
\end{Parallel}
After 1st parallel.
Before 2nd parallel with \verb|\linewidth|.
\begin{Parallel}{0.48\linewidth}{0.48\linewidth} %[options]{\linewidth}{\linewidth}
\ParallelLText{ %
\selectlanguage{brazil}
Este texto está em português.
left-text 3.1
\lipsum[1-5]
left-text 3.2
\vfill
}
\ParallelRText{ %
\selectlanguage{german}
Dieser Text ist auf Portugiesisch.
right-text 3.1
\lipsum[1-5]
right-text 3.2
\vfill
}
\ParallelPar
\ParallelLText{left-text 4}
\ParallelRText{right-text 4}
\ParallelPar
\end{Parallel}
After 2nd parallel.
\end{document}
Some pieces of the results. Considere adjusting margins to split the text bettter.
Edit: following Ad van der Ven's comments.
A shorter version with \usepackage[autostyle=true]{csquotes} and the suggested English and German texts. There are two repetitions of the texts. Check the behaviors (un)commenting lines with \selectlanguage.
\documentclass{article}
\usepackage{parallel}
\usepackage[ngerman, english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[autostyle=true]{csquotes}
\begin{document}
Titlepage -- MWE package parallel with bilingual -- single page.
\clearpage
Before 1st Parallel with \verb|\textwidth|.
\begin{Parallel}{0.48\textwidth}{0.48\textwidth} %[options]{\linewidth}{\linewidth}
\selectlanguage{english}
\ParallelLText{ %
\enquote{This text is in German}.
Besonders auffällig ist der frühere Eintritt der Reifungszeit und damit auch der Geschtechtsreife bei den Mädchen, die den Knaben um 1-2 Jahre vorauseilen.
}
\selectlanguage{ngerman}
\ParallelRText{ %
\enquote{Dieser Text ist auf Deutsch}.
Particularly noticeable is the earlier onset of the maturation period and thus also the maturity level of the girls, who are 1-2 years.
}
\ParallelPar
\end{Parallel}
After 1st parallel.
Before 2nd parallel with \verb|\linewidth|.
\begin{Parallel}{0.48\linewidth}{0.48\linewidth} %[options]{\linewidth}{\linewidth}
% \selectlanguage{english} % No space
\ParallelLText{ %
\selectlanguage{english} % With space
\enquote{This text is in English}.
Besonders auffällig ist der frühere Eintritt der Reifungszeit und damit auch der Geschtechtsreife bei den Mädchen, die den Knaben um 1-2 Jahre vorauseilen.
}
%\selectlanguage{ngerman} % No space
\ParallelRText{ %
\selectlanguage{ngerman} % With space
\enquote{Dieser Text ist auf Englisch}.
Particularly noticeable is the earlier onset of the maturation period and thus also the maturity level of the girls, who are 1-2 years.
}
\ParallelPar
\end{Parallel}
After 2nd parallel.
\end{document}
The result follows.
- 3,939
-
A list of related questions: https://tex.stackexchange.com/q/286652/140133, https://tex.stackexchange.com/q/86366/140133, https://tex.stackexchange.com/q/164794/140133, https://tex.stackexchange.com/q/308260/140133. – FHZ Mar 15 '20 at 15:51
-
It's fine @AdvanderVen. Did it work for you? The code is a little bit longer to better illustrate the behavior of parallel. I would also advice to use
\usepackage[autostyle=true]{csquotes}and the command\enquote{Text}if you use quotes from differente languages. – FHZ Mar 16 '20 at 12:58 -
FHZ I ran your source text with Latex and it worked perfectly. However, I couldn't find the actual language texts. How does the source text look with the following two language texts?
German:
Besonders auffällig ist der frühere Eintritt der Reifungszeit und damit auch der Geschtechtsreife bei den Mädchen, die den Knaben um 1-2 Jahre vorauseilen.
English:
Particularly noticeable is the earlier onset of the maturation period and thus also the maturity level of the girls, who are 1-2 years
– Ad van der Ven Mar 16 '20 at 14:34 -
Hi, try to change the contents in
\ParallelLText{ %\selectlanguage{brazil}and in\ParallelRText{ % \selectlanguage{german}. I would suggest to also remove lines with the dummy text from\lipsum[1-5]. – FHZ Mar 16 '20 at 14:59 -
Wouldn't you mind showing me the new, modified Latex source file. Thanks in advance. – Ad van der Ven Mar 16 '20 at 15:47
-
I added a second example with
csquotesand your texts in English and German. I let twoparallelenvironments with the same sample texts. – FHZ Mar 16 '20 at 17:53 -
1I cannot say how grateful I am for your very knowledgeable and also very kind help. It is very special that you give this help without getting paid for it. Again thank you very much. – Ad van der Ven Mar 17 '20 at 09:55
-
You're welcome. I had to learn about it to start a project of a bilingual book to teach German. In this discussion I also learned about another package,
paracol, which I will test soon. I ask you to up-vote any good question that helps you in TeX-SE and choose the best answer among them when it exists, this is the gesture of gratitude around here AND, the most important, help people in need when you can. ;) – FHZ Mar 17 '20 at 15:27 -




paracolpackage for parallely typeset columns. – leandriis Mar 15 '20 at 15:20