I wonder if there's a way to keep a single LaTeX document in different languages in such a way that the output document could be generated in the desired language, instead of keeping several documents in parallel.
Any ideas?
General ⇒ LaTeX document in different languages
NEW: TikZ book now 40% off at Amazon.com for a short time.

LaTeX document in different languages
Hi Moreno71,
I remember seeing a similar thread a few months ago. I'm not sure what the best solution was, but I will give my proposal again:
Say you want to have English and Spanish, then make a new command:
and where you want to have two versions, do this:
as is, this code will produce the English version. To produce the Spanish version, you just have to replace the #1 with a #2.
Note that I was not able to test this code, I hope it's right.
I remember seeing a similar thread a few months ago. I'm not sure what the best solution was, but I will give my proposal again:
Say you want to have English and Spanish, then make a new command:
Code: Select all
\newcommand{\mylanguage}[2]{#1}
Code: Select all
\mylanguage{This is my text in English}{y esto la version en espanol}
Note that I was not able to test this code, I hope it's right.
LaTeX document in different languages
Perhaps you were referring to this thread: http://www.latex-community.org/forum/vi ... 039&p=7944?
If so, it seems that they didn't find a proper solution.
Anyway, your idea looks like a simple and clever solution. I'll give it a try.
Thanks a lot.
If so, it seems that they didn't find a proper solution.
Anyway, your idea looks like a simple and clever solution. I'll give it a try.
Thanks a lot.
Re: LaTeX document in different languages
great, please post back with your comments or if you find a way that you like better. I would be interested in hearing about the particular problems that come up. This must be a somewhat common endeavor. I am guessing that if there is no dedicated module, then perhaps it really is just a simple solution. I guess you'll have to let us know.