Template: bilingual document

Recently I received an email with the question for a bilingual document. I never had to write a bilingual document before, and the challenge was there. What I create is a two column document in which two languages can be used: one in the left column and one in the right column. I tried to keep things as simple and clean looking as possible.

The template makes use of the article documentclass. Two packages are important: babel and parallel. The first is used to select the languages for the main content and the second package is needed to create the two column layout.

The babel package

The babel package should be well-known to you. In this template, it is called as follows:

\usepackage[english,german]{babel}

Hence, the english en german languages are loaded. In the main content of the template, the languages are selected with the selectlanguage command. For example, the english language is selected with

\selectlanguage{english}

The parallel package

The parallel package is used to create a two column layout, where each columns contains text in a different language. For english in the left and german in the right column, we do:

	\selectlanguage{english}
\ParallelLText{\blindtext}
	\selectlanguage{german}
\ParallelRText{\blindtext}

The parallel package also makes sure that, when a paragraph in one language is shorter than the other, the next paragraph begins at the same line for both languages. In order to say to LaTeX that a paragraph is ended, we type

\ParallelPar

Line numbering

As a final decoration, line numbering is added to the document. This is done because I often see it in bilingual documents. It is achieved with the lineno package. In the preamble, after \usepackage{lineno}, add \linenumbers.

Download

Download PDF
Download TEX

7 Comments

  1. error says:

    This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
    restricted \write18 enabled.
    entering extended mode
    (./e3.tex
    LaTeX2e
    Babel and hyphenation patterns for 7 languages loaded.
    (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
    Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
    (/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo))
    (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
    (/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf
    (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def))

    ! Package babel Error: Unknown option `german’. Either you misspelled it
    (babel) or the language definition file german.ldf was not found
    .

    See the babel package documentation for explanation.
    Type H for immediate help.

    l.296 \ProcessOptions*

    ? x

  2. I think this is among the most significant info for me. And
    i’m happy studying your article. But want to statement on some normal things, The website taste
    is wonderful, the articlees is truly great :
    D. Excellent job, cheers

  3. Woah! I’m really enjoying the template/theme of this site.
    It’s simple, yeet effective. A lot of times it’s very difficult to get that “perfect balance” between usability
    and visual appearance. I must say you have dopne a very good job with this.
    In addition, the blog loads extremely fast for me on Safari.

    Superb Blog!

  4. Is it possible to create a two-column Word document, where each column shows a different file?

  5. escudito says:

    Nice idea, thank you.

    If you ever plan to use color in your document, though, you should think of replacing the Parallel package with the pdfcolparallel package (\usepackage{pdfparallel}). It is a respectful fork of Parallel that handles the color stack better.

    When I use parallel or pdfparallel I usually define this macros:


    \newcommand{\rus}[1]{\selectlanguage{russian}\ParallelLText{#1}}
    \newcommand{\esp}[1]{\selectlanguage{spanish}\ParallelRText{#1}\ParallelPar}

    So later I can use them in my documents this way:


    \rus{Здравствуйте!}
    \esp{¡Salud!}

Leave a Reply




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>