Documented Code For Mfirstuc v2.06: Nicola L.C. Talbot Dickimaw Books
Documented Code For Mfirstuc v2.06: Nicola L.C. Talbot Dickimaw Books
Documented Code For Mfirstuc v2.06: Nicola L.C. Talbot Dickimaw Books
06
Nicola L.C. Talbot
Dickimaw Books
http://www.dickimaw-books.com/
2017-11-14
Contents
1 Introduction 1
Change History 13
Change History 13
Index 14
1 Introduction
This is the documented code for the mfirstuc package. See mfirstuc-manual.pdf for the
main user guide.
\makefirstuc Syntax:
\makefirstuc{〈text 〉}
1
Makes the first letter uppercase, but will skip initial control sequences if they are followed by
a group and make the first thing in the group uppercase, unless the group is empty. Thus
\makefirstuc{abc} will produce: Abc, \makefirstuc{\ae bc} will produce: Æbc, but
\makefirstuc{\emph{abc}} will produce Abc. This is required by \Gls and \Glspl.
4 \newif\if@glscs
5 \newtoks\@glsmfirst
6 \newtoks\@glsmrest
7 \newrobustcmd*{\makefirstuc}[1]{%
\@MFU@protect
10 \newcommand*{\@MFU@protect}{\protect}
23 \def\@gls@tmp{\ #1}%
24 \@onelevel@sanitize\@gls@tmp
25 \expandafter\@gls@checkcs\@gls@tmp\relax\relax
26 \if@glscs
Check if we have two sequential control sequences.
27 \expandafter\def\expandafter\@gls@tmp\expandafter{\expandafter
28 \ \@gobble #1}%
29 \@onelevel@sanitize\@gls@tmp
30 \expandafter\@gls@checkcs\@gls@tmp\relax\relax
31 \if@glscs\@glscsfalse\else\@glscstrue\fi
32 \fi
33 \if@glscs
34 \@gls@getbody #1{}\@nil
2
35 \ifx\@gls@rest\@empty
36 \glsmakefirstuc{#1}%
37 \else
38 \expandafter\@gls@split\@gls@rest\@nil
39 \ifx\@gls@first\@empty
40 \glsmakefirstuc{#1}%
41 \else
Does \@gls@first start with a control sequence?
42 \edef\@gls@tmp\expandafter{\noexpand\ \expandonce\@gls@first}%
43 \@onelevel@sanitize\@gls@tmp
44 \expandafter\@gls@checkcs\@gls@tmp\relax\relax
45 \if@glscs
46 \edef\@gls@domfirstuc{\expandonce\@gls@body
47 {\noexpand\makefirstuc{\expandonce\@gls@first
48 \expandonce\@gls@rest}%
49 }%
50 }%
51 \else
52 \expandafter\@glsmfirst\expandafter{\@gls@first}%
53 \expandafter\@glsmrest\expandafter{\@gls@rest}%
54 \edef\@gls@domfirstuc{\noexpand\@gls@body
55 {\noexpand\glsmakefirstuc{\the\@glsmfirst}}%
56 \the\@glsmrest}%
57 \fi
58 \@gls@domfirstuc
59 \fi
60 \fi
61 \else
62 \glsmakefirstuc{#1}%
63 \fi
64 \fi
65 }
3
80 }%
81 {%
82 \def\@gls@first{#1}\def\@gls@rest{#2}%
83 }%
84 }
85 }%
86 {%
87 \def\@gls@split#1#2\@nil{%
88 \def\@gls@first{#1}\def\@gls@rest{#2}%
89 }
90 }
91 \def\@gls@checkcs#1 #2#3\relax{%
92 \def\@gls@argi{#1}\def\@gls@argii{#2}%
93 \ifx\@gls@argi\@gls@argii
94 \@glscstrue
95 \else
96 \@glscsfalse
97 \fi
98 }
Has datatool-base v2.24 (or above) been loaded? If so and we have UTF-8 enabled, we can
grab the first octet.
mfu@applytofirst
99 \ifdef\dtl@getfirst@UTFviii
100 {%
101 \def\@mfu@applytofirst#1#2\@mfu@end@applytofirst#3{%
102 \expandafter\dtl@if@two@octets#1#2\relax\dtl@end@if@two@octets
103 {%
104 \dtl@getfirst@UTFviii#1#2\@nil\end@dtl@getfirst@UTFviii
105 \expandafter#3\expandafter{\dtl@first}\dtl@rest
106 }%
107 {%
First argument needs to be grouped in case it consists of more than one token.
108 #3{#1}#2%
109 }%
110 }%
111 }%
112 {%
First argument needs to be grouped in case it consists of more than one token.
113 \def\@mfu@applytofirst#1#2\@mfu@end@applytofirst#3{#3{#1}#2}
114 }
4
Apply 〈cs〉 to first token of text, or first UTF-8 character if datatool-base v2.24 above has been
loaded with the utf8 support enabled.
115 \ifdef\dtl@getfirst@UTFviii
116 {%
117 \newcommand*{\MFUapplytofirst}[2]{%
118 \ifbool{@dtl@utf8}
119 {%
120 \ifblank{#2}%
121 {#1{#2}}%
122 {%
123 \ifblank{#1}%
124 {#1#2}%
125 {%
126 \@mfu@applytofirst#2\@mfu@end@applytofirst#1\relax
127 }%
128 }%
129 }%
130 {%
131 #1#2%
132 }%
133 }
134 }%
135 {%
136 \newcommand*{\MFUapplytofirst}[2]{#1#2}
137 }
tucMakeUppercase Allow user to replace \MakeUppercase with another case changing command.
139 \newcommand*{\mfirstucMakeUppercase}{\MakeUppercase}
5
147 \protected@edef\@MFU@caparg{#1}%
148 \expandafter\makefirstuc\expandafter{\@MFU@caparg}%
149 }
\capitalisewords Capitalise each word in the argument. Words are considered to be separated by plain spaces
(i.e. non-breakable spaces won’t be considered a word break).
150 \newrobustcmd*{\capitalisewords}[1]{%
151 \let\@mfu@checkword\@gobble
152 \def\gls@add@space{}%
153 \let\@mfu@domakefirstuc\MFUcapword
154 \mfu@capitalisewords#1 \@nil\mfu@endcap
155 }
\MFUcapword
179 \newcommand*{\MFUcapword}[1]{%
180 \ifMFUhyphen
181 \@MFUcapword#1-\@nil\@endMFUcapword
182 \else
183 \makefirstuc{#1}%
184 \fi
185 }
6
\@MFUcapword
186 \def\@MFUcapword#1-#2\@endMFUcapword{%
187 \makefirstuc{#1}%
188 \def\@mfu@argii{#2}%
189 \ifx\@mfu@argii\@nnil
190 \else
191 -\@MFUcapword#2\@endMFUcapword
192 \fi
193 }
\mfu@checkword Check if word should be capitalised. This originally used etoolbox’s \ifinlist command but
this doesn’t work if the word contains grouping.
194 \newcommand*\mfu@checkword[1]{%
195 \def\mfu@checkword@arg{#1}%
196 \let\@mfu@domakefirstuc\MFUcapword
197 \forlistloop\mfu@checkword@do\@mfu@nocaplist
198 }
\MFUnocap Provide the user with a means to add a word to the list. (No expansion performed on the
argument.)
217 \newcommand*{\MFUnocap}[1]{\listadd{\@mfu@nocaplist}{#1}}
7
\MFUclear Clear the list
219 \newcommand*{\MFUclear}{\renewcommand*{\@mfu@nocaplist}{}}
\@mfu@nil
227 \newcommand\@mfu@nil{\unskip}
\@mfu@nnil
228 \newcommand*\@mfu@nnil{\@mfu@nil}
pitalisefmtwords Like \capitalisewords but assumes that the phrase contains formatting text-block com-
mands.
229 \newcommand*{\capitalisefmtwords}{%
230 \@ifstar\@s@capitalisefmtwords\@ns@capitalisefmtwords
231 }
pitalisefmtwords
235 \newcommand*{\@@s@checkgrp@@capitalisefmtwords}{%
236 \@ifnextchar\bgroup{\@@s@nocs@capitalisefmtwords}{\@@s@capitalisefmtwords}%
237 }
pitalisefmtwords
241 \newcommand*{\@@s@capitalisefmtwords}[1]{%
242 \def\gls@argi{#1}%
243 \ifx\gls@argi\@MFU@protect
8
Skip \protect
244 \let\@mfu@capfmtwordsnext\@@s@capitalisefmtwords
245 \else
246 \ifx\gls@argi\@nnil
Nothing to do.
247 \let\@mfu@capfmtwordsnext\relax
248 \else
249 \def\@gls@tmp{\ #1}%
250 \@onelevel@sanitize\@gls@tmp
251 \expandafter\@gls@checkcs\@gls@tmp\relax\relax
252 \if@glscs
253 \def\@mfu@capfmtwordsnext{\@@s@cs@capitalisefmtwords#1}%
254 \else
255 \def\@mfu@capfmtwordsnext{\@@s@nocs@capitalisefmtwords#1}%
256 \fi
257 \fi
258 \fi
259 \@mfu@capfmtwordsnext
260 }
pitalisefmtwords
261 \newcommand*{\@@s@cs@capitalisefmtwords}[1]{%
262 \@ifnextchar\bgroup
263 {\@@s@cs@g@capitalisefmtwords#1}%
264 {\@@s@cs@ng@capitalisefmtwords#1}%
265 }
pitalisefmtwords
266 \def\@@s@cs@g@capitalisefmtwords#1#2#3\@nil{%
267 #1{\capitalisewords{#2}}%
268 \ifblank{#3}%
269 {}%
270 {%
271 \def\gls@add@space{}%
272 \let\@mfu@checkword\mfu@checkword
273 \mfu@capitalisewords#3 \@nil\mfu@endcap
274 }%
275 }
pitalisefmtwords
276 \def\@@s@cs@ng@capitalisefmtwords#1#2\@nil{%
277 \capitalisewords{#1#2}%
278 }
9
282 \@capitalisefmtwords#1 \@mfu@nil{} \unskip
283 }
italise@fmtwords
312 \def\@capitalise@fmtwords#1{%
313 \@mfu@ifnil#1\relax\relax\@mfu@end@nil
314 {%
Do nothing.
315 \def\@mfu@capfmtwordsnext{#1}%
316 }%
317 {%
318 \def\gls@argi{#1}%
319 \ifx\gls@argi\@MFU@protect
Skip \protect
320 \def\@mfu@capfmtwordsnext{\@capitalise@fmtwords}%
321 \else
322 \def\@gls@tmp{\ #1}%
323 \@onelevel@sanitize\@gls@tmp
10
324 \expandafter\@gls@checkcs\@gls@tmp\relax\relax
325 \if@glscs
326 \def\@mfu@capfmtwordsnext{\@@capitalisefmtwords#1}%
327 \else
328 \ifx\gls@argi\@empty
329 \def\@mfu@capfmtwordsnext{\@@capnofmtphrase{}}%
330 \else
331 \def\@mfu@capfmtwordsnext{\@@capnofmtphrase#1}%
332 \fi
333 \fi
334 \fi
335 }%
336 \@mfu@capfmtwordsnext
337 }
@@capnofmtphrase
341 \def\@@capnofmtphrase{%
342 \@ifnextchar\bgroup{\@@cap@g@nofmtphrase}{\@@cap@ng@nofmtphrase}%
343 }
p@ng@nofmtphrase
344 \def\@@cap@ng@nofmtphrase#1\@mfu@nil{%
345 \gls@add@space
346 \@mfu@mid@capitalisewords{#1}%
347 \def\gls@add@space{ }%
348 }
ap@g@nofmtphrase
349 \def\@@cap@g@nofmtphrase#1{%
350 \@@cap@ng@nofmtphrase{{#1}}%
351 }
\@mfu@terminator
352 \newcommand*\@mfu@terminator{\hbox{}}
@capfmtsubphrase
353 \def\@@capfmtsubphrase#1#2#3{%
11
359 {\def\@mfu@fmtsubphrasenext{#3}}%
360 \@mfu@fmtsubphrasenext
361 }
@cap@nofmtphrase
362 \def\@@cap@nofmtphrase#1 {%
363 \@mfu@ifnil#1\relax\relax\@mfu@end@nil
364 {%
365 \def\@mfu@capnofmtwordsnext{#1 }%
366 }%
367 {%
368 \def\@mfu@capnofmtwordsnext{%
369 \@capitalisefmtwords#1 \@mfu@nil{} \unskip
370 \def\gls@add@space{ }%
371 \let\@mfu@checkword\mfu@checkword
372 \@capitalisefmtwords
373 }%
374 }%
375 \@mfu@capnofmtwordsnext
376 }
pitalisefmtwords
386 \newrobustcmd*{\ecapitalisefmtwords}{%
387 \@ifstar\@s@ecapitalisefmtwords\@ns@ecapitalisefmtwords
388 }
12
pitalisefmtwords Unstarred version
393 \newcommand*{\@ns@ecapitalisefmtwords}[1]{%
394 \protected@edef\@MFU@caparg{#1}%
395 \expandafter\@ns@capitalisefmtwords\expandafter{\@MFU@caparg}%
396 }
Add no-cap words. This list isn’t complete. I don’t intend adding disputed words. Additional
words can be added to the document in a similar manner.
400 \MFUnocap{a}
401 \MFUnocap{an}
402 \MFUnocap{and}
403 \MFUnocap{but}
404 \MFUnocap{for}
405 \MFUnocap{in}
406 \MFUnocap{of}
407 \MFUnocap{or}
408 \MFUnocap{no}
409 \MFUnocap{nor}
410 \MFUnocap{so}
411 \MFUnocap{some}
412 \MFUnocap{the}
413 \MFUnocap{with}
414 \MFUnocap{yet}
Change History
13
\protect . . . . . . . . . . . . . . . . . . . . . . 2 2.04 (2016-07-31)
2.02 (2015-12-17) \@@cap@g@nofmtphrase: new . . . . . . . . 11
\mfu@checkword: modified to use loop \@@cap@ng@nofmtphrase: new . . . . . . . 11
instead of \ifinlist . . . . . . . . . . . . . 7 \@@s@capitalisefmtwords: new . . . . . . 8
\mfu@checkword@do: new . . . . . . . . . . . . 7 \@@s@checkgrp@capitalisefmtwords:
2.03 (2016-07-29) new . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
\@@cap@nofmtphrase: new . . . . . . . . . . 12 \@@s@cs@capitalisefmtwords: new . . . 9
\@@capfmtsubphrase: new . . . . . . . . . . 11 \@@s@cs@g@capitalisefmtwords: new . 9
\@@capitalisefmtwords: new . . . . . . . 11 \@@s@cs@ng@capitalisefmtwords:
\@@capnofmtphrase: new . . . . . . . . . . . 11 new . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
\@MFU@p@makefirstuc: changed test . . . . 2 \@@s@nocs@capitalisefmtwords: new . 8
\@gls@split: added missing false part . . 4
\@MFU@protect: new . . . . . . . . . . . . . . . . 2
\@mfu@terminator: new . . . . . . . . . . . . 11
\@MFUcapword: new . . . . . . . . . . . . . . . . . 7
\@ns@capitalisefmtwords: new . . . . . . 9
\@capitalise@fmtwords: new . . . . . . . 10
\@ns@ecapitalisefmtwords: new . . . . 13
\@capitalisefmtwords: new . . . . . . . . 10 \@ns@xcapitalisefmtwords: new . . . . 12
\@gls@split: added check for \@s@capitalisefmtwords: new . . . . . . . 8
datatool-base UTF-8 support . . . . . . . 3 \@s@ecapitalisefmtwords: new . . . . . 12
\@mfu@applytofirst: new . . . . . . . . . . . 4 \@s@xcapitalisefmtwords: new . . . . . 12
\@mfu@mid@capitalisewords: new . . . . 6 2.05 (2017-11-10)
\capitalisefmtwords: new . . . . . . . . . . 8 \@mfu@applytofirst: grouped first
\ecapitalisefmtwords: new . . . . . . . . 12 argument . . . . . . . . . . . . . . . . . . . . . . 4
\ifMFUhyphen: new . . . . . . . . . . . . . . . . . 6 2.06 (2017-11-14)
\MFUapplytofirst: new . . . . . . . . . . . . . 4 \@makefirstuc: added braces to
\MFUcapword: new . . . . . . . . . . . . . . . . . . 6 \glsmakefirstuc argument . . . . . . . 3
\xcapitalisefmtwords: new . . . . . . . . 12 check for inner control sequence . . . . . . 3
Index
Numbers written in italic refer to the page where the corresponding entry is described;
numbers underlined refer to the code line of the definition; numbers in roman refer to the
code lines where the entry is used.
Symbols \@MFU@protect . . . . . . . . . . . . . . . . . . 2, 8, 10
\@@cap@g@nofmtphrase . . . . . . . . . . . . . . . 11 \@MFUcapword . . . . . . . . . . . . . . . . . . . . . . . . 6
\@@cap@ng@nofmtphrase . . . . . . . . . . . . . . 11 \@capitalise@fmtwords . . . . . . . . . . . . . . 10
\@@cap@nofmtphrase . . . . . . . . . . . . . . . . . 10 \@capitalise@g@fmtwords . . . . . . . . . . . . 10
\@@capfmtsubphrase . . . . . . . . . . . . . . . . . 11 \@capitalise@ng@fmtwords . . . . . . . . . . . 10
\@@capitalisefmtwords . . . . . . . . . . . . . . 11 \@capitalisefmtwords . . . . . . . . . . . . 10–12
\@@capnofmtphrase . . . . . . . . . . . . . . . . . . 11 \@empty . . . . . . . . . . . . . . . . . . . . . . . . 2, 3, 11
\@@s@capitalisefmtwords . . . . . . . . . . . . . 8 \@end@MFU@protected . . . . . . . . . . . . . . . . . 2
\@@s@checkgrp@@capitalisefmtwords . . . 8 \@endMFUcapword . . . . . . . . . . . . . . . . . . . 6, 7
\@@s@cs@capitalisefmtwords . . . . . . . . . . 9 \@firstofone . . . . . . . . . . . . . . . . . . . . . . . . 7
\@@s@cs@g@capitalisefmtwords . . . . . . . . 9 \@gls@argi . . . . . . . . . . . . . . . . . . . . . . . . . . 4
\@@s@cs@ng@capitalisefmtwords . . . . . . . 9 \@gls@argii . . . . . . . . . . . . . . . . . . . . . . . . . 4
\@@s@nocs@capitalisefmtwords . . . . . . 8, 9 \@gls@body . . . . . . . . . . . . . . . . . . . . . . . . 3, 5
\@MFU@caparg . . . . . . . . . . . . . . . . . 6, 8, 12, 13 \@gls@checkcs . . . . . . . . . . . . . . . . . 2–4, 9, 11
\@MFU@p@makefirstuc . . . . . . . . . . . . . . . . . 2 \@gls@domfirstuc . . . . . . . . . . . . . . . . . . . . 3
14
\@gls@first . . . . . . . . . . . . . . . . . . . . . . . 3, 4 D
\@gls@getbody . . . . . . . . . . . . . . . . . . . . . 2, 5 datatool-base package . . . . . . . . . . . . . . . . . 4, 5
\@gls@gobbletonil . . . . . . . . . . . . . . . . . . . 5 \def . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–12
\@gls@makefirstuc . . . . . . . . . . . . . . . . . . . 5 \dtl@end@if@two@octets . . . . . . . . . . . . 3, 4
\@gls@rest . . . . . . . . . . . . . . . . . . . . . . . . 3–5 \dtl@first . . . . . . . . . . . . . . . . . . . . . . . . 3, 4
\@gls@split . . . . . . . . . . . . . . . . . . . . . . . . . 3 \dtl@getfirst@UTFviii . . . . . . . . . . . . . 3–5
\@gls@tmp . . . . . . . . . . . . . . . . . . . . . 2, 3, 9–11 \dtl@if@two@octets . . . . . . . . . . . . . . . . 3, 4
\@glscsfalse . . . . . . . . . . . . . . . . . . . . . . 2, 4 \dtl@rest . . . . . . . . . . . . . . . . . . . . . . . . . 3, 4
\@glscstrue . . . . . . . . . . . . . . . . . . . . . . . 2, 4
E
\@glsmfirst . . . . . . . . . . . . . . . . . . . . . . . 2, 3
\edef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
\@glsmrest . . . . . . . . . . . . . . . . . . . . . . . . 2, 3 \else . . . . . . . . . . . . . . . . . . . . . 2–4, 6, 7, 9–11
\@gobble . . . . . . . . . . . . . . . . . . . . . . . . 2, 6, 9 \end@dtl@getfirst@UTFviii . . . . . . . . . 3, 4
\@ifnextchar . . . . . . . . . . . . . . . . . . . . . 8–11 etoolbox package . . . . . . . . . . . . . . . . . . . . . 1, 7
\@ifstar . . . . . . . . . . . . . . . . . . . . . . . . . 8, 12 \expandafter . . . . . . . . . . . . . 2–6, 8, 9, 11–13
\@makefirstuc . . . . . . . . . . . . . . . . . . . . . . . 2 \expandonce . . . . . . . . . . . . . . . . . . . . . . . . . 3
\@mfu@applytofirst . . . . . . . . . . . . . . . . . . 5
\@mfu@argii . . . . . . . . . . . . . . . . . . . . . . . . . 7 F
\@mfu@capfmtwordsnext . . . . . . . . . . . . 9–11 \fi . . . . . . . . . . . . . . . . . . . . . . . 2–4, 6, 7, 9–11
\@mfu@capnofmtwordsnext . . . . . . . . . . . . 12 \forlistloop . . . . . . . . . . . . . . . . . . . . . . . . 7
\@mfu@checkword . . . . . . . . . . . . . . . . 6, 9–12
G
\@mfu@domakefirstuc . . . . . . . . . . . . . . . 6, 7
\gls@add@space . . . . . . . . . . . . . . . . . 6, 9–12
\@mfu@end@applytofirst . . . . . . . . . . . . 4, 5
\gls@argi . . . . . . . . . . . . . . . . . . . . . . 2, 8–11
\@mfu@end@nil . . . . . . . . . . . . . . . . . . . 10–12
\glsmakefirstuc . . . . . . . . . . . . . . . . . . . . . 3
\@mfu@fmtsubphrasenext . . . . . . . . . . 11, 12
\@mfu@ifnil . . . . . . . . . . . . . . . . . . . . . 10–12 H
\@mfu@mid@capitalisewords . . . . . . . . . . 11 \hbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
\@mfu@nil . . . . . . . . . . . . . . . . . . . . . 8, 10–12
\@mfu@nnil . . . . . . . . . . . . . . . . . . . . . . . . . 10 I
\@mfu@nocaplist . . . . . . . . . . . . . . . . . . . 7, 8 \if@glscs . . . . . . . . . . . . . . . . . . . . . 2, 3, 9, 11
\@mfu@terminator . . . . . . . . . . . . . . . . . 7, 11 \ifblank . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 9
\@nil . . . . . . . . . . . . . . . . . . . . . . . . . 2–6, 8, 9 \ifbool . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 5
\@nnil . . . . . . . . . . . . . . . . . . . . . . . . . . 6, 7, 9 \ifdef . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–5
\@ns@capitalisefmtwords . . . . . . . 8, 12, 13 \ifdefequal . . . . . . . . . . . . . . . . . . . . . . . . . 7
\@ns@ecapitalisefmtwords . . . . . . . . . . . 12 \ifMFUhyphen . . . . . . . . . . . . . . . . . . . . . . . . 6
\ifx . . . . . . . . . . . . . . . . . . . . . . . . . . 2–4, 6–11
\@ns@xcapitalisefmtwords . . . . . . . . . . . 12
\@onelevel@sanitize . . . . . . . . . . . 2, 3, 9, 10 L
\@s@capitalisefmtwords . . . . . . . . . . . 8, 12 \let . . . . . . . . . . . . . . . . . . . . . . . . 3, 6, 7, 9–12
\@s@ecapitalisefmtwords . . . . . . . . . . . . 12 \listadd . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
\@s@xcapitalisefmtwords . . . . . . . . . . . . 12 \listbreak . . . . . . . . . . . . . . . . . . . . . . . . . . 7
\listgadd . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
\␣ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2, 3, 9, 10 M
\makefirstuc . . . . . . . . . . . . . . . . . . . . 3, 5–7
B \MakeUppercase . . . . . . . . . . . . . . . . . . . . . . 5
\bgroup . . . . . . . . . . . . . . . . . . . . . . . . . . 8–11 mfirstuc package . . . . . . . . . . . . . . . . . . . . . . 13
\mfirstucMakeUppercase . . . . . . . . . . . . . . 5
C \mfu@cap@first . . . . . . . . . . . . . . . . . . . . . . 6
\capitalisewords . . . . . . . . . . . . . . . . . . 8, 9 \mfu@cap@second . . . . . . . . . . . . . . . . . . . . . 6
15
\mfu@capitalisewords . . . . . . . . . . . . . . 6, 9 \next@mfu@cap . . . . . . . . . . . . . . . . . . . . . . . 6
\mfu@checkword . . . . . . . . . . . . . . . . . 6, 9–12 \noexpand . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
\mfu@checkword@arg . . . . . . . . . . . . . . . . . . 7
\mfu@checkword@argii . . . . . . . . . . . . . . . . 7 P
\mfu@checkword@do . . . . . . . . . . . . . . . . . . . 7 \protect . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
\mfu@endcap . . . . . . . . . . . . . . . . . . . . . . . 6, 9 \protected@edef . . . . . . . . . . . . . . 6, 8, 12, 13
\mfu@noop . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 \ProvidesPackage . . . . . . . . . . . . . . . . . 1, 13
\MFUapplytofirst . . . . . . . . . . . . . . . . . . . . 5
\MFUcapword . . . . . . . . . . . . . . . . . . . . . . . 6, 7 R
\MFUhyphenfalse . . . . . . . . . . . . . . . . . . . . . 6 \relax . . . . . . . . . . . . . . . . . . . . . . . . 2–5, 9–12
\MFUnocap . . . . . . . . . . . . . . . . . . . . . . . . . . 13 \renewcommand . . . . . . . . . . . . . . . . . . . . . . . 8
\RequirePackage . . . . . . . . . . . . . . . . . . 1, 13
N
\NeedsTeXFormat . . . . . . . . . . . . . . . . . . 1, 13 T
\newcommand . . . . . . . . . . . . . . . . . . . . 2, 5–13 \the . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
\newif . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2, 6
\newrobustcmd . . . . . . . . . . . . . . . 2, 5, 6, 8, 12 U
\newtoks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 \unskip . . . . . . . . . . . . . . . . . . . . . . . 8, 10–12
16