summaryrefslogtreecommitdiff
path: root/language/chinese/CJK/cjk-4.8.5/utils/pyhyphen/pinyin.ldf
blob: a92b42253fef247d625a4fd4bdb723e776e0f6c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
% This is the file pinyin.ldf of the CJK package
%   for hyphenating Chinese pinyin syllables.
%
%
% created by Werner Lemberg <wl@gnu.org>
%
% Version 4.8.5 (16-Oct-2021)

% Copyright (C) 1994-2021  Werner Lemberg <wl@gnu.org>
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program in doc/COPYING; if not, write to the Free
% Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
% MA 02110-1301 USA


% Two shorthands are defined for pinyin.
%
%   "u   This represents `u umlaut'.
%
%   "'   This represents the apostrophe used to resolve syllabic
%        ambiguities as in
%
%          Tien'anmen  ,
%
%        which should be thus typed in as
%
%          Tien"'anmen  .
%
%        Internally, this converts to a discretionary hyphen, since the
%        apostrophe should vanish after a line break.


\ProvidesLanguage{pinyin}
        [CJK 4.8.5 pinyin support for the babel system]

\LdfInit{pinyin}{captionspinyin}

\ifx\l@pinyin\@undefined
  \@nopatterns{pinyin}
  \adddialect\l@pinyin0
\fi

\providehyphenmins{pinyin}{\@ne\tw@}
\def\captionspinyin{}
\def\datepinyin{}

\initiate@active@char{"}

\addto\extraspinyin{\languageshorthands{pinyin}}
\addto\extraspinyin{\bbl@activate{"}}
\addto\extraspinyin{\babel@save\"\umlautlow}

\addto\noextraspinyin{\umlauthigh}

\declare@shorthand{pinyin}{"u}{\textormath{\"{u}\allowhyphens}{\ddot u}}
\declare@shorthand{pinyin}{"U}{\textormath{\"{U}\allowhyphens}{\ddot U}}
\declare@shorthand{pinyin}{"'}{\textormath{\discretionary{-}{}{'}}{'}}

\def\mdqon{\shorthandon{"}}
\def\mdqoff{\shorthandoff{"}}

\ldf@finish{pinyin}

\endinput