% Hi Mr. Beccari,
%
%
% on Wed, 10 March 1999 09:06:25 +0100,
% Reinhard Zierke <zierke@informatik.uni-hamburg.de> writes:
%  > > From: Claudio Beccari <beccari@POLITO.IT>
%  > >
% [...]
%  > > Meanwhile, due to the many requests I had on the Internet asking for an
%  > > update of the (modern) latin hyphenation patterns I upgraded the lahyph.tex
%  > > file, splitting it into lahyph7.tex and lahyph8.tex with the suffixes 7 and
%  > > 8 denoting the 7 or 8 bit encoding of characters according to the OT1 or
%  > > the T1 LaTeX encodings. I added the suggested copyright and licence notice
%  > > to both files.
% [...]
%
%
% after seeing your announcement on CTAN-ANN about the two files
% `lahyph7.tex' and `lahyph8.tex' I has taken the opportunity to
% integrate both in _one single_ file again which includes both, the
% patterns for OT1 and for T1 encoded ligature glyphs \ae and \oe.
% Thus a (La)TeX user needs only one set of hyphenation patterns aka one
% file for both font encodings.
%
% I have included the new file `lahyph.tex' at the end of my mail to let
% you decide if or if not to put it on CTAN (after some changes?).
%
% Changes I've made:
%   - changed \versionnumber and \versiondate
%   - moved copyright notice and license condition to the top of the
%     file
%   - added a note that the macro code is taken from `dehypht.tex' (aka
%     `ghyph31.tex')
%
%   - added macro code to support T1 _and_ OT1
%     (and TeX 3.x _and_ TeX 2.x)
%   - duplicated all patterns with \ae or \oe included (only two),
%     protected by the macro \n{...}
%
%   - fixed some typos in the comment section
%   - changed macro code for `soft discretionary hyphens' at the end of
%     the comment section (\allowhyphens is defined totally different in
%     `german.sty' and Babel, renamed it into \softdiscretionary to
%     avoid this name clash)
%
%
% Best wishes,
%   -bernd
% _____________________________________________________________________
% Bernd Raichle                                  "Le langage est source
% Autor des `german.sty' (aktuell: v2.5e)         de malentendus"
%                          (A. de Saint-Exupery)
%
%
% >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> CUT HERE
%
%                  ********** lahyph.tex *************
%
% Copyright 1999 Claudio Beccari
%                [latin hyphenation patterns]
%
% -----------------------------------------------------------------
% IMPORTANT NOTICE:
%
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt; either
% version 1 of the License, or any later version.
% -----------------------------------------------------------------
%
% Patterns for the latin language in modern spelling (u when u is needed
% and v when v is needed; ligatures \ae and \oe tolerated).
%
% Support for font encoding OT1 with 128-character set and
% for font encoding T1 with a 256-character set.
%
% Prepared by  Claudio Beccari
%              Politecnico di Torino
%              Torino, Italy
%              e-mail beccari@polito.it
%
% 1999/03/10 Integration of `lahyph7.tex' and `lahyph8.tex' into
% one file `lahyph.tex' supporting fonts in OT1 and T1 encoding by
% Bernd Raichle using the macro code from `dehypht.tex' (this code
% is Copyright 1993,1994,1998,1999 Bernd Raichle/DANTE e.V.).
%
%
% \versionnumber{2.1}   \versiondate{1999/03/10}
%
% Information at after \endinput.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\message{Latin Hyphenation Patterns `lahyph' Version 2.1 <1999/03/10>}
%
%
% Next we define some commands which are used inside the patterns.
% To keep them local, we enclose the rest of the file in a group
% (The \patterns command globally changes the hyphenation trie!).
%
\begingroup
%
% Make sure that doublequote is not active:
\catcode`\"=12
%
%
% Ligatures \ae and \oe in font encoding OT1
%
\catcode"1A=11 \lccode"1A="1A % \ae (^^Z)
\catcode"1D=11 \lccode"1D="1D % \AE (^^]) (not used)
\catcode"1B=11 \lccode"1B="1B % \oe (^^[)
\catcode"1E=11 \lccode"1E="1E % \OE (^^^) (not used)
%
% Define \ae and \oe as shorthands for medieval latin
% ligatures in font encoding OT1:
\def\ae{^^Z}
\def\oe{^^[}
%
%
% Then we have to define some macros depending on the TeX version.
% Therefore we have to distinguish TeX version 2.x and 3.x:
%
\ifnum`\@=`\^^40 % true => TeX 3.x
  %
  % For TeX 3:
  % ----------
  %
  % Ligatures \ae and \oe in font encoding T1
  %
  \catcode"E6=11 \lccode"E6="E6 % \ae
  \catcode"C6=11 \lccode"C6="C6 % \AE (not used)
  \catcode"F7=11 \lccode"F7="F7 % \oe
  \catcode"D7=11 \lccode"D7="D7 % \OE (not used)
  %
  % Ligatures \ae and \oe in font encoding T1 are ok:
  \def\n#1{#1}
  %
  % In the following definitions we use ??xy instead of ^^xy
  % to avoid errors when reading the macro definitions with
  % TeX 2.x (remember ^^e(6) is the comment character):
  %
  \catcode`\?=7
  %
  % Define \a and \o to be \ae resp. \oe in font encoding T1:
  \def\a{??e6} % \ae
  \def\o{??f7} % \oe
  %
  \catcode`\?=12
  %
\else
  %
  % For TeX 2:
  % ----------
  %
  % Ignore ligatures \ae and \oe in font encoding T1:
  \def\n#1{}
  %
  % Define \a and \o (= \ae, \oe in font encoding T1) to
  % signal an error:
  \def\a{\errmessage{Hyphenation pattern file corrupted!}}
  \def\o{\errmessage{Hyphenation pattern file corrupted!}}
  %
\fi
%
%
% In case this file is used to hyphenate both latin and italian
% (for italian you should prefer `ithyph.tex'):
\lccode`\'=`\'
%
%
\patterns{%
2'2
.ab2s3  .a2b3l
.anti1  .anti3m2n
.ca4p3s .circu2m1
.co2n1iun
.di2s3cine
.e2x1
.o2b3                                % .o2b3l  .o2b3r .o2b3s
.para1i  .para1u
.pre1i   .pro1i
.su2b3lu .su2b3r
2s3que.  2s3dem.
3p2sic
3p2neu
\ae1 \oe1                            % Ligatures ae and oe (in OT1)
\n{\a1} \n{\o1}                      % Ligatures ae and oe (in T1)
a1ia a1ie  a1io  a1iu ae1a ae1o ae1u
e1iu
io1i
o1ia o1ie  o1io  o1iu
u1u  uo3u
1b   2bb   2bd   b2l   2bm  2bn  b2r  2bt  2bs  2b.
1c   2cc   c2h2  c2l   2cm  2cn  2cq  c2r  2cs  2ct  2cz  2c.
1d   2dd   2dg   2dm   d2r  2ds  2dv  2d.
1f   2ff   f2l   2fn   f2r  2ft  2f.
1g   2gg   2gd   2gf   g2l  2gm  g2n  g2r  2gs  2gv  2g.
1h   2hp   2ht   2h.
1j
1k   2kk   k2h2
1l   2lb   2lc   2ld   2lf  l3f2t 2lg 2lk  2ll  2lm  2ln  2lp  2lq  2lr
     2ls   2lt   2lv   2l.
1m   2mm   2mb   2mp   2ml  2mn  2mq  2mr  2mv  2m.
1n   2nb   2nc   2nd   2nf  2ng  2nl  2nm  2nn  2np  2nq  2nr  2ns
     n2s3m n2s3f 2nt   2nv  2nx  2n.
1p   p2h   p2l   2pn   2pp  p2r  2ps  2pt  2pz  2php 2pht 2p.
1q
1r   2rb   2rc   2rd   2rf  2rg  r2h  2rl  2rm  2rn  2rp  2rq  2rr  2rs  2rt
     2rv   2rz   2r.
1s2  2s3ph 2s3s  2stb  2stc 2std 2stf 2stg 2st3l     2stm 2stn 2stp 2stq
     2sts  2stt  2stv  2s.  2st.
1t   2tb   2tc   2td   2tf  2tg  t2h  t2l  t2r  2tm  2tn  2tp  2tq  2tt
     2tv   2t.
1v   v2l   v2r   2vv
1x   2xt   2xx   2x.
1z   2z.
}
\endgroup
%
\endinput
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 For documentation see:
 C. Beccari, "Computer aided hyphenation for Italian and Modern
       Latin", TUG vol. 13, n. 1, pp. 23-33 (1992)

 see also

 C. Beccari, "Typesetting of ancient languages",
             TUG vol.15, n.1, pp. 9-16 (1994)

 In the preceding paper the code is described as file ITALAT.TEX; this is
 substantially the same code, but the file has been renamed LAHYPH.TEX
 in accordance with the ISO name for latin and the convention that all
 hyphenation pattern file names should be formed by the agglutination of
 two letter language ISO code and the abbreviation HYPH.

 A corresponding file (ITHYPH.TEX) has been extracted in order to eliminate
 the (few) patterns specific to latin and leave those specific to italian;
 ITHYPH.TEX has been further extended with many new patterns in order to
 cope with the many neologisms and technical terms with a foreign root.
 Nonetheless this file hyphenates both languages as described in the above
 paper.

 Should you find any word that gets hyphenated in a wrong way, please, AFTER
 CHECKING ON A RELIABLE MODERN DICTIONARY, report to the author, preferably
 by e-mail. In particular remember that these patterns are for latin in
 modern spelling, not for medieval latin. If you have to deal with medieval
 latin you'd better get the hyphenation patterns prepared by Yannis
 Haralambous (TUGboat, vol.13 n.4 (1992)).

 LOADING THE PATTERNS

 Use BABEL !

 BABEL implies a new hyphen.tex file that substitutes the default one; in
 the new hyphen.tex file new definitions are given for selecting different
 languages and typesetting styles. During the initialization of LaTeX,
 babel reads another  file, language.dat, which contains the names of
 the desired languages and the corresponding pattern files. During
 document compilation babel seeks a language definition file such as
 french.ldf, italian.ldf, or the like, where programming shortcuts and
 typesetting style parameters and definitions are established. Up to now
 there is no file named latin.ldf, because it is assumed that latin
 is not used to typeset a whole document in this language from the title
 page to the index; instead it is supposed that latin is used to typeset
 some text within a document whose main language is a modern one.
 Therefore no shortcuts are available for latin as they are for german,
 for example, where the double quote is made active and the sequence "- is
 used for inserting a soft discretionary in order to divide compound words
 on the compound word boundary. The same trick might be useful in latin in
 place of the hack that is proposed in the following section.

 1) Edit language.dat by adding a line such as this:

 latin lahyph.tex

 2) Run the initializer and rebuild the format file latex.fmt.
    If you use MiKTeX this is as simple as giving the line command

 makefmt latex

    If you use another TeX/LaTeX system rebuild the format file latex.fmt
    according to the documentation of your system.


 PREFIXES AND SUFFIXES

 For what concern prefixes and suffixes, the latter are generally separated
 according to "natural" syllabification, while the former are generally
 divided etimologically. In order to avoid an excessive number of patterns,
 care has been paid to some prefixes, especially "ex", "trans",
 "circum", "prae", etc., but this set of patterns is NOT capable of
 separating the prefixes in all circumstances.

 In order to allow the composer to introduce soft discretionary hyphens, this
 file contains the redefinition of the underscore character (_) to be used
 as a soft discretionary hyphen, in contrast to \- that inserts a hard one;
 this means that, e.g., trans_ierat corresponds to the possible hyphenation
 trans-ie-rat, while trans\-ierat corresponds to trans-ierat.

 Since the underscore is used (outside TeX math mode) quite often, for
 example in file names, in  labels, and other cross references,
 according to the composer's habits, the definition of the underscore with
 its discretionary hyphen very easily breaks apart, giving raise to
 uncontrollable TeX errors. Therefore the underscore redefinition is
 clearly marked in the following, but if you know what you are doing, you
 may extract it and use it.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

        Soft discretionary hyphens by means of the underscore

 ----> EXTRACT THE FOLLOWING 10 LINES IF YOU WANT THIS FACILITY <-----
 ---->            BE SURE YOU KNOW WHAT YOU ARE DOING           <-----

\toks255=\expandafter{\the\catcode`\@}
\catcode`\@=11
\def\softdiscretionary{\penalty\@M
                       \discretionary{-}{}{}\penalty\@M\hskip\z@skip}
\let\sb@=_
\catcode`\_=13
\def\psb@{\ifmmode\sb@\else\softdiscretionary\fi}
\def_{\protect\psb@}
\catcode`\@=\the\toks255

 P.S. move the above code to the preamble of your document
 or to a personal extension (.sty) file.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> CUT HERE
