[tex-hyphen] pTeX and Greek hyphenation patterns

Takayuki YATO (ZR) zrbabbler at yahoo.co.jp
Wed Jan 19 16:59:33 CET 2011


# Sorry, in the previous post Greek text (the most important parts!)
# was corrputed.

Hello Mojca and everyone,

>1) dependencies; pTeX patterns used to be standalone, which means that
>pTeX patterns would generate even without having greek and
>ancientgreek package installed. Ibycus patterns are duplicated in
>ptexgeneric. We either need a duplicate of gr*hyph5.tex in ptexgerenic
>or pTeX needs a dependency on greek and ancientgreek (I need to check
>exact names), or gr*hyph5.tex patterns need to be installed
>unconditionally.
I know virtually nothing about package management of TeX Live (or CTAN?)
and thus cannot judge which way is favorable....

>2) How do pTeX users input Greek (what encoding and what font do they
>use)? (Can you please send an example of a minimal document with some
>Greek text suitable for pTeX?)

I've once given an answer on the following post on "TeX Forum".
http://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=460#p2431
If you feel this is too hard to understand, then the simple answer is:
"mostly the same as 8-bit (pdf)TeX users do", except that some
restrictions are imposed. That is, pTeX users write Greek with
using Babel and LGR font encoding, and they normally use CB Fonts
but might prefer some other family (eg. from GFS families), etc.
Now I will explain on the most tricky part, input encodings.

If one inputs Greek through the ASCII transliteration following
the font encoding in effect then trivially this input can coexist
with any input encoding. For example, one can mix Greek and French
in pdfLaTeX by doing \usepackage[latin1]{inputenc} and writing
transliterated Greek text. The parallel is true with respect to
pLaTeX.

%<example-ascii-greek.tex>
% File may be encoded in either ISO-2022-JP/EUC-JP/Shift_JIS/UTF-8
% and then it must be compiled by "platex -kanji=***" where ***
% is jis/euc/sjis/utf8 respectively.
\documentclass{jarticle}
\usepackage[greek,english]{babel} % 'english', for 'non-Greek' text
\languageattribute{greek}{polutoniko}
\begin{document}
生涯は短く、学芸は長し。\par % Japanese text
\begin{otherlanguage*}{greek} % ASCII-transliterated Greek
<O b'ios brax'us, <h d`e t'exnh makr'h.
\end{otherlanguage*}
\end{document}
%<EOF>

# One might whink it is awfully impractical, but before the prevalence
# of Unicode, every (non-Greek) person wrote like this!

Given that pTeX can read UTF-8, onw might want to write Greek in UTF-8,
but there is a high hurdle to do it; the hurdle is that JIS X 0208
*does* contain (rather than *does not*) Greek letters.

%<example-utf8-greek.tex>
% This file is encoded in UTF-8 and compiles with 'platex -kanji=utf8'
% (but -kanji=utf8 is the default in TeX Live).
\documentclass{jarticle}
\usepackage[utf8x]{inputenc} % use 'utf8x' input encoding
\usepackage[greek,english]{babel}
\languageattribute{greek}{polutoniko}
\begin{document}
生涯は短く、学芸は長し。\par
\begin{otherlanguage*}{greek}
Ὁ βίος βραχύς, ἡ δὲ τέ
χνη μακρή.
\end{otherlanguage*}
\end{document}
%<EOF>

Because the JIS repertoire contains a part of Greek letters, such
letters are treated as Japanese text and output using Japanese fonts
(such output is utterly useless for the Greek language), rather than
being handled by inputenc process. This cannot be helped within TeX
processing and thus the only remedy is to preprocess the file so that
each byte that constructs Greek letters contained in JIS X 0208 will
be escaped in ^^?? form.

%<example-filtered-greek.tex>
% This file is encoded in UTF-8 and compiles with 'platex -kanji=utf8'.
\documentclass{jarticle}
\usepackage[utf8x]{inputenc} % use 'utf8x' input encoding
\usepackage[greek,english]{babel}
\languageattribute{greek}{polutoniko}
\begin{document}
生涯は短く、学芸は長し。\par
\begin{otherlanguage*}{greek}
Ὁ ^^ce^^b2ί^^ce^^bfς
^^ce^^b2^^cf^^81^^ce^^b1^^cf^^87ύς,
ἡ ^^ce^^b4ὲ ^^cf^^84έ^^cf^^87^^ce^^bd^^ce^^b7
 ^^ce^^bc^^ce^^b1^^ce^^ba^^cf^^81ή.
\end{otherlanguage*}
\end{document}
%<EOF>

# Again it is not so impractical when considering such preprocessing
# is often involved in multilingual typesetting on LaTeX. Moreover
# an enhanced variant of pTeX that does not need this preprocessing
# is developed and may be introduced to TeX Live.

>I faintly remember that pTeX knows some proper Greek encoding (also
>based on the fact that it recognizes Tau). In that case it makes a
>huge difference. If pTeX can use proper "Unicode" Greek input and
>proper OTF/TTF fonts with Greek characters, then it makes much more
>sense to use hyph-el-monoton.tex, hyph-el-polyton.tex, hyph-grc.tex
>than gr*hyph5.tex. Babel and Polyglossia support is another issue of
>course (neither is made to support pTeX, but that could be partially
>changed).
So the conclusion is: pTeX recognizes in a sense some of the Unicode
Greek letters, but the fact only does harm as to processing texts
written in Greek. But still pTeX is capable of processing Greek texts
and the way it does is exactly the same as 8-bit (pdf)TeX does.

----
Takayuki YATO (aka."ZR")



--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/


More information about the tex-hyphen mailing list