3

I am using Lyx in order to write my CV but i have an issue with Greek language.

I fill the entries like name/family name/adress/tel/mobile/email in Greek from Lyx's preamble but the email must be (for obvious reasons) in english although i dont know how to do that.

I attach a screenshot from the compiled pdf and my lyx's preamble in order to understand my issue.

enter image description here

As you can see at the compiled pdf the email is with greek characters instead of latin .. Any ideas how to fix this ? I want only the email to be with latin characters, all others entries i want them to stay in Greek..

ps: I am a mac os user

  • 2
    Can you show us the first few lines of LaTeX code (opening declarations, packages, etc.)? I'm curious if you're using babel, inputenc, fontspec, etc. A MWE will help tremendously. – Dan Aug 27 '13 at 18:16
  • I am not sure i understood but my Lyx,s preamble from the beginning is this screenshot i39.tinypic.com/f4qwhz.png – ALdaperan Aug 28 '13 at 5:00
  • 1
    Can you save the TeX file and then open it in a text editor and post the first few lines before your name here as a MWE? It's not showing everything. I've typeset a lot of Polytonic Greek documents and I know the character support is not out-of-the-box. – Dan Aug 28 '13 at 14:58
  • of course ! I made a printscreen of the text editor for a better view :) oi42.tinypic.com/mhakn8.jpg – ALdaperan Aug 28 '13 at 16:31
  • Can you go to File --> Export --> LaTeX (pdflatex) and then post the TeX file? – Dan Aug 28 '13 at 19:59
2

Another setting that helps with switching from one language to another in Lyx is to use the Text style dialog. So highlight the text that is in the Greek language, click the toolbar button:

Text style button

and then select Greek from the Language drop-down menu: Text style dialog

1

Go into the document settings and under custom class options, add the word 'english'. See below:

Document Settings

This adds English support to the document (currently only Greek was listed). You can see the actual TeX code by going to View --> View Source. You will see that adding English to the custom class options modifies the first line like so (also including the next two lines for next point):

\documentclass[12pt,a4paper,greek,english]{moderncv}
\usepackage[T1]{fontenc}
\usepackage[iso-8859-7]{inputenc}

The problem is that you typed your document in English and this will no longer accept Greek character support (it doesn't look like you have any actual Greek anyways, though - it is just English so far). If you need Greek language support, I recommend using XeLaTeX as it supports Unicode (assuming you know how to type Greek on your keyboard), and changing the settings in the Language section of the document settings rather than modifying the class. You may need to change the font and other settings to use Unicode support in LyX, and you may have some additional issues as well (I just write TeX directly for Greek documents, I don't use LyX).

It seems from my research (I'm not very experienced with LyX) that using the babel package and specifying when you write in Greek may be best (unless everything except the email should be in Greek, then do vice versa - although it appears that nothing is in Greek thus far). To do this:

  • Document --> Settings --> Language to Greek
  • under Tools --> Preferences --> Language Package
  • Change to \usepackage[english,greek]{babel}

You will have to insert the following code everytime you alter the language

\selectlanguage{greek} or \selectlanguage{english}

This is not the optimal way to handle this but from reading forums it seems other routes are somewhat buggy in LyX. See also How to encoding of Lyx LaTeX output without Lyx adding inputenc declaration to preamble

See also fontenc vs inputenc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.