[tex-hyphen] pTeX and Greek hyphenation patterns
Takayuki YATO (ZR)
zrbabbler at yahoo.co.jp
Wed Jan 19 16:50:53 CET 2011
Hello Mojca and everyone
(Response to the remaining part.)
>When you speak about Polyglossia you probably mean that when one is
>using XeTeX and Polyglossia then Greek hyphenation works out of the
>box, while it doesn't work when using pdfTeX (or pTeX) and babel?
What I mean here is well explained by the following examples:
- test-babel.tex (attached)
- test-polyglossia.tex (attached)
Running "latex test-babel.tex" shows (among other lines):
greek = 30
monogreek = 29
polygreek = 30
ancientgreek = 5
language = 30
And to activate the (*1) line (which tells the Greek language
should be polytonic rather than monotonic) does *not* change
the value (30) appearing on the last line; that is, the 'greek'
option of Babel always chooses the 'greek' pattern (ie. not
monogreek, etc.).
# Those who want to write the Ancient Greek language are advised
# to employ the 'teubner' package. But this package does nothing
# about the 'ancientgreek' pattern.
On the other hand, running "xelatex test-polyglossia.tex" shows:
greek = 30
monogreek = 29
polygreek = 30
ancientgreek = 5
language = 29
Moreover to activate the (*2) line (which changes Greek from
monotonic to polytonic) actually changes the last line:
language = 30
Similarly to activate the (*3) line (changing Greek from monotonic
to ancient) changes the last line:
language = 5
That results suggest that Polyglossia always chooses the pattern
for the right variant of Greek.
>The problem is that XeTeX/Polyglossia uses proper Unicode characters
>for Greek and hyphenation works properly with any given font. While in
>pdfTeX/Babel (please correct me if I'm wrong) one uses ASCII and
>depends on one particular TFM font with suitable ligatures. Everything
>is pretty much an ugly hack, but it used to be the only way to make it
>work before UTF-8 engines existed.
I believe this point is not so problematic. The 8-bit Greek patterns
will work with every LGR-encoded font (patterns depend on font encodings
but not on fonts themselves), and Babel does the right job of switching
the font encoding to LGR when it enters the Greek language. At least
this point is not relevant to what I mentioned before. The cause of
the failure to switching among the Greek variants is simply that this
functionality is not provided in Babel. In fact, the 'hyphsubst' package
(that is mentioned earlier on the list) could supply the functions
desired here. One could do the Ancient Greek properly by writing:
\documentclass{article}
\usepackage{hyphsubst}
\HyphSubstLet{greek}{ancientgreek}
\usepackage[greek,english]{babel}
\languageattribute{greek}{polutoniko}
\usepackage{teubner}
\begin{document}
\typeout{\the\language}
Life is short, art is long.\par
\begin{otherlanguage*}{greek}
<O b'ios brax'us, <h d`e t'exnh makr'h.
\end{otherlanguage*}
\end{document}
# NB. The example above works properly also in pLaTeX, as long as
# the ancientgreek pattern is present.
----
Takayuki YATO (aka."ZR")
--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-babel.tex
Type: application/octet-stream
Size: 413 bytes
Desc: 952860677-test-babel.tex
URL: <http://tug.org/pipermail/tex-hyphen/attachments/20110120/26ad4fee/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-polyglossia.tex
Type: application/octet-stream
Size: 570 bytes
Desc: 2071928121-test-polyglossia.tex
URL: <http://tug.org/pipermail/tex-hyphen/attachments/20110120/26ad4fee/attachment-0001.obj>
More information about the tex-hyphen
mailing list