General ⇒ Bilingual documents
Bilingual documents
I am writing an English document and I would like to keep a translation at one other language say Greek. I have never done something like this before so I'm clueless on how to achieve it. The final result is to have two different documents one in English and one in Greek.
Is that possible? Or do I have to rewrite the second document from scratch?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Bilingual documents

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Bilingual documents
You are asking for two different documents, it doesn't matter whst is inside. Both documents can share the se preamble.
You could also write one master document and split the output using conditionals.
- Stefan Kottwitz
- Site Admin
- Posts: 10361
- Joined: Mon Mar 10, 2008 9:44 pm
Bilingual documents
\input{preamble}
at the beginning of each document. So changes in the preamble appy to both documents.Just specific settings, such as greek or english option for babel, need to go to the specific document.
Stefan
Bilingual documents
Interesting. Care to expand a bit?Johannes_B wrote:You could also write one master document and split the output using conditionals.
Bilingual documents
Thanks Stefan. But this requires me to work with two documents. I was wondering if it was possible to only work with one document and interchange the languages in that only one file. Then compile twice so (La) TeX produces both documents.Stefan Kottwitz wrote:I would put the part of the document preamble, that shall be the same in both documents, into a file like preamble.tex. Then use\input{preamble}
at the beginning of each document. So changes in the preamble appy to both documents.
Just specific settings, such as greek or english option for babel, need to go to the specific document.
Stefan
Bilingual documents
With theTolaso wrote:Interesting. Care to expand a bit?Johannes_B wrote:You could also write one master document and split the output using conditionals.
etoolbox
package : http://latex.org/forum/viewtopic.php?f=44&t=30024- Stefan Kottwitz
- Site Admin
- Posts: 10361
- Joined: Mon Mar 10, 2008 9:44 pm
Bilingual documents

http://latex.org/forum/viewtopic.php?f=5&t=5286&start=0
Another way, using the

Code: Select all
\documentclass{...}
\usepackage{comment}
\includecomment{English}
\excludecomment{Greek}% or the other way round, last 2 commands
\begin{document}
\begin{English}
...
\end{English}
\begin{Greek}
...
\end{Greek}
\end{document}
Bilingual documents
this produces two files or a single one? Just checking before giving it a try live on my documents!
