On 2012-04-25, stefano franchi wrote:
> 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).

>> 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)

To be precise, the line(s) to look for not loading fontspec but the last
font definition(s) (\setmainfont etc.) which can happen also in the
custom LaTeX preamble.

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

> No.

This indicates that (in most cases) using the (8-bit) LaTeX fonts in LGR
encoding for Greek.

To be sure when which font is used, you could experiment with a different
(e.g. sans-serif) main text font via the "use-non-tex-fonts" GUI. Then
try with Greek Unicode characters inside and outside a region marked as
Greek (polytonic).

Also, try to find out whether you use babel or polyglossia (the latter is
recommended with Xe/LuaTeX and Greek.


>>>> 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.

All characters or just some?

>> 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.

If simple Greek characters are present but accented ones not, this is a good
indicator for an incomplete font. If no Greek is visible at all, this hints
at a different problem.

> 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?

Yes. The \textgreek command switches the font encoding to LGR, (La)TeX then
selects a font in LGR encoding.

>>>> b) use the "LGR transliteration" which is described in the babel Greek
>>>>   documentation http://mirror.ctan.org/info/babel/babel.pdf

...

>> 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"?

"LyX should escape <, >, and | only when using OT1 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?

This depends on the language package: babel switches the font encoding to
LGR, polyglossia not (because there is no need for a different font encoding
with Unicode-encoded fonts.
Just try: if the transliteration still works, it's babel; if the Latin
input come out as Latin, it's polyglossia.


>> 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.)

If you need this often, set up keybindings (e.g. a system-wide toggle
between Greek and Latin keyboard layout).


Günter

Reply via email to