Skip to main content
Working from scratch, following simplicity

Multi-language with comment package

Do you want to keep a document with more languages and/or optional sections and maybe being able to turn on/off them whether necessary? The Comment package is the answer to these questions! I show you in WriteLaTeX how to set it with a practical template.

Following the thread: Is it possible to keep my translation together with original text? I have discovered this fantastic feature implemented by Victor Eijkhout in the Comment Package.

The picture is self-explanatory

How it works?

  1. Simply you have to activate it writing in the head of the document:
  2. Then add the calls in order to include or exclude chunks of text, in my case:
    Above the texts in English (en) are shown, the Italian (it) ones are ignored.
  3. Finally in the document, you have to put the texts in this way:
    \huge{Text in English!}
    \huge{Testo in italiano!}

In a few words: quick and painless! Try it in writeLaTeX: Multi-language Test.

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Sponsored Links

Nicola Rainiero

A civil geotechnical engineer with the ambition to facilitate own work with free software for a knowledge and collective sharing. Also, I deal with green energy and in particular shallow geothermal energy. I have always been involved in web design and 3D modelling.