On Mon, Apr 23, 2012 at 3:49 PM, Guenter Milde <mi...@users.sf.net> wrote:
> On 2012-04-23, stefano franchi wrote:
>
>> BTW: I am using memoir with Luatex, language is utf8(Xetex), babel
>> loaded with Greek polutoniko (among others).
>
> This is important info. Many more things may go wrong in this case.
>
> I have no experience with LuaTeX and I don't know whether it works with
> the babel greek option at all (and which fonts are used in this case).
>
> Maybe your document loads fontspec after babel and this way overwrites the
> selection of LGR-encoded fonts for Greek.

Hmm, unless memoir does something funny, fontspec should be loaded
first. It's the second line in the Latex source (right after the doc
class)

>
> Do you use some hack to overwrite the font-encoding switch usually done
> with \textgreek?
>

No.

>
>> On Mon, Apr 23, 2012 at 2:48 AM, Guenter Milde <mi...@users.sf.net> wrote:
>>> On 2012-04-23, René Grognard wrote:
>
>>> For all methods, you must mark the text in question as "Greek".
>> Done. In my case, Greek (polutoniko)
>
> With LuaTeX, babel (instead of polyglossia) and Unicode (utf8 XeTeX), it
> *may* be better not to set the language to Grekk (YMMV).
>

>>> a) use the pre-composed Unicode characters in the "Greek extended" block
>>>   (drag and drop from somewhere or use Insert>Symbols).
>
>> Using insert>symbols works, but it is a pain to use. Copy and pasting
>> from external sources does not. I see the proper greek on screen, but
>> the characters simply disappear in the pdf.
>
> Very strange. Does this happen to the same characters with the same language
> setting?
>
> Characters "disappearing" in the PDF are usually an indication of an
> incomplete font. On screen, the system (or the QT libs or fontconfig, or
> X...) use auto-substitution of missing characters in the configured font
> with characters from another known system font, xetex and luatex do not have
> this nice feature.
>
> Make sure the document text font contains the pre-composed characters in the
> Greek-extended Unicode block.
>

I thought about that. I may be using an incomplete font. It's Minion
Pro. I'll double check with another font with more complete coverage.
But:  the Greek text entered as ERT displays fine. Does that mean that
latex (babel?) switches to an alternative font when it sees the
\textgreek command?

>>> b) use the "LGR transliteration" which is described in the babel Greek
>>>   documentation http://mirror.ctan.org/info/babel/babel.pdf
>
> Sorry, I did not consider LyX' "paranoia escaping" of text input because
> there is no problem using <>| in the unicodesymbols file (only ~, because
> this is no-break space in "normal" LaTeX, disabled by Babel for Greek but
> re-enabled by LyX).
>
> The conversion of <, >, and | to \textless, \textgreater, and \textbar is
> only required with the legacy OT1 font encoding (i.e. never in Greek and
> not with LyX's default setting of T1). Write a bug report?
>

Ok, I'll file a bug report. But what is the bug, exactly? Something like:

"Lyx should not escape symbols when using T1 font encoding"?


>> If, instead, I enter  \textgreek{<epim'eleia >eato\~u} in ERT, I get
>> the expected output
>
> This means you should be fine with ERT for these characters (or
> phrases/words containing these characters) and the tilde.
> (The \textgreek is inserted by LyX when you set the language.)

Lyx actually inserts a \foreignlanguage{polutonikogreek}{...}. Is that
equivalent?

>
>
>>>   Alternatively, you can look in the file "unicodesymbols" in the LyXdir to
>>>   see how LyX maps the Unicode characters to LaTeX code.
>
>>> c) if you load the "LGRX" extended font definitions for the Greek LGR fonts
>>>   (http://milde.users.sourceforge.net/LGR/) in the latex preamble, you
>>>   can also use standard accent commands (and their extensions) as
>>>   described in http://milde.users.sourceforge.net/LGR/lgrxenc.pdf For
>>>   single accents, this should also work with accent-... LyXfuns + base
>>>   character in the minibuffer or bound to some key.
>
>
>> I will have to try this once I get method (b) to work.
>
> With XeTeX or LuaTeX, I recommend
>
> * Use polyglossia instead of babel.
>
> * Use a text font that contains the precomposed Greek characters
>  (you can also set up a different font for Greek and Latin in the LaTeX
>  preamble, see the fontspec manual).
>
> * Use Unicode characters for the input. (The LGR transliteration does not
>  work without legacy 8-bit LGR encoded fonts.)
>

I'll have to try these ones too.



Thanks,

Stefano


-- 
__________________________________________________
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies            Ph:   +1 (979) 845-2125
Texas A&M University                          Fax:  +1 (979) 845-6421
College Station, Texas, USA

stef...@tamu.edu
http://stefano.cleinias.org

Reply via email to