summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ecclesiastic/ecclesiastic.sty
blob: f8a2a0773fb589063ae8a07e695588d73e8ae1cf (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
%%
%% This is file `ecclesiastic.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ecclesiastic.dtx  (with options: `package')
%% 
%% Copyright 2012-2015 Claudio Beccari and Donald Goodman. All rights reserved.
%% 
%%  This system 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.
%% 
%% 
%% IMPORTANT NOTICE:
%% 
%% This file is subject to the LPPL licence, version 1.3 or any subsequent
%% version. Copy of the LaTeX Project Public Licence is downloadable from
%% any CTAN archive.
%% 
%% It may be distributed and/or modified under the
%% conditions of the above mentiond LaTeX Project Public License
%% 
%% This file has the LPPL maintenance status "author-maintained".
%% 
\NeedsTeXFormat{LaTeX2e}[1996/12/01]%
\ProvidesPackage{ecclesiastic}%
   [2015/08/20 v.0.3 Ecclesiastic composition of Latin]

\RequirePackage{iftex}
\unless\ifPDFTeX
\PackageError{ecclesiastic}{\MessageBreak
***********************************************\MessageBreak
* This package works only with pdfLaTeX       \MessageBreak
* Please do not load it when typesetting with \MessageBreak
* XeLaTeX or LuaLaTeX.                        \MessageBreak
***********************************************\MessageBreak
}{%
**********************************************************\MessageBreak
* Carefully read the documentation of package            \MessageBreak
* ecclesiastic, and understand why most functionalities  \MessageBreak
* of this package are obtained with completely different \MessageBreak
* means, thanks the use of OpenType fonts.               \MessageBreak
*                                                        \MessageBreak
* Input of this package is aborted.                      \MessageBreak
**********************************************************\MessageBreak
}
\expandafter\endinput
\fi
\def\CheckLatin{\unless\ifcsname captionslatin\endcsname
                 \PackageWarning{ecclesiastic}{\MessageBreak
                 latin must be specified as a global option\MessageBreak
                 or it must be passed as an option to babel\MessageBreak
                 \MessageBreak
                 Nothing done}\expandafter\endinput\fi}

\@ifpackageloaded{babel}{\CheckLatin}{%
           \PackageError{ecclesiastic}{\MessageBreak
           ************************************************\MessageBreak
           Package babel must be loaded before this package\MessageBreak
           ************************************************%
           }{Package loading is aborted}\endinput}
\let\og\empty\let\fg\empty%

   \def\FrenchGuillemetsFrom#1#2#3#4{%
     \DeclareFontEncoding{#1}{}{}%
     \DeclareFontSubstitution{#1}{#2}{m}{n}%
     \DeclareTextCommand{\guillemotleft}{T1}{%
        {\fontencoding{#1}\fontfamily{#2}\selectfont\char#3}}%
     \DeclareTextCommand{\guillemotright}{T1}{%
        {\fontencoding{#1}\fontfamily{#2}\selectfont\char#4}}}

   \let\FrenchGuillemotsFrom\FrenchGuillemetsFrom

\AtBeginDocument{%
\unless\ifcsname guillemotleft\endcsname
   \def\ToneGuillemets{\FrenchGuillemetsFrom{T1}{lmr}{19}{20}}\fi}
   \def\guill@spacing{\penalty\@M\hskip.3\fontdimen2\font
                       \@plus\z@\@minus\z@}
   \DeclareRobustCommand*{\begin@guill}{\leavevmode
                             \guillemotleft\penalty\@M\guill@spacing
                             \ignorespaces}
   \DeclareRobustCommand*{\end@guill}{\ifdim\lastskip>\z@\unskip\fi
                     \penalty\@M\guill@spacing\guillemotright{}}
   \addto\extraslatin{%
         \renewcommand{\og}{\begin@guill}\renewcommand{\fg}{\end@guill}%
   }
   \addto\noextraslatin{\let\og\empty\let\fg\empty}
\initiate@active@char{'}%
\addto\extraslatin{\bbl@activate{'}}%
\addto\noextraslatin{\bbl@deactivate{'}}%

\declare@shorthand{latin}{'a}{\@ifnextchar e{\'\ae\@gobble}{\'a}}
\declare@shorthand{latin}{'e}{\'e}
\declare@shorthand{latin}{'i}{\'i}
\declare@shorthand{latin}{'o}{\@ifnextchar e{\'\oe\@gobble}{\'o}}
\declare@shorthand{latin}{'u}{\'u}
\declare@shorthand{latin}{'y}{\'y}
\declare@shorthand{latin}{'A}{\@ifnextchar E{\'\AE\@gobble}{\'A}}
\declare@shorthand{latin}{'E}{\'E}
\declare@shorthand{latin}{'I}{\'I}
\declare@shorthand{latin}{'O}{\@ifnextchar E{\'\OE\@gobble}{\'O}}
\declare@shorthand{latin}{'U}{\'U}
\declare@shorthand{latin}{'Y}{\'Y}
\declare@shorthand{latin}{"}{%
\textormath{\def\lt@next{\futurelet\lt@temp\lt@cwm}}%
           {\def\lt@next{''}}\lt@next
}%
\def\lt@@cwm{\nobreak\discretionary{-}{}{}\nobreak\hskip\z@skip}%
\def\lt@@ocap#1{\begin@guill}\def\lt@@ccap#1{\end@guill}%
\DeclareRobustCommand\LT@cwm[2]{%
    \ifx#1a\bbl@afterelse
       \maybeae#1#2%
    \else\bbl@afterfi
        \testoe#1#2%
    \fi}
\def\maybeae#1#2{%
    \ifx#2e\bbl@afterelse
       \ae%
    \else\bbl@afterfi
        \lt@@cwm#1#2%
    \fi
}
\def\maybeoe#1#2{%
    \ifx#2e\bbl@afterelse
       \oe%
    \else\bbl@afterfi
       \lt@@cwm#1#2%
    \fi
}
\def\testoe#1#2{%
   \ifx#1o\bbl@afterelse
       \maybeoe#1#2%
   \else\bbl@afterfi
       \lt@@cwm#1#2%
   \fi}
\DeclareRobustCommand*{\lt@cwm}{\let\lt@@next\relax
\ifcat\noexpand\lt@temp e%
    \def\lt@@next{\LT@cwm}%
\else
    \if\noexpand\lt@temp \string|%
        \def\lt@@next{\lt@@cwm\@gobble}%
    \else
        \if\noexpand\lt@temp \string<%
            \def\lt@@next{\lt@@ocap}%
        \else
            \if\noexpand\lt@temp \string>%
                \def\lt@@next{\lt@@ccap}%
            \else
                \if\noexpand\lt@temp\string/%
                    \def\lt@@next{\slash\@gobble}%
                \else
                    \ifx\lt@temp"%
                        \def\lt@@next{``\@gobble}%
                    \fi
                \fi
            \fi
        \fi
    \fi
\fi
\lt@@next}%
\edef\puntoevirgola{\string;}\edef\cc@pv{\the\catcode`;}%
\edef\duepunti{\string:}\edef\cc@dp{\the\catcode`:}%
\edef\puntoesclamativo{\string!}\edef\cc@pe{\the\catcode`!}%
\edef\puntointerrogativo{\string?}\edef\cc@pi{\the\catcode`?}%
\initiate@active@char{;}
\initiate@active@char{:}
\initiate@active@char{!}
\initiate@active@char{?}
\addto\extraslatin{\bbl@activate{;}}
\addto\extraslatin{\bbl@activate{:}}
\addto\extraslatin{\bbl@activate{!}}
\addto\extraslatin{\bbl@activate{?}}
\addto\noextraslatin{\bbl@deactivate{;}}
\addto\noextraslatin{\bbl@deactivate{:}}
\addto\noextraslatin{\bbl@deactivate{!}}
\addto\noextraslatin{\bbl@deactivate{?}}
\def\punct@spacing{\penalty\@M\hskip.3\fontdimen2\font
                   \@plus\z@\@minus\z@}
\declare@shorthand{latin}{;}{\ifdim\lastskip>\z@\unskip\fi
      \punct@spacing\puntoevirgola}
\declare@shorthand{latin}{:}{\ifdim\lastskip>\z@\unskip\fi
      \punct@spacing\duepunti}
\declare@shorthand{latin}{!}{\ifdim\lastskip>\z@\unskip\fi
      \punct@spacing\puntoesclamativo}
\declare@shorthand{latin}{?}{\ifdim\lastskip>\z@\unskip\fi
      \punct@spacing\puntointerrogativo}
\let\lt@ori@makefntext\@makefntext
\newcommand\lt@makefntext[1]{%
    \parindent 1em%
    \noindent
    \lt@Makefnmark\enspace #1}
\newcommand\lt@Makefnmark{\hbox{\normalfont\@thefnmark.}}
\addto\extraslatin{\let\@makefntext\lt@makefntext}
\addto\noextraslatin{\let\@makefntext\lt@ori@makefntext}
\noextraslatin
%% This work consists of this file ecclesiastic.dtx, a README file,
%% a manifest.txt file and the derived files ecclesiastic.sty and
%% ecclesiastic.pdf.
%% 
%%
%% End of file `ecclesiastic.sty'.