Generalalternate between Greek&Latin characters

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
vrathi13
Posts: 6
Joined: Mon Dec 21, 2015 4:52 pm

alternate between Greek&Latin characters

Post by vrathi13 »

I can use Greek & Latin characters alternately (by using the commands \greektext & \latintext respectively) but this I can do only within a single (main) tex file. But when I use the commands \latintext and \greektext in other auxiliary tex files e.g. chapters (whose code is afterwards entered in the main tex file via the command \import) then I get an error message.

The question is how can I alternate between Greek & Latin characters inside these auxiliary tex files ?

Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

alternate between Greek&Latin characters

Post by Johannes_B »

This should be absolutely no problen, as long as all files have the same encoding. Can you show us a minimal working example? Maybe that is a limitation by import, but this command is from a package i don't know.

Have all files encoded in utf8, at least XeLaTeX and LuaLaTeX don't have any problems.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
vrathi13
Posts: 6
Joined: Mon Dec 21, 2015 4:52 pm

Re: alternate between Greek&Latin characters

Post by vrathi13 »

I fixed it (there was nothing to be fixed actually) just plain stupidity on my behalf.

In order for the commands \latintext and \greektext to function within a separate tex file,you have to write in that file at some point
"...\latintext somelatintext...", but then it's imperative to switch back to your primary language , which in my case is greek (otherwise you get an error message). So then you have to write \greektext. That did it for me.
Post Reply