summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/frankenstein/titles.stq
blob: c540e9a534840b0d18744a38155f31daa347a91d (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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
%%
%% This is file `titles.stq',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% titles.sty 
%% 
%%     This program is part of the Frankenstein bundle for LaTeX.
%% 
%%     Copyright (C) 1995-2001 Matthew Swift <swift@alum.mit.edu>
%% 
%%     This file may have one of TWO names, either
%%     titles.sty or titles.stq.  This
%%     LaTeX package will work ONLY if it is called titles.sty
%%     and placed in a proper directory.  This file should have been
%%     distributed to you with a DIFFERENT file (also) called
%%     titles.sty which functions identically to this one
%%     but contains documentation in comments.  This file works faster,
%%     but the other should be kept because it contains the documentation
%%     for this LaTeX package. Files called README and INSTALL should have
%%     also been distributed to you with this file; see them for more
%%     information.
%% 
%%     This program is free software; you may redistribute it and/or
%%     modify it under the conditions of the LaTeX Project Public
%%     License, either version 1.2 or (at your option) any later version.
%%     The latest version of this license is in
%%     http://www.latex-project.org/lppl.txt, and version 1.2 or later is
%%     part of all distributions of LaTeX version 1999/12/01 or later.
%% 
%%     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
%%     LaTeX Project Public License for more details.
%% 
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\def\fileinfo{title macros (Frankenstein's references)}
\def\DoXPackageS {}
\def\initelyHavECitationS {}
\def\fileversion{v1.2}
\def\filedate{2001/08/31}
\def\docdate{2001/08/31}
\edef\PPOptArg {%
  \filedate\space \fileversion\space \fileinfo
}
\makeatletter% A special comment to help create bst files.  Don't change!
\@ifundefined{JusTLoaDInformatioN} {%
  }{% ELSE (we know the compsci package is already loaded, too)
  \UndefineCS\JusTLoaDInformatioN
  \SaveDoXVarS
  \eExpand\csname DoXPackageS\endcsname\In {%use \csname in case it's undefined
    \usepackage{#1}%
  }%
  \RestoreDoXVarS
  \makeatother
  \endinput
}% A special comment to help create bst files.  Don't change!
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{titles}[\PPOptArg]
%%
\RequirePackage{moredefs,slemph}
\ReserveCS\ti@domelater
\DeclareOption{british} {%
  \def\ti@domelater {%
    \let\Wrapquotes\WrapquotesNN
    \@doublequotes@false
  }
}
\DeclareOption{american} {%
  \def\ti@domelater {%
    \let\Wrapquotes\WrapquotesNS
    \@doublequotes@true
  }
}
\ExecuteOptions{american}
\ProcessOptions
\newcommand\IfQuestionOrExclamation [1] {%
  \@tempswafalse
  \ti@checkfor@q #1?\@nil
  \ti@checkfor@e #1!\@nil
  \if@tempswa
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
\newboolean{@ti@sw@}
\ReserveCS\ti@prev
\ReserveCS\ti@prev@prev
\NewName{ti@checkfor@q} {#1?#2\@nil} {%
  \def\sc@t@a{#2}%
  \def\sc@t@b{?}%
  \ifx\sc@t@a\ShortEmpty
  \else
    \ifx\sc@t@a\sc@t@b
      \@tempswatrue
    \else
      \let\ti@prev\sc@t@a
      \let\ti@prev@prev\sc@t@a
      \@ti@sw@true
      \@whilesw \if@ti@sw@ \fi {%
        \ifx\sc@t@a\ShortEmpty
          \@ti@sw@false
        \else
          \let\ti@prev@prev\ti@prev
          \let\ti@prev\sc@t@a
          \edef\sc@t@a{\E@cdr\sc@t@a\@nil}%
        \fi
      }%
      \edef\ti@prev@prev{\E@car\ti@prev@prev\@nil}%
      \ifx\ti@prev@prev\sc@t@b
        \@tempswatrue
      \fi
    \fi
  \fi
}
\NewName{ti@checkfor@e} {#1!#2\@nil} {%
  \def\sc@t@a{#2}%
  \def\sc@t@b{!}%
  \ifx\sc@t@a\ShortEmpty
  \else
    \ifx\sc@t@a\sc@t@b
      \@tempswatrue
    \else
      \let\ti@prev\sc@t@a
      \let\ti@prev@prev\sc@t@a
      \@ti@sw@true
      \@whilesw \if@ti@sw@ \fi {%
        \ifx\sc@t@a\ShortEmpty
          \@ti@sw@false
        \else
          \let\ti@prev@prev\ti@prev
          \let\ti@prev\sc@t@a
          \edef\sc@t@a{\E@cdr\sc@t@a\@nil}%
        \fi
      }%
      \edef\ti@prev@prev{\E@car\ti@prev@prev\@nil}%
      \ifx\ti@prev@prev\sc@t@b
        \@tempswatrue
      \fi
    \fi
  \fi
}
\newcommand*\ti@wrapquotes@suck [1] {%
  \IfQuestionOrExclamation {#1} {%
      \ti@wrapquotes@nosuck{#1}%
    }{% ELSE
    \begingroup
      \if@doublequotes@
        \@doublequotes@false
        \def\sc@t@a {\ti@open@double #1\ti@close@double@suck}%
      \else
        \@doublequotes@true
        \def\sc@t@a {\ti@open@single #1\ti@close@single@suck}%
      \fi
      \sc@t@a
    \endgroup
    }%
}
\newcommand*\ti@wrapquotes@nosuck [1] {%
  \begingroup
    \if@doublequotes@
      \@doublequotes@false
      \def\sc@t@a {\ti@open@double #1\ti@close@double@nosuck}%
    \else
      \@doublequotes@true
      \def\sc@t@a {\ti@open@single #1\ti@close@single@nosuck}%
    \fi
    \sc@t@a
  \endgroup
}
\newboolean{@doublequotes@}
\newcommand*\WrapquotesNS {%
  \ti@wrapquotes@suck
}
\newcommand*\WrapquotesIS {%
  \ToggleBoolean{@doublequotes@}%
  \ti@wrapquotes@suck
}
\newcommand*\WrapquotesNN {%
  \ti@wrapquotes@nosuck
}
\newcommand*\WrapquotesIN {%
  \ToggleBoolean{@doublequotes@}%
  \ti@wrapquotes@nosuck
}
\newcommand*\WrapquotesSN [1] {%
  \begingroup
    \ti@open@single #1\ti@close@single@nosuck
  \endgroup
}
\newcommand*\WrapquotesDN [1] {%
  \begingroup
    \ti@open@double #1\ti@close@double@nosuck
  \endgroup
}
\newcommand*\WrapquotesSK [1] {% FIX: test
  \begingroup
    \ti@open@single #1\ti@close@single@nosuck\@%
  \endgroup
}
\ReserveCS\Wrapquotes
\ti@domelater
\newcommand\ti@open@double {%
  \gdef\sc@t@f {\textquotedblleft}%
  \ti@openquote
}
\newcommand\ti@open@single {%
  \gdef\sc@t@f {\textquoteleft}%
  \ti@openquote
}
\newcommand\ti@openquote {%
  \futurelet\sc@t@a\ti@@openquote
}
\newcommand\ti@@openquote {%
  \sc@t@f
  \ifx\sc@t@a\WrapquotesNS
    \,%
  \else \ifx\sc@t@a\WrapquotesNN
    \,%
  \else \ifx\sc@t@a\WrapquotesIN
    \,%
  \else \ifx\sc@t@a\WrapquotesIS
    \,%
  \else \ifx\sc@t@a\WrapquotesSN
    \,%
  \else \ifx\sc@t@a\WrapquotesDN
    \,%
  \else \ifx\sc@t@a\WrapquotesSK
    \,%
  \else
  \fi \fi \fi \fi \fi \fi \fi
}
\newcommand*\ti@close@single@nosuck {%
  \aftergroup\ti@close@single@@nosuck
}
\newcommand*\ti@close@double@nosuck {%
  \aftergroup\ti@close@double@@nosuck
}
\newcommand*\ti@close@single@@nosuck {%
  \gdef\sc@t@f {\textquoteright}%
  \ti@close@quote@nosuck
}
\newcommand*\ti@close@double@@nosuck {%
  \gdef\sc@t@f {\textquotedblright}%
  \ti@close@quote@nosuck
}
\newboolean{@look@nosuck@}
\@look@nosuck@false
\newcommand\ti@close@quote@nosuck {%
  \@look@nosuck@true
%% FIX
  \expandafter \ti@q@ifnextcharin \expandafter {\nospacelist} {%
      \sc@t@f
    }{% ELSE
      \sc@t@f\space
  }%
}
\newcommand\ti@close@double@suck {%
  \aftergroup\ti@close@double@@suck
}
\newcommand\ti@close@single@suck {%
  \aftergroup\ti@close@single@@suck
}
\newcommand\ti@close@double@@suck {%
  \gdef\sc@t@f {\textquotedblright}%
  \ti@close@quote@suck
}
\newcommand\ti@close@single@@suck {%
  \gdef\sc@t@f {\textquoteright}%
  \ti@close@quote@suck
}
\requirecommand\nospacelist {%
  ,.':;?-/\slash~!)]\bgroup\egroup\@sptoken\ \space\/\@xobeysp
}
\newcommand\ti@close@quote@suck {%
  \@look@nosuck@false
  \ti@q@ifnextcharin {.,} {%
      \sc@t@c\sc@t@f\DGobbleM % This gobbles the original punctuation.
    }{% ELSE
    \@look@nosuck@true
    \expandafter \ti@q@ifnextcharin \expandafter {\nospacelist} {%
        \sc@t@f
      }{% ELSE
      \sc@t@f\space
    }%
  }%
}
%% FIX
\newcommand\ti@q@ifnextcharin [3] {% args: charlist true false
  \gdef\sc@t@e {#1}%
  \gdef\sc@t@a {#2}%
  \gdef\sc@t@b {#3}%
  \ti@q@check
}
\newcommand\ti@q@check {%
  \futurelet\sc@t@c\ti@q@ifnch
}
%%    \verb*|\ |
\newcommand\ti@q@ifnch {%
  \ifx\sc@t@c\ifvmode
    \let\sc@t@d\ti@q@handle@ifvmode
  \else
    \let\sc@t@d\ti@q@@ifnch
  \fi
  \sc@t@d
}
\newcommand\ti@q@@ifnch {%
  \ifx\sc@t@c\check@icr
    \defcommand\sc@t@d [1] {%
      ##1\aftergroup\ti@q@check
    }%
  \else \ifx\sc@t@c\endgroup
    \def\sc@t@d {\aftergroup\ti@q@check}%
  \else \ifx\sc@t@c\@sptoken
    \let\sc@t@d\ti@q@handle@space
  \else \ifx\sc@t@c\egroup
    \def\sc@t@d {\aftergroup\ti@q@check}%
  \else \ifx\sc@t@c\ti@close@double@suck
    \let\sc@t@d\ti@q@handle@double@suck
  \else \ifx\sc@t@c\ti@close@single@suck
    \let\sc@t@d\ti@q@handle@single@suck
  \else \ifx\sc@t@c\ti@close@double@nosuck
    \let\sc@t@d\ti@q@handle@double@nosuck
  \else \ifx\sc@t@c\ti@close@single@nosuck
    \let\sc@t@d\ti@q@handle@single@nosuck
  \else
              \@tempswafalse
              \expandafter   \@tfor
                \expandafter \sc@t@g
                \expandafter :%
                \expandafter =%
                             \sc@t@e
                             \do {%
                  \expandafter\ifx\sc@t@g\sc@t@c
                  \@tempswatrue
                  \@break@tfor
                \else
                \fi
              }%
              \if@tempswa
                \let\sc@t@d\sc@t@a % the ``true'' clause
              \else
                \let\sc@t@d\sc@t@b % the ``false'' clause
              \fi
  \fi \fi \fi \fi \fi \fi \fi \fi
  \sc@t@d
}
\newcommand\ti@q@handle@ifvmode {%
  \FrankenInfo{titles}
    {Handling an \string\ifvmode\space following a title.\MessageBreak
     If you now get an error that \string\sc@t@d\space does not\MessageBreak
     match its definition, this \string\ifvmode\space is\MessageBreak
     unexpected}%
  \DefName{sc@t@d} {\ifvmode\else\check@icr\fi} {%
    \ifvmode
    \else
      \check@icr
    \fi
    \aftergroup\ti@q@check
  }%
  \sc@t@d
}
\ReserveCS\ti@q@handle@space
\let\sc@t@a\:
\def\:{\ti@q@handle@space} \expandafter\def\: {\ti@q@check}
\let\:\sc@t@a
\newcommand*\ti@q@handle@double@suck [1] {%
  \g@addto@macro\sc@t@f {\,\textquotedblright}%
  \ti@q@check
}
\newcommand*\ti@q@handle@single@suck [1] {%
  \g@addto@macro\sc@t@f {\,\textquoteright}%
  \ti@q@check
}
\newcommand*\ti@q@handle@double@nosuck [1] {%
  \if@look@nosuck@
      \g@addto@macro\sc@t@f {\,\textquotedblright}%
      \let\sc@t@d\sc@t@a % the ``true'' clause of ti@q@ifnextcharin
  \else
    \let\sc@t@d\sc@t@b % the ``false'' clause of ti@q@ifnextcharin
  \fi
  \ti@q@check
}
\newcommand*\ti@q@handle@single@nosuck [1] {%
  \if@look@nosuck@
      \g@addto@macro\sc@t@f {\,\textquoteright}%
      \let\sc@t@d\sc@t@a % the ``true'' clause of ti@q@ifnextcharin
  \else
    \let\sc@t@d\sc@t@b % the ``false'' clause of ti@q@ifnextcharin
  \fi
  \ti@q@check
}
\newlet\word\textitswitch
\newlet\foreign\textitswitch
\newcommand\foreignword [1] {%
  \phrase{\word{#1}}%
}

\newcommand\phrase [1] {%
  \textquoteleft #1\textquoteright\@%
}
\newlet\term\textitswitch
\newlet\defn\textslswitch
\newlet\book\textitswitch
\newlet\journal\textitswitch
\newlet\music\textitswitch
\newlet\article\Wrapquotes
\newlet\storytitle\Wrapquotes
\newlet\poemtitle\Wrapquotes
\newlet\play\textitswitch % \manualref{7.145}
\newlet\craft\textitswitch
\newlet\species\textitswitch
\InputIfFileExists{titles.cfg}{}{}
\endinput
%%
%% End of file `titles.stq'.