Hi all,
I've got two text files in two different languages, and need to interleave them so that each facing page contains the same block of text, English on the left and the other language on the right. Is there an easy (or even a medium-difficulty!) way to achieve this with LaTeX please?
TIA,
Steve.
Text Formatting ⇒ Two language on facing pages
-
- Posts: 3
- Joined: Mon Aug 02, 2010 11:21 am
Two language on facing pages
Last edited by kernowsteve on Mon Aug 02, 2010 12:54 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Two language on facing pages
Definitely a job for the parallel package.
Best regards and welcome to the board
Thorsten
Code: Select all
Code, edit and compile here:
\documentclass[11pt,a4paper,titlepage,twoside]{article}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage[ngerman,english]{babel}\usepackage{blindtext}\usepackage{parallel}\title{Two languages on facing pages}\author{kernowsteve}\begin{document}\maketitle\begin{Parallel}[p]{}{}\ParallelLText{%% \selectlanguage{english}\blinddocument}\ParallelRText{%\selectlanguage{ngerman}\blinddocument}\end{Parallel}\end{document}
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 3
- Joined: Mon Aug 02, 2010 11:21 am
Re: Two language on facing pages
Thanks Thorsten, that looks great. Is it possible to \import the entire two language files using the parallel package, or is it necessary to do it page by page?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Two language on facing pages
I'm afraid I can't follow you. There are no language files imported and I don't understand what you mean with »page by page« in this context.kernowsteve wrote:[...] Is it possible to \import the entire two language files using the parallel package, or is it necessary to do it page by page?
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 3
- Joined: Mon Aug 02, 2010 11:21 am
Re: Two language on facing pages
Sorry if I wasn't clear. I meant to ask: with the parallel package, can I enter all the text in one language (the whole book) in one block, then all of the other language in a block, or is it necessary to enter individual left-right paragraph pairs for the entire book?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Two language on facing pages
I thought that I have shown that with the example in my last reply. There are two entire documents in two different languages. So from my understanding you can typeset a whole document on each side. What I have forgotten is to reset the »section« counter in the foreign language part.
But during further tests I faced some problems with typesetting on facing pages. They are shown in the below code.
Obviously a misbehaviour of the package and worth a note to the author. The package seems to be still in beta status (for seven years now!). Perhaps the author is not planning further development.
Code: Select all
Code, edit and compile here:
\documentclass[11pt,a4paper,titlepage,twoside]{article}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage[ngerman,english]{babel}\usepackage{blindtext}\usepackage{parallel}\title{Two languages on facing pages}\author{kernowsteve}\begin{document}\maketitle\begin{Parallel}[p]{}{}\ParallelLText{%% \selectlanguage{english}\blinddocument}\ParallelRText{%\setcounter{section}{0}\selectlanguage{ngerman}\blinddocument}\end{Parallel}\end{document}
Code: Select all
Code, edit and compile here:
\documentclass[11pt,a4paper,titlepage,twoside]{article}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage[ngerman,english]{babel}\usepackage{blindtext}\usepackage{parallel}\title{Two languages on facing pages}\author{kernowsteve}\begin{document}\maketitle\begin{Parallel}[p]{}{}\ParallelLText{%% \selectlanguage{english}\blindtext}\ParallelRText{%\selectlanguage{ngerman}\blindtext[2]}\ParallelPar\end{Parallel}\end{document}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10