11.3 Alternate Formatting
11.3.4 Formatting Features . 92
Using alternate formatting can be as easy as using any one of four predefined
\textSC
macros. These macros are analogous to the predefined formatting hooks that are
\textIT
accessible via package options. They always formattheir arguments when using
\textBF
thealtformatoption or \AltFormatActive. Theynever formattheir arguments
\textUC
when \AltFormatActive*is used or alternate formatting is disabled.
By themselves, they do not change format. Yet the macros\AltOff and\AltOn, described shortly, are able to turn the formatting of these macros on and off. We advise using\noexpand before these macros because they can be made to change format.
Assuming that we have sorted the following names with\PretagName(Section 7.6), we get the following, using this manual’s formatting conventions:
1 \Name[Konrad]{\noexpand\textSC{Zuse}};
2 \Name[Konrad]{\noexpand\textSC{Zuse}}\\
3 \Name[Ada]{\noexpand\textIT{Lovelace}};
4 \Name[Ada]{\noexpand\textIT{Lovelace}}\\
5 \Name[Charles]{\noexpand\textBF{Babbage}};
6 \Name[Charles]{\noexpand\textBF{Babbage}}\\
7 \Name{\noexpand\textUC{Kanade}, Takeo};
8 \Name{\noexpand\textUC{Kanade}, Takeo}
KonradZuse;Zuse AdaLovelace; Lovelace CharlesBabbage;Babbage KANADE Takeo;KANADE
Font substitutions might occur with these macros, depending on the font used.
\CapName,\RevComma, and \RevNamecan modify the names, but only in the text.
The alternate formatting macros shown above become more interesting when we automate how they turn on and off. Using\noexpandis necessary here. Both macros below are used in formatting hooks. They hide some complexity from authors.
Vaguely reminiscent of depressing an automobile’s manual clutch lever, \AltOff
\AltOff
deactivates \textSC, \textBF, \textIT, and \textUC only in a formatting hook.
The alternate formatting mechanism is still “running”, but it is not transferring
“power” to the formatting macros. They display their arguments unmodified.
Likewise, \AltOn activates \textSC, \textBF, \textIT, and \textUC only in
\AltOn
a formatting hook, as if one let out the clutch pedal, causing “power” to transfer through the gearbox to the formatting macros. They now modify their arguments.
If one uses the altformat option or\AltFormatActive, the formatting “power”
goes to the formatting macros by default in order to have formatted names in the index. Otherwise, the normal formatting regime isolates formatting in the text, as the Anglosphere is wont to do.
We use\noexpand as discussed and add a formatting hook to get changes in the text, not in the index. We also suspend this manual’s formatting conventions:
1 \documentclass{article}
2 \input{compat.tex} % Included with nameauth; needed only if
3 % compiling on multiple TeX distros or LaTeX engines.
4 \usepackage{makeidx}
5 \usepackage[altformat]{nameauth}
6 \makeindex
7
8 \PretagName[Konrad]{\noexpand\textSC{Zuse}}{Zuse, Konrad}
9 \PretagName[Ada]{\noexpand\textIT{Lovelace}}{Lovelace, Ada}
10 \PretagName[Charles]{\noexpand\textBF{Babbage}}
11 {Babbage, Charles}
12 \PretagName{\noexpand\textUC{Kanade}, Takeo}{Kanade Takeo}
13
14 \begin{document}
15
16 \renewcommand*\MainNameHook{\AltOff}
17
18 \ForgetThis\Name[Konrad]{\noexpand\textSC{Zuse}};
19 \Name[Konrad]{\noexpand\textSC{Zuse}}\\
20 \ForgetThis\Name[Ada]{\noexpand\textIT{Lovelace}};
21 \Name[Ada]{\noexpand\textIT{Lovelace}}\\
22 \ForgetThis\Name[Charles]{\noexpand\textBF{Babbage}};
23 \Name[Charles]{\noexpand\textBF{Babbage}}\\
24 \ForgetThis\Name{\noexpand\textUC{Kanade}, Takeo};
25 \Name{\noexpand\textUC{Kanade}, Takeo}
26
27 \printindex
28 \end{document}
KonradZuse; Zuse AdaLovelace; Lovelace CharlesBabbage; Babbage KANADE Takeo; Kanade
11.3.5 History Text
First we engage the idea of a history text, where we use standards for medieval Italian to encode a name instead of those used in modern Romance languages.
1 \documentclass{article}
2 \input{compat.tex} % Included with nameauth; needed only if
3 % compiling on multiple TeX distros or LaTeX engines.
4 \usepackage{makeidx}
5 \usepackage[altformat]{nameauth}
6 \makeindex
7
8 \begin{nameauth}
9 \< Luth & Martin & \noexpand\textSC{Luther} & >
10 \< Cath & Catherine \noexpand\AltCaps{d}e’
11 & \noexpand\textSC{Medici} & >
12 \end{nameauth}
13 \PretagName[Martin]{\noexpand\textSC{Luther}}{Luther, Martin}
14 \PretagName[Catherine \noexpand\AltCaps{d}e’]
15 {\noexpand\textSC{Medici}}{Medici, Catherine de}
16
17 \renewcommand*\MainNameHook{\sffamily\AltOff}
18
19 \begin{document}
20
21 \ForgetThis\Luth\ was a leading figure in the Protestant
22 Reformation. \Luth\ believed that one is declared
23 righteous in a forensic sense by divine grace through faith
24 created by the Holy Spirit via the Gospel and the Sacraments.
25
26 \ForgetThis\Cath\ was not only Queen of France in her own right,
27 but she also guided the reigns of her three sons.
28 \CapThis\LCath[\noexpand\AltCaps{d}e’]
29 was blamed for the St.\ Bartholomew’s Day massacre that saw the
30 murder of thousands of Huguenots.
31
32 \printindex
33 \end{document}
Martin Luther was a leading figure in the Protestant Reformation. Luther believed that one is declared righteous in a forensic sense by divine grace through faith created by the Holy Spirit via the Gospel and the Sacraments.
Catherine de’Mediciwas not only Queen of France in her own right, but she also guided the reigns of her three sons. De’ Medici was blamed for the St.
Bartholomew’s Day massacre that saw the murder of thousands of Huguenots.
Comparing the example above to Section5.7 shows us some differences. Medieval Italian, similar to modern German, keeps the particle(s) with the forename(s). Modern Italian groups particles and surnames together. Thus, we must use here:
• de’ Medici \LCath[\noexpand\AltCaps{d}e’]
• De’ Medici \CapThis\LCath[\noexpand\AltCaps{d}e’]