On 2009-02-16, Nikos Chantziaras wrote: > Guenter Milde wrote: >> On 2009-02-09, Nikos Chantziaras wrote: >>> I'm using LyX 1.6.1 with TeXLive 2007 on Linux (Gentoo).
>>> I created a new document using the "article" class and selected "Greek" >>> as language. The document is a mix of English and Greek, but there's a >>> problem: even though English words appear correctly in LyX, the final >>> PDF output shows English using the Greek alphabet. ... >> You need to tell LyX which parts of the document are Greek and which are >> English ... > This is too slow, really, and in contrast with every other software out > there where you simply press Alt+Shift (or whatever combination you've > set up) and type away. However, this software will most probably not do correct hyphenation and spell-cheking... For single foreign words in Latin script, where this is not a problem, you can use a customized "unicodesymbols" file: * Copy it to your LyX directory (~/.lyx). * For all the latin Letters (and maybe also the question mark and other punktuation), you need to add lines like:: 0x0067 "\textlatin{g}" "" "force" "" "" # LATIN SMALL LETTER G However, this will stand in your way, if you want to compile e.g. English or German documents, so it needs a way to "switch off". (one possibility is a to put the modified file into another userdir (say ~/.lyx-greek) and start LyX with the "-userdir ~/.lyx-greek" option. > It's not really an option to have to type two shortcuts to switch > language You need to switch two things: keyboard layout (in LyX or in the OS) and language (in LyX). To achieve both with one key-combo, you could: a) use the lyx-server and a script to let the shortcut switch the OS keyboard settings and send the lfun to LyX, or b) define a keymap in LyX (see Help>Customization) and define a shortcut in LyX to switch the language + the keymap. Option b) is preferable, if you wish to have a persistent keyboard mapping outside LyX (e.g. for Greek-ignorant applications). > But if this is a limitation of TeX or LaTeX then I guess LyX has to live > with it. No, It is one of the limitations that LyX (due to its consequent use of Unicode) can "easily" overcome. > As it stands, it's too painful to use LyX for multilingual > documents that way, where the second language does not use a Latin > alphabet. Actually, it's no problem in the (worldwide more common) case that the *second* language uses a non-Latin alphabet (like Greek words in German text). The other way round is the problem. > I suppose most people can't really comprehend the painfulness > of this because their language is based on the Latin alphabet and > Alt+Shift does the right thing for them. This might be one of the reasons for this feature still missing in LyX. After all, LyX is a project by volunteers that need to be interested in fixing this by one of * own need for the feature, * "scientific", "sportive" or some other interest in solving the problem, * financial stimulus. So, a first step towards a solution would be to file an enhancement report to bugzilla.lyx.org that gets the developers interested. A second step would be getting involved with the development and e.g. provide a patch for unicodesymbols or a "greek.kmap" file that translates Latin input to Greek Unicodechars for LyX. Günter