LaTeX forum ⇒ GeneralBilingual documents Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
Tolaso
Posts: 31
Joined: Tue Dec 20, 2016 12:23 am

Bilingual documents

Postby Tolaso » Tue Aug 22, 2017 10:14 pm

I am not sure about the forum posting the question but here goes...

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?

Tags:

User avatar
thomasb
Posts: 76
Joined: Thu Aug 03, 2017 10:54 am
Location: france

Postby thomasb » Tue Aug 22, 2017 11:38 pm


Tolaso
Posts: 31
Joined: Tue Dec 20, 2016 12:23 am

Postby Tolaso » Wed Aug 23, 2017 9:47 am

That is not what I am asking. I do not want a two column bilingual document. I want two separate documents one with English and the other with Greek. That is what I am asking if is possible. :)

User avatar
Johannes_B
Site Moderator
Posts: 3587
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Aug 23, 2017 9:50 am

Yes, this is possible.
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.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Stefan Kottwitz
Site Admin
Posts: 8541
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Wed Aug 23, 2017 10:57 am

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
Site admin

Tolaso
Posts: 31
Joined: Tue Dec 20, 2016 12:23 am

Postby Tolaso » Wed Aug 23, 2017 10:24 pm

Johannes_B wrote:You could also write one master document and split the output using conditionals.


Interesting. Care to expand a bit?

Tolaso
Posts: 31
Joined: Tue Dec 20, 2016 12:23 am

Postby Tolaso » Wed Aug 23, 2017 10:26 pm

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


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.

User avatar
thomasb
Posts: 76
Joined: Thu Aug 03, 2017 10:54 am
Location: france

Postby thomasb » Wed Aug 23, 2017 10:28 pm

Tolaso wrote:
Johannes_B wrote:You could also write one master document and split the output using conditionals.


Interesting. Care to expand a bit?

With the etoolbox package : http://latex.org/forum/viewtopic.php?f=44&t=30024

User avatar
Stefan Kottwitz
Site Admin
Posts: 8541
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Wed Aug 23, 2017 10:34 pm

Here is a solution, in a nearly 10 years old thread of LaTeX.org. ;-)

viewtopic.php?f=5&t=5286&start=0

Another way, using the comment package:

  1. \documentclass{...}
  2. \usepackage{comment}
  3. \includecomment{English}
  4. \excludecomment{Greek}% or the other way round, last 2 commands
  5. \begin{document}
  6. \begin{English}
  7. ...
  8. \end{English}
  9. \begin{Greek}
  10. ...
  11. \end{Greek}
  12. \end{document}


Stefan
Site admin

Tolaso
Posts: 31
Joined: Tue Dec 20, 2016 12:23 am

Postby Tolaso » Wed Aug 23, 2017 10:36 pm

Hi Stefan,

this produces two files or a single one? Just checking before giving it a try live on my documents! :)


Return to “General”

Who is online

Users browsing this forum: No registered users and 8 guests