Debian Codegraph @

texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-english.mbs

raw
1 % \iffalse meta-comment -*- mode: doctex -*-
2 %
3 % English language definition file of the master bibliography style
4 % for The Canadian Journal of Statistics | La revue canadienne de
5 % statistique
6 %
7 % Copyright (C) 2023-2026 Statistical Society of Canada | Société
8 % canadienne de statistique
9 %
10 % This file may be distributed and/or modified under the conditions
11 % of the LaTeX Project Public License, either version 1.3c of this
12 % license or (at your option) any later version. The latest version
13 % of this license is in:
14 %
15 % https://www.latex-project.org/lppl.txt
16 %
17 % The documentation is also licensed under CC BY-SA 4.0 International.
18 % To view a copy of this license, visit:
19 %
20 % https://creativecommons.org/licenses/by-sa/4.0/
21 %
22 % This work has the LPPL maintenance status `maintained'.
23 %
24 % The Current Maintainer of this work is Vincent Goulet
25 % <[email protected]>.
26 %
27 % This work derives from english.mbs, part of the custom-bib
28 % collection, a contribution to the LaTeX2e system.
29 % Copyright 1994-2002 Patrick W Daly
30 % Max-Planck-Institut f\"ur Sonnensystemforschung
31 % Max-Planck-Str. 2
32 % D-37191 Katlenburg-Lindau
33 % Germany
34 % E-mail: [email protected]
35 %
36 %-------------------------------------------------------------------
37 % Begin module:
38 %\fi
39 % \ProvidesFile{cjs-rcs-english.mbs}[2026/03/05 v2.0 (VG, PWD)]
40 %\iffalse
41 %<*a&!a>
42 % The following ensures that the driver part is not seen by makebst
43 % The driver part must not contain any \end other than \end{document} !
44 \ifx\endoptions\undefined\let\tempx=\relax\else
45 \long\def\tempx#1\end#2{}\fi\tempx
46 %</a&!a>
47 %<*driver>
48 \NeedsTeXFormat{LaTeX2e}%
49 \documentclass[nocjs,x11names,french,english]{cjs-rcs-article}
50
51 %% Loading doc.sty creates some conflicts with the class and memoir. We
52 %% need to:
53 %%
54 %% - keep a copy of the class' \maketitle command;
55 %% - undefine the 'glossary' environment created by memoir;
56 %% - restore the standard LaTeX commands for the glossary that
57 %% doc.sty relies upon.
58 \let\makeCJStitle\maketitle % keep class definition
59 \let\theglossary\relax % avoid conflict with doc.sty
60 \let\endtheglossary\relax % avoid conflict with doc.sty
61 \makeatletter
62 \def\makeglossary{%
63 \newwrite\@glossaryfile
64 \immediate\openout\@glossaryfile=\jobname.glo
65 \def\glossary{\@bsphack\begingroup
66 \@sanitize
67 \@wrglossary}\typeout
68 {Writing glossary file \jobname.glo }%
69 \let\makeglossary\@empty
70 }
71 \@onlypreamble\makeglossary
72 \def\@wrglossary#1{%
73 \protected@write\@glossaryfile{}%
74 {\string\glossaryentry{#1}{\thepage}}%
75 \endgroup
76 \@esphack}
77 \def\glossary{\@bsphack\begingroup\@sanitize\@index}
78 \@twosidefalse\@mparswitchfalse % turn off twoside option
79 \makeatother
80 \usepackage{doc}
81 \def\changes#1#2#3{\glossary{#1>#3}} % simplified
82 \DisableCrossrefs
83 \CodelineNumbered
84 \RecordChanges
85 \OnlyDescription
86 \DontCheckModules
87
88 \AtEndPreamble{%
89 \hypersetup{%
90 pdfauthor = {Statistical Society of Canada},
91 pdftitle = {French language definition file cjs-rcs-french.mbs}}}
92
93 %% Configuration of the glossary
94 \addto\extrasenglish{%
95 \def\glossaryname{History of changes}}
96 \GlossaryPrologue{\section*{\glossaryname}%
97 \addcontentsline{toc}{section}{\glossaryname}}
98 \setlength{\GlossaryMin}{5cm}
99
100 %% Additional semantic typesetting
101 \let\class\textsf
102 \newcommand*\dtx{\textsf{docstrip}}
103
104 %% Name of the journal
105 \makeatletter
106 \newcommand*\TheCJS{\@ifstar{\emph{The Journal}}{\emph{\CJS@journalname@en}}}
107 \newcommand*\LaRevue{\@ifstar{\emph{La revue}}{\emph{\CJS@journalname@fr}}}
108 \newcommand*\CJSclass{\class{cjs-rcs-article}}
109 \newcommand*\CJSbsten{\texttt{cjs-rcs-en.bst}}
110 \newcommand*\CJSbstfr{\texttt{cjs-rcs-fr.bst}}
111 \newcommand*\SSCen{Statistical Society of Canada}
112 \newcommand*\SSCfr{Société statistique du Canada}
113 \makeatother
114
115 %% Redefine \year using information from \filedate instead of using
116 %% compilation time
117 \def\parsedate#1/#2/#3\relax{\def\year{#1}}
118
119 \MakeShortVerb{\|}
120
121 \begin{document}
122 \DocInput{cjs-rcs-english.mbs}
123 \end{document}
124 %</driver>
125 % end of meta-comment \fi
126 % \GetFileInfo{cjs-rcs-english.mbs}
127 % \expandafter\parsedate\filedate\relax
128 %
129 % \changes{1.0}{2023-11-29}{First official release distributed through
130 % CTAN.}
131 % \changes{0.93}{2023-11-06}{Add a prefix v in the version number like
132 % the main file.}
133 % \changes{0.9}{2023-10-14}{Initial version based on version 4.2 of
134 % \texttt{english.mbs} from \textbf{custom-bib}.}
135 %
136 % \title[English language definition file \filename]{%
137 % English language definition file \\
138 % of the master bibliographic style file \\
139 % for \TheCJS}
140 % \author{Statistical Society of Canada}
141 % \affil{Developed by Vincent Goulet, Université Laval}
142 %
143 % \begin{englishabstract}
144 % The list of references in {\TheCJS} is typeset using the
145 % bibliographic styles {\CJSbsten} for articles in English and
146 % {\CJSbstfr} for articles in French. These styles are created using
147 % the program \texttt{makebst} from the master bibliographic file
148 % \texttt{cjs-rcs-merlin.mbs}, and the language definition files
149 % \texttt{cjs-rcs-english.mbs} and \texttt{cjs-rcs-french.mbs}.
150 % \end{englishabstract}
151 % \begin{frenchabstract}
152 % La liste des références dans {\LaRevue} est composée avec les
153 % style de bibliographie {\CJSbstfr} pour les articles en français
154 % et {\CJSbsten} pour les articles en anglais. Ceux-ci sont générés
155 % par le programme \texttt{makebst} à partir du fichier maitre
156 % \texttt{cjs-rcs-merlin.mbs} et des fichiers de localisation
157 % \texttt{cjs-rcs-english.mbs} et \texttt{cjs-rcs-french.mbs}.
158 % \end{frenchabstract}
159 %
160 % ^^A abusing the 'classification' environment. The final period is
161 % ^^A added by the environment.
162 % \begin{classification}[Version]
163 % \item[] This is the documentation for the file \code{\filename}
164 % {\fileversion}, dated {\filedate}
165 % \end{classification}
166 %
167 % \licence{{\ccbysa*} 2023--{\year}, {\SSCen}~{\textbar}~{\SSCfr}}
168 %
169 % \makeCJStitle
170 %
171 % \section{Introduction}
172 %
173 % This file is to be used as a language definition file with the
174 % master bibliographic file for {\TheCJS}. The language it defines is
175 % English.
176 %
177 % This is not a self-sufficient \texttt{.mbs} file, but rather may
178 % be used together with one that contains language support via
179 % external definition files.
180 %
181 % See the documentation for \texttt{makebst} for formatting details.
182 %
183 % \section{The Menu Information}
184 %
185 % All the menu information is nested between \dtx{} guard options
186 % |%<*options>| \dots\ |%</options>|, and the last command is
187 % |\endoptions|. The rest of the file is nested between |%<*!options&!driver>|
188 % \dots\ |%</!options&!driver>| in order to exclude it if \dtx{} is used to
189 % extract only the menu information or the documentation driver.
190 %
191 % \begin{macrocode}
192 %<*options>
193 \mes{^^JOptions for ENGLISH}
194 \wr{\spsp\spsp english,\pc: English language}
195
196 \beginoptiongroup{ABBREVIATE WORD `PAGES'}{}
197 \optdef{*}{}{`Page(s)'}{(no abbreviation)}
198 \optdef{a}{pp}{`Page' abbreviated}{as p. or pp.}
199 \optdef{x}{ppx}{`Page' omitted}{}
200 \getans
201 \endoptiongroup
202 \beginoptiongroup{ABBREVIATE WORD `EDITORS':}{}
203 \optdef{*}{}{`Editor(s)'}{(no abbreviation)}
204 \optdef{a}{ed}{`Editor' abbreviated}{as ed. or eds.}
205 \getans
206 \endoptiongroup
207 \beginoptiongroup{OTHER ABBREVIATIONS:}{}
208 \optdef{*}{}{No abbreviations}{of volume, edition, chapter, etc}
209 \optdef{a}{abr}{Abbreviations}{of such words}
210 \getans
211 \endoptiongroup
212 \beginoptiongroup{ABBREVIATION FOR `EDITION'
213 (if abbreviating words)}
214 {\if\ans a*\fi}%
215 \optdef{*}{}{`Edition' abbreviated as `edn'}{}
216 \optdef{a}{ednx}{`Edition' abbreviated as `ed'}{}
217 \getans
218 \beginoptiongroup{MONTHS WITH DOTS:}{}
219 \optdef{*}{}{Months with dots}{as Jan.}
220 \optdef{x}{mth-bare}{Months without dots}{as Feb Mar}
221 \getans
222 \endoptiongroup
223 \endoptiongroup
224 \beginoptiongroup{EDITION NUMBERS:}{}
225 \optdef{*}{xedn}{Editions as in database}{saving much processing memory}
226 \optdef{w}{}{Write out editions}{as first, second, third, etc}
227 \optdef{n}{ord}{Numerical editions}{as 1st, 2nd, 3rd, etc}
228 \getans
229 \endoptiongroup
230 \endoptions
231 %</options>
232 % \end{macrocode}
233 %
234 % \StopEventually{\PrintChanges}
235 %
236 % \section{The Coding}
237 % \begin{macrocode}
238 %<*!options&!driver>
239
240 % The language selected here is ENGLISH
241 FUNCTION {bbl.and}
242 { "and"}
243
244 FUNCTION {bbl.etal}
245 { "et~al." }
246
247 FUNCTION {bbl.editors}
248 %<!ed>{ "editors" }
249 %<ed>{ "eds." }
250
251 FUNCTION {bbl.editor}
252 %<!ed>{ "editor" }
253 %<ed>{ "ed." }
254
255 FUNCTION {bbl.edby}
256 { "edited by" }
257
258 FUNCTION {bbl.edition}
259 %<!abr>{ "edition" }
260 %<abr&!ednx>{ "edn." }
261 %<abr&ednx>{ "ed." }
262
263 FUNCTION {bbl.volume}
264 %<!abr>{ "volume" }
265 %<abr>{ "vol." }
266
267 FUNCTION {bbl.of}
268 { "of" }
269
270 FUNCTION {bbl.number}
271 %<!abr>{ "number" }
272 %<abr>{ "no." }
273
274 FUNCTION {bbl.nr}
275 { "no." }
276
277 FUNCTION {bbl.in}
278 { "in" }
279
280 FUNCTION {bbl.pages}
281 %<!pp&!ppx>{ "pages" }
282 %<pp>{ "pp." }
283 %<!pp&ppx>{ "" }
284
285 FUNCTION {bbl.page}
286 %<!pp&!ppx>{ "page" }
287 %<pp>{ "p." }
288 %<!pp&ppx>{ "" }
289
290 %<*revdata>
291 FUNCTION {bbl.eidpp}
292 { "pages" }
293
294 %</revdata>
295 FUNCTION {bbl.chapter}
296 %<!abr>{ "chapter" }
297 %<abr>{ "chap." }
298
299 FUNCTION {bbl.techrep}
300 %<!abr>{ "Technical Report" }
301 %<abr>{ "Tech. Rep." }
302
303 FUNCTION {bbl.mthesis}
304 { "Master's thesis" }
305
306 FUNCTION {bbl.phdthesis}
307 { "Ph.D. thesis" }
308
309 %<*!xedn>
310 FUNCTION {bbl.first}
311 %<!ord>{ "First" }
312 %<ord>{ "1st" }
313
314 FUNCTION {bbl.second}
315 %<!ord>{ "Second" }
316 %<ord>{ "2nd" }
317
318 FUNCTION {bbl.third}
319 %<!ord>{ "Third" }
320 %<ord>{ "3rd" }
321
322 FUNCTION {bbl.fourth}
323 %<!ord>{ "Fourth" }
324 %<ord>{ "4th" }
325
326 FUNCTION {bbl.fifth}
327 %<!ord>{ "Fifth" }
328 %<ord>{ "5th" }
329
330 FUNCTION {bbl.st}
331 { "st" }
332
333 FUNCTION {bbl.nd}
334 { "nd" }
335
336 FUNCTION {bbl.rd}
337 { "rd" }
338
339 FUNCTION {bbl.th}
340 { "th" }
341 % \end{macrocode}
342 % This function adds English endings for ordinals 1, 2, 3. However, if
343 % the second last digit is 1, then the ending is `th' for all last digits.
344 % So far, all other languages included do not have this problem, and it is
345 % sufficient to add the \textsl{th} equivalent. This might change with further
346 % languages.
347 %
348 % \begin{macrocode}
349 FUNCTION {eng.ord}
350 { duplicate$ "1" swap$ *
351 #-2 #1 substring$ "1" =
352 { bbl.th * }
353 { duplicate$ #-1 #1 substring$
354 duplicate$ "1" =
355 { pop$ bbl.st * }
356 { duplicate$ "2" =
357 { pop$ bbl.nd * }
358 { "3" =
359 { bbl.rd * }
360 { bbl.th * }
361 if$
362 }
363 if$
364 }
365 if$
366 }
367 if$
368 }
369
370 %</!xedn>
371 %<*!abr>
372 MACRO {jan} {"January"}
373
374 MACRO {feb} {"February"}
375
376 MACRO {mar} {"March"}
377
378 MACRO {apr} {"April"}
379
380 MACRO {may} {"May"}
381
382 MACRO {jun} {"June"}
383
384 MACRO {jul} {"July"}
385
386 MACRO {aug} {"August"}
387
388 MACRO {sep} {"September"}
389
390 MACRO {oct} {"October"}
391
392 MACRO {nov} {"November"}
393
394 MACRO {dec} {"December"}
395
396 %</!abr>
397 %<*abr>
398 MACRO {jan} {"Jan."}
399
400 MACRO {feb} {"Feb."}
401
402 MACRO {mar} {"Mar."}
403
404 MACRO {apr} {"Apr."}
405
406 MACRO {may} {"May"}
407
408 MACRO {jun} {"Jun."}
409
410 MACRO {jul} {"Jul."}
411
412 MACRO {aug} {"Aug."}
413
414 MACRO {sep} {"Sep."}
415
416 MACRO {oct} {"Oct."}
417
418 MACRO {nov} {"Nov."}
419
420 MACRO {dec} {"Dec."}
421
422 %</abr>
423 %</!options&!driver>
424 % End module: cjs-rcs-english.mbs
425 % \end{macrocode}
426 % \Finale