summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.html
blob: 43c76767446262031c7d561c8cd414efabb559d8 (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
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
<?xml version="1.0" encoding="utf-8" ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<!--http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd-->  
<html xmlns="http://www.w3.org/1999/xhtml"  
> 
<head><title>mfirstuc.sty v1.10: uppercasing first letter</title> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)" /> 
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)" /> 
<!-- xhtml,fn-in,css-in,uni-html4,utf8 --> 
<meta name="src" content="mfirstuc-manual.tex" /> 
<meta name="date" content="2015-02-03 15:15:00" /> 
 
<style type="text/css"> 
<!--  
 
/* start css.sty */  
.cmr-17{font-size:170%;}  
.cmr-12{font-size:120%;}  
.cmtt-12{font-size:120%;font-family: monospace;}  
.cmtt-12{font-family: monospace;}  
.cmtt-12{font-family: monospace;}  
.cmtt-12{font-family: monospace;}  
.cmtt-10{font-family: monospace;}  
.cmtt-10{font-family: monospace;}  
.cmtt-10{font-family: monospace;}  
.cmtt-10{font-family: monospace;}  
.cmss-10{ font-family: sans-serif;}  
.cmss-10{ font-family: sans-serif;}  
.cmtt-9{font-size:90%;font-family: monospace;}  
.cmtt-9{font-family: monospace;}  
.cmtt-9{font-family: monospace;}  
.cmtt-9{font-family: monospace;}  
.cmitt-10{font-family: monospace; font-style: italic;}  
.cmti-10{ font-style: italic;}  
.cmbx-10{ font-weight: bold;}  
.cmssi-10{ font-family: sans-serif; font-style: oblique;}  
.cmssi-10{ font-family: sans-serif; font-style: oblique;}  
p.noindent { text-indent: 0em }  
td p.noindent { text-indent: 0em; margin-top:0em; }  
p.nopar { text-indent: 0em; }  
p.indent{ text-indent: 1.5em }  
@media print {div.crosslinks {visibility:hidden;}}  
a img { border-top: 0; border-left: 0; border-right: 0; }  
center { margin-top:1em; margin-bottom:1em; }  
td center { margin-top:0em; margin-bottom:0em; }  
.Canvas { position:relative; }  
img.math{vertical-align:middle;}  
li p.indent { text-indent: 0em }  
li p:first-child{ margin-top:0em; }  
li p:last-child, li div:last-child { margin-bottom:0.5em; }  
li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; }  
.enumerate1 {list-style-type:decimal;}  
.enumerate2 {list-style-type:lower-alpha;}  
.enumerate3 {list-style-type:lower-roman;}  
.enumerate4 {list-style-type:upper-alpha;}  
div.newtheorem { margin-bottom: 2em; margin-top: 2em;}  
.obeylines-h,.obeylines-v {white-space: nowrap; }  
div.obeylines-v p { margin-top:0; margin-bottom:0; }  
.overline{ text-decoration:overline; }  
.overline img{ border-top: 1px solid black; }  
td.displaylines {text-align:center; white-space:nowrap;}  
.centerline {text-align:center;}  
.rightline {text-align:right;}  
div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; }  
.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; }  
div.fbox {display:table}  
div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; }  
div.minipage{width:100%;}  
div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;}  
div.center div {text-align: left;}  
div.flushright, div.flushright div.flushright {text-align: right;}  
div.flushright div {text-align: left;}  
div.flushleft {text-align: left;}  
.underline{ text-decoration:underline; }  
.underline img{ border-bottom: 1px solid black; margin-bottom:1pt; }  
.framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; }  
.framebox-c {text-align:center;}  
.framebox-l {text-align:left;}  
.framebox-r {text-align:right;}  
span.thank-mark{ vertical-align: super }  
span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; }  
div.footnotes{border-top:solid 1px black; border-bottom:solid 1px black; padding-bottom:1ex; padding-top:0.5ex; margin-right:15%; margin-top:2ex; font-style:italic; font-size:85%;}  
div.footnotes p{margin-top:0; margin-bottom:0; text-indent:0;}  
div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; }  
table.tabular td p{margin-top:0em;}  
table.tabular {margin-left: auto; margin-right: auto;}  
td p:first-child{ margin-top:0em; }  
td p:last-child{ margin-bottom:0em; }  
div.td00{ margin-left:0pt; margin-right:0pt; }  
div.td01{ margin-left:0pt; margin-right:5pt; }  
div.td10{ margin-left:5pt; margin-right:0pt; }  
div.td11{ margin-left:5pt; margin-right:5pt; }  
table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; }  
td.td00{ padding-left:0pt; padding-right:0pt; }  
td.td01{ padding-left:0pt; padding-right:5pt; }  
td.td10{ padding-left:5pt; padding-right:0pt; }  
td.td11{ padding-left:5pt; padding-right:5pt; }  
table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; }  
.hline hr, .cline hr{ height : 1px; margin:0px; }  
.tabbing-right {text-align:right;}  
span.TEX {letter-spacing: -0.125em; }  
span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;}  
a span.TEX span.E {text-decoration: none; }  
span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;}  
span.LATEX span.TEX{ position:relative; left: -0.4em; }  
div.float, div.figure {margin-left: auto; margin-right: auto;}  
div.float img {text-align:center;}  
div.figure img {text-align:center;}  
.marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;}  
.marginpar p{margin-top:0.4em; margin-bottom:0.4em;}  
table.equation {width:100%;}  
.equation td{text-align:center; }  
td.equation { margin-top:1em; margin-bottom:1em; }  
td.equation-label { width:5%; text-align:center; }  
td.eqnarray4 { width:5%; white-space: normal; }  
td.eqnarray2 { width:5%; }  
table.eqnarray-star, table.eqnarray {width:100%;}  
div.eqnarray{text-align:center;}  
div.array {text-align:center;}  
div.pmatrix {text-align:center;}  
table.pmatrix {width:100%;}  
span.pmatrix img{vertical-align:middle;}  
div.pmatrix {text-align:center;}  
table.pmatrix {width:100%;}  
span.bar-css {text-decoration:overline;}  
img.cdots{vertical-align:middle;}  
.partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;}  
.index-item, .index-subitem, .index-subsubitem {display:block}  
div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;}  
div.caption span.id{font-weight: bold; white-space: nowrap; }  
h1.partHead{text-align: center}  
p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; }  
p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; }  
.paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;}  
.subparagraphHead, .likesubparagraphHead { font-weight: bold;}  
.quote {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; margin-right:1em; text-align:justify;}  
.verse{white-space:nowrap; margin-left:2em}  
div.maketitle {text-align:center;}  
h2.titleHead{text-align:center;}  
div.maketitle{ margin-bottom: 2em; }  
div.author, div.date {text-align:center;}  
div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; }  
.quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; }  
.abstract p {margin-left:5%; margin-right:5%;}  
div.abstract {width:100%;}  
.alltt P { margin-bottom : 0em; margin-top : 0em; }  
.alltt { margin-bottom : 1em; margin-top : 1em; }  
div.important { border : solid red; }  
div.verbatim { font-family: monospace; white-space: nowrap; text-align:left; clear:both; padding-top: 2ex; padding-bottom: 2ex;}  
/* end css.sty */  
 
 
--> 
</style> 
</head><body 
>
   <div class="maketitle"><a 
 id="top"></a>
                                                                    

                                                                    
                                                                    

                                                                    

<h2 class="titleHead">mfirstuc.sty v1.10: uppercasing first letter</h2>
         <div class="author" ><span 
class="cmr-12">Nicola L.C. Talbot</span>
<br />          <span 
class="cmr-12">Dickimaw Books</span>
<br /><a 
href="http://www.dickimaw-books.com/" class="url" ><span 
class="cmtt-12">http://www.dickimaw-books.com/</span></a></div><br />
<div class="date" ><span 
class="cmr-12">2015-02-03</span></div>
   </div>
   <h3 class="likesectionHead"><a 
 id="x1-1000"></a>Contents</h3>
   <div class="tableofcontents">
   <span class="sectionToc" >1 <a 
href="#sec:intro" id="QQ2-1-2">Introduction</a></span>
<br />   <span class="sectionToc" >2 <a 
href="#sec:capitalisewords" id="QQ2-1-3">Capitalise Each Word in a Phrase or Sentence (Title Case)</a></span>
<br />   <span class="sectionToc" >3 <a 
href="#sec:utf8" id="QQ2-1-4">UTF-8</a></span>
   </div>
<!--l. 33--><p class="noindent" >
</p>
<!--l. 33--><p class="noindent" ><a 
href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">1   </span> <a 
 id="sec:intro"></a>Introduction</h3>
<!--l. 36--><p class="noindent" >The <span 
class="cmss-10">glossaries </span>bundle includes the package <span 
class="cmss-10">mfirstuc</span><a 
 id="dx1-2001"></a> which provides the command:
</p><!--l. 38--><p class="indent" >   <hr><div title="Definition"><span class="marginpar"><span 
class="cmtt-9">\makefirstuc</span><span 
class="cmtt-9">&#x00A0;</span></span><a 
 id="dx1-2002"></a> <span 
class="cmtt-10">\makefirstuc{</span>&#x27E8;<span 
class="cmitt-10">stuff</span>&#x27E9;<span 
class="cmtt-10">} </span></div><hr>
</p><!--l. 40--><p class="noindent" >
This makes the first object of &#x27E8;<span 
class="cmti-10">stuff </span>&#x27E9; uppercase unless &#x27E8;<span 
class="cmti-10">stuff </span>&#x27E9; starts with a control
sequence followed by a non-empty group, in which case the first object in
the group is converted to uppercase. <span 
class="cmbx-10">No expansion is performed on the</span>
<span 
class="cmbx-10">argument.</span>
</p><!--l. 47--><p class="indent" >   <div class="important" title="Important Note"> If &#x27E8;<span 
class="cmti-10">stuff </span>&#x27E9; starts with a control sequence that takes more than one argument, the
case-changing will always be applied to the <span 
class="cmti-10">first </span>argument. If the text that requires the
case change is in one of the other arguments, you must hide the earlier arguments in a
wrapper command. For example, instead of <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\color{red}{text}</span></span></span> you need to define,
say, <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\red</span></span></span> as <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\color{red}</span></span></span> and use <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\red{text}</span></span></span>. </div>
                                                                    

                                                                    
</p><!--l. 55--><p class="noindent" >
</p><!--l. 57--><p class="indent" >   Examples: </p>
     <ul class="itemize1">
     <li class="itemize"><span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\makefirstuc{abc}</span></span></span> produces Abc.
     </li>
     <li class="itemize"><span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\makefirstuc{\emph{abc}}</span></span></span> produces <span 
class="cmti-10">Abc </span>(<span 
class="cmtt-10">\MakeUppercase</span><a 
 id="dx1-2003"></a> has been applied to
     the letter &#8220;a&#8221; rather than <span 
class="cmtt-10">\emph</span>). Note however that
                                                                    

                                                                    
     <div class="verbatim" id="verbatim-1">
     \makefirstuc{{\em&#x00A0;abc}}
</div>
     <!--l. 66--><p class="nopar" > produces <span 
class="cmti-10">ABC </span>(first object is <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">{\em</span><span 
class="cmtt-10">&#x00A0;abc}</span></span></span> so this is equivalent to
     <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\MakeUppercase{\em</span><span 
class="cmtt-10">&#x00A0;abc}</span></span></span>), and
                                                                    

                                                                    
</p>
     <div class="verbatim" id="verbatim-2">
     {\makefirstuc{\em&#x00A0;abc}}
</div>
     <!--l. 71--><p class="nopar" > produces abc (<span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\em</span></span></span> doesn&#8217;t have an argument therefore first object is <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\em</span></span></span> and so
     is equivalent to <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">{\MakeUppercase{\em}abc}</span></span></span>).
     </p></li>
     <li class="itemize"><span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\makefirstuc{{\&#8217;a}bc}</span></span></span> produces &Aacute;bc.
     </li>
     <li class="itemize"><span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\makefirstuc{\ae</span><span 
class="cmtt-10">&#x00A0;bc}</span></span></span> produces &AElig;bc.
     </li>
     <li class="itemize"><span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\makefirstuc{{\ae}bc}</span></span></span> produces &AElig;bc.
     </li>
     <li class="itemize"><span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\makefirstuc{{</span><span 
class="cmtt-10">&auml;</span><span 
class="cmtt-10">}bc}</span></span></span> produces &Auml;bc.
     </li></ul>
<!--l. 85--><p class="noindent" >Note that non-Latin or accented characters appearing at the start of the text must be
placed in a group (even if you are using the <span 
class="cmss-10">inputenc</span><a 
 id="dx1-2004"></a> package). The reason for this
restriction is detailed in <a 
href="#sec:utf8"><span 
class="cmsy-10">&sect;</span>3 </a><a 
href="#sec:utf8">UTF-8<!--tex4ht:ref: sec:utf8 --></a>.
</p><!--l. 90--><p class="indent" >   <div class="important" title="Important Note"> In version 1.02 of <span 
class="cmss-10">mfirstuc</span>, a bug fix resulted in a change in output if the first
object is a control sequence followed by an empty group. Prior to version 1.02,
<span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\makefirstuc{\ae{}bc}</span></span></span> produced &aelig;Bc. However as from version 1.02, it now produces
&AElig;bc. </div>
</p><!--l. 96--><p class="noindent" >
</p><!--l. 98--><p class="indent" >   Note also that
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-3">
\newcommand{\abc}{abc}
&#x00A0;<br />\makefirstuc{\abc}
</div>
<!--l. 102--><p class="nopar" > produces: ABC. This is because the first object in the argument of <span 
class="cmtt-10">\makefirstuc </span>is
<span 
class="cmtt-10">\abc</span>, so it does <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\MakeUppercase{\abc}</span></span></span>. Whereas:
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-4">
\newcommand{\abc}{abc}
&#x00A0;<br />\expandafter\makefirstuc\expandafter{\abc}
</div>
<!--l. 109--><p class="nopar" > produces: Abc. There is a short cut command which will do this:
</p><!--l. 111--><p class="indent" >   <hr><div title="Definition"><span class="marginpar"><span 
class="cmtt-9">\xmakefirstuc</span><span 
class="cmtt-9">&#x00A0;</span></span><a 
 id="dx1-2005"></a> <span 
class="cmtt-10">\xmakefirstuc{</span>&#x27E8;<span 
class="cmitt-10">stuff</span>&#x27E9;<span 
class="cmtt-10">} </span></div><hr>
</p><!--l. 113--><p class="noindent" >
This is equivalent to <span 
class="cmtt-10">\expandafter\makefirstuc\expandafter{</span>&#x27E8;<span 
class="cmti-10">stuff </span>&#x27E9;<span 
class="cmtt-10">}</span>. So
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-5">
\newcommand{\abc}{abc}
&#x00A0;<br />\xmakefirstuc{\abc}
</div>
<!--l. 118--><p class="nopar" > produces: Abc.
</p><!--l. 123--><p class="indent" >   <div class="important" title="Important Note"> <span 
class="cmtt-10">\xmakefirstuc </span>only performs one level expansion on the <span 
class="cmti-10">first </span>object in its
argument. It does not fully expand the entire argument. </div>
</p><!--l. 127--><p class="noindent" >
</p><!--l. 129--><p class="indent" >   As from version 1.10, there is now a command that fully expands the entire
argument before applying <span 
class="cmtt-10">\makefirstuc</span>:
</p><!--l. 131--><p class="indent" >   <hr><div title="Definition"><span class="marginpar"><span 
class="cmtt-9">\emakefirstuc</span><span 
class="cmtt-9">&#x00A0;</span></span><a 
 id="dx1-2006"></a> <span 
class="cmtt-10">\emakefirstuc{</span>&#x27E8;<span 
class="cmitt-10">text</span>&#x27E9;<span 
class="cmtt-10">} </span></div><hr>
</p><!--l. 133--><p class="noindent" >
</p><!--l. 135--><p class="indent" >   Examples:
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-6">
\newcommand{\abc}{\xyz&#x00A0;a}
&#x00A0;<br />\newcommand{\xyz}{xyz}
&#x00A0;<br />No&#x00A0;expansion:&#x00A0;\makefirstuc{\abc}.
&#x00A0;<br />First&#x00A0;object&#x00A0;one-level&#x00A0;expansion:&#x00A0;\xmakefirstuc{\abc}.
&#x00A0;<br />Fully&#x00A0;expanded:&#x00A0;\emakefirstuc{\abc}.
</div>
<!--l. 142--><p class="nopar" > produces:  No expansion: XYZA. First object one-level expansion: XYZa. Fully
expanded: Xyza.
</p><!--l. 150--><p class="indent" >   If you use <span 
class="cmss-10">mfirstuc </span>without the <span 
class="cmss-10">glossaries</span><a 
 id="dx1-2007"></a> package, the standard <span 
class="cmtt-10">\MakeUppercase</span>
command is used. If used with <span 
class="cmss-10">glossaries</span><a 
 id="dx1-2008"></a>, <span 
class="cmtt-10">\MakeTextUppercase</span><a 
 id="dx1-2009"></a> (defined by the <span 
class="cmss-10">textcase</span><a 
 id="dx1-2010"></a>
package) is used instead. If you are using <span 
class="cmss-10">mfirstuc </span>without the <span 
class="cmss-10">glossaries </span>package and
want to use <span 
class="cmtt-10">\MakeTextUppercase</span><a 
 id="dx1-2011"></a> instead, you can redefine
</p><!--l. 156--><p class="indent" >   <hr><div title="Definition"><span class="marginpar"><span 
class="cmtt-9">\glsmakefirstuc</span><span 
class="cmtt-9">&#x00A0;</span></span><a 
 id="dx1-2012"></a> <span 
class="cmtt-10">\glsmakefirstuc{</span>&#x27E8;<span 
class="cmitt-10">text</span>&#x27E9;<span 
class="cmtt-10">} </span></div><hr>
</p><!--l. 158--><p class="noindent" >
For example:
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-7">
\renewcommand{\glsmakefirstuc}[1]{\MakeTextUppercase&#x00A0;#1}
</div>
<!--l. 162--><p class="nopar" > Remember to also load <span 
class="cmss-10">textcase</span><a 
 id="dx1-2013"></a> (<span 
class="cmss-10">glossaries </span>loads this automatically).
</p><!--l. 166--><p class="noindent" >
</p>
<!--l. 166--><p class="noindent" ><a 
href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">2   </span> <a 
 id="sec:capitalisewords"></a>Capitalise Each Word in a Phrase or Sentence (Title Case)</h3>
<!--l. 169--><p class="noindent" >New to mfirstuc v1.06:
</p><!--l. 170--><p class="indent" >   <hr><div title="Definition"><span class="marginpar"><span 
class="cmtt-9">\capitalisewords</span><span 
class="cmtt-9">&#x00A0;</span></span><a 
 id="dx1-3001"></a> <span 
class="cmtt-10">\capitalisewords{</span>&#x27E8;<span 
class="cmitt-10">text</span>&#x27E9;<span 
class="cmtt-10">} </span></div><hr>
</p><!--l. 172--><p class="noindent" >
This command apply <span 
class="cmtt-10">\makefirstuc</span><a 
 id="dx1-3002"></a> to each word in &#x27E8;<span 
class="cmti-10">text</span>&#x27E9; where the space character is
used as the word separator. Note that it has to be a plain space character, not another
form of space, such as <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">~</span></span></span> or <span 
class="cmtt-10">\space</span>. Note that no expansion is performed on
&#x27E8;<span 
class="cmti-10">text</span>&#x27E9;.
</p><!--l. 179--><p class="indent" >   <hr><div title="Definition"><span class="marginpar"><span 
class="cmtt-9">\xcapitalisewords</span><span 
class="cmtt-9">&#x00A0;</span></span><a 
 id="dx1-3003"></a> <span 
class="cmtt-10">\xcapitalisewords{</span>&#x27E8;<span 
class="cmitt-10">text</span>&#x27E9;<span 
class="cmtt-10">} </span></div><hr>
</p><!--l. 181--><p class="noindent" >
This is a short cut for <span 
class="cmtt-10">\expandafter\capitalisewords\expandafter{</span>&#x27E8;<span 
class="cmti-10">text</span>&#x27E9;<span 
class="cmtt-10">}</span>.
</p><!--l. 185--><p class="indent" >   As from version 1.10, there is now a command that fully expands the entire
argument before applying <span 
class="cmtt-10">\capitalisewords</span>:
</p><!--l. 187--><p class="indent" >   <hr><div title="Definition"><span class="marginpar"><span 
class="cmtt-9">\ecapitalisewords</span><span 
class="cmtt-9">&#x00A0;</span></span><a 
 id="dx1-3004"></a> <span 
class="cmtt-10">\ecapitalisewords{</span>&#x27E8;<span 
class="cmitt-10">text</span>&#x27E9;<span 
class="cmtt-10">} </span></div><hr>
</p><!--l. 189--><p class="noindent" >
</p><!--l. 191--><p class="indent" >   Examples:
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-8">
\newcommand{\abc}{\xyz\space&#x00A0;four&#x00A0;five}
&#x00A0;<br />\newcommand{\xyz}{one&#x00A0;two&#x00A0;three}
&#x00A0;<br />No&#x00A0;expansion:&#x00A0;\capitalisewords{\abc}.
&#x00A0;<br />First&#x00A0;object&#x00A0;one-level&#x00A0;expansion:&#x00A0;\xcapitalisewords{\abc}.
&#x00A0;<br />Fully&#x00A0;expanded:&#x00A0;\ecapitalisewords{\abc}.
</div>
<!--l. 198--><p class="nopar" > produces:  No expansion: ONE TWO THREE FOUR FIVE. First object one-level
expansion: ONE TWO THREE four Five. Fully expanded: One Two Three Four
Five.
</p><!--l. 206--><p class="indent" >   (Remember that the spaces need to be explicit. In the second case above, using
<span 
class="cmtt-10">\xcapitalisewords</span>, the space before &#8220;four&#8221; has been hidden within <span 
class="cmtt-10">\space </span>so it&#8217;s not
recognised as a word boundary, but in the third case, <span 
class="cmtt-10">\space </span>has been expanded to an
actual space character.)
</p><!--l. 212--><p class="indent" >   <div class="important" title="Important Note"> If you are using <span 
class="cmss-10">hyperref</span><a 
 id="dx1-3005"></a> and want to use <span 
class="cmtt-10">\capitalisewords </span>or <span 
class="cmtt-10">\makefirstuc</span><a 
 id="dx1-3006"></a> (or
the expanded variants) in a section heading, the PDF bookmarks won&#8217;t be able to use
the command as it&#8217;s not expandable, so you will get a warning that looks
like:
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-9">
Package&#x00A0;hyperref&#x00A0;Warning:&#x00A0;Token&#x00A0;not&#x00A0;allowed&#x00A0;in&#x00A0;a&#x00A0;PDF&#x00A0;string
&#x00A0;<br />(PDFDocEncoding):
&#x00A0;<br />(hyperref)&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;removing&#x00A0;&#8216;\capitalisewords&#8217;
</div>
<!--l. 221--><p class="nopar" > If you want to provide an alternative for the PDF bookmark, you can use
<span 
class="cmss-10">hyperref</span><a 
 id="dx1-3007"></a>&#8217;s <span 
class="cmtt-10">\texorpdfstring</span><a 
 id="dx1-3008"></a> command. See the <span 
class="cmss-10">hyperref</span><a 
 id="dx1-3009"></a> manual for further details.
</div>
</p><!--l. 225--><p class="noindent" >
</p><!--l. 227--><p class="indent" >   Examples:
     </p><ol  class="enumerate1" >
     <li 
  class="enumerate" id="x1-3011x1">
                                                                    

                                                                    
     <div class="verbatim" id="verbatim-10">
     \capitalisewords{a&#x00A0;book&#x00A0;of&#x00A0;rhyme.}
</div>
     <!--l. 232--><p class="nopar" > produces: A Book Of Rhyme.
     </p></li>
     <li 
  class="enumerate" id="x1-3013x2">
                                                                    

                                                                    
     <div class="verbatim" id="verbatim-11">
     \capitalisewords{a&#x00A0;book\space&#x00A0;of&#x00A0;rhyme.}
</div>
     <!--l. 239--><p class="nopar" > produces: A Book of Rhyme.
     </p></li>
     <li 
  class="enumerate" id="x1-3015x3">
                                                                    

                                                                    
     <div class="verbatim" id="verbatim-12">
     \newcommand{\mytitle}{a&#x00A0;book\space&#x00A0;of&#x00A0;rhyme.}
     &#x00A0;<br />\capitalisewords{\mytitle}
</div>
     <!--l. 247--><p class="nopar" > produces:  A BOOK OF RHYME. (No expansion is performed on <span 
class="cmtt-10">\mytitle</span>.)
     Compare with next example:
     </p></li>
     <li 
  class="enumerate" id="x1-3017x4">
                                                                    

                                                                    
     <div class="verbatim" id="verbatim-13">
     \newcommand{\mytitle}{a&#x00A0;book\space&#x00A0;of&#x00A0;rhyme.}
     &#x00A0;<br />\xcapitalisewords{\mytitle}
</div>
     <!--l. 257--><p class="nopar" > produces: A Book of Rhyme.
     </p><!--l. 261--><p class="noindent" >However
                                                                    

                                                                    
</p>
     <div class="verbatim" id="verbatim-14">
     \ecapitalisewords{\mytitle}
</div>
     <!--l. 264--><p class="nopar" > produces: A Book Of Rhyme.
</p>
     </li></ol>
<!--l. 270--><p class="indent" >   As from v1.09, you can specify words which shouldn&#8217;t be capitalised unless they
occur at the start of &#x27E8;<span 
class="cmti-10">text</span>&#x27E9; using:
</p><!--l. 272--><p class="indent" >   <hr><div title="Definition"><span class="marginpar"><span 
class="cmtt-9">\MFUnocap</span><span 
class="cmtt-9">&#x00A0;</span></span><a 
 id="dx1-3018"></a> <span 
class="cmtt-10">\MFUnocap{</span>&#x27E8;<span 
class="cmitt-10">word</span>&#x27E9;<span 
class="cmtt-10">} </span></div><hr>
</p><!--l. 274--><p class="noindent" >
This only has a local effect. The global version is:
</p><!--l. 276--><p class="indent" >   <hr><div title="Definition"><span class="marginpar"><span 
class="cmtt-9">\gMFUnocap</span><span 
class="cmtt-9">&#x00A0;</span></span><a 
 id="dx1-3019"></a> <span 
class="cmtt-10">\gMFUnocap{</span>&#x27E8;<span 
class="cmitt-10">word</span>&#x27E9;<span 
class="cmtt-10">} </span></div><hr>
</p><!--l. 278--><p class="noindent" >
</p><!--l. 280--><p class="indent" >   For example:
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-15">
\capitalisewords{the&#x00A0;wind&#x00A0;in&#x00A0;the&#x00A0;willows}
&#x00A0;<br />\MFUnocap{in}%
&#x00A0;<br />\MFUnocap{the}%
&#x00A0;<br />\capitalisewords{the&#x00A0;wind&#x00A0;in&#x00A0;the&#x00A0;willows}
</div>
<!--l. 288--><p class="nopar" > produces: <spacer type=vertical size=10><span class="obeylines-h">
   <br />The Wind In The Willows
   <br />The Wind in the Willows
   <br /><spacer type=vertical size=10></span>
The list of words that shouldn&#8217;t be capitalised can be cleared using
</p><!--l. 299--><p class="indent" >   <hr><div title="Definition"><span class="marginpar"><span 
class="cmtt-9">\MFUclear</span><span 
class="cmtt-9">&#x00A0;</span></span><a 
 id="dx1-3020"></a> <span 
class="cmtt-10">\MFUclear </span></div><hr>
</p><!--l. 301--><p class="noindent" >
</p><!--l. 303--><p class="indent" >   The package <span 
class="cmss-10">mfirstuc-english</span><a 
 id="dx1-3021"></a> loads <span 
class="cmss-10">mfirstuc</span><a 
 id="dx1-3022"></a> and uses <span 
class="cmtt-10">\MFUnocap </span>to add common
English articles and conjunctions, such as &#8220;a&#8221;, &#8220;an&#8221;, &#8220;and&#8221;, &#8220;but&#8221;. You may want to
add other words to this list, such as prepositions, but as there&#8217;s some dispute over
whether prepositions should be capitalised, I&#x00A0;don&#8217;t intend to add them to this
package.
</p><!--l. 310--><p class="indent" >   If you want to write a similar package for another language, all you need to do is
create a file with the extension <span 
class="cmtt-10">.sty </span>that starts with
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-16">
\NeedsTeXFormat{LaTeX2e}
</div>
<!--l. 315--><p class="nopar" > The next line should identify the package. For example, if you have called the file
<span 
class="cmtt-10">mfirstuc-french.sty </span>then you need:
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-17">
\ProvidesPackage{mfirstuc-french}
</div>
<!--l. 320--><p class="nopar" > It&#8217;s a good idea to also add a version in the final optional argument, for example:
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-18">
\ProvidesPackage{mfirstuc-french}[2014/07/30&#x00A0;v1.0]
</div>
<!--l. 325--><p class="nopar" > Next load <span 
class="cmss-10">mfirstuc</span><a 
 id="dx1-3023"></a>:
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-19">
\RequirePackage{mfirstuc}
</div>
<!--l. 329--><p class="nopar" > Now add all your <span 
class="cmtt-10">\MFUnocap </span>commands. For example:
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-20">
\MFUnocap{de}
</div>
<!--l. 333--><p class="nopar" > At the end of the file add:
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-21">
\endinput
</div>
<!--l. 337--><p class="nopar" >
</p><!--l. 339--><p class="indent" >   Put the file somewhere on <span class="TEX">T<span 
class="E">E</span>X</span>&#8217;s path, and now you can use this package in your
document. You might also consider uploading it to CTAN in case other users find it
useful.
</p><!--l. 343--><p class="noindent" >
</p>
<!--l. 343--><p class="noindent" ><a 
href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">3   </span> <a 
 id="sec:utf8"></a>UTF-8</h3>
<!--l. 346--><p class="noindent" >The <span 
class="cmtt-10">\makefirstuc </span>command works by utilizing the fact that, in most cases,
<span class="TEX">T<span 
class="E">E</span>X</span>&#x00A0;doesn&#8217;t require a regular argument to be enclosed in braces if it only consists of a
single token. (This is why you can do, say, <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\frac12</span></span></span> instead of <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\frac{1}{2}</span></span></span> or <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">x^2</span></span></span>
instead of <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">x^{2}</span></span></span>, although some users frown on this practice.)
</p><!--l. 353--><p class="indent" >   A&#x00A0;simplistic version of the <span 
class="cmtt-10">\makefirstuc </span>command is:
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-22">
\newcommand*{\FirstUC}[1]{\MakeUppercase&#x00A0;#1}
</div>
<!--l. 356--><p class="nopar" > Here
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-23">
\FirstUC{abc}
</div>
<!--l. 360--><p class="nopar" > is equivalent to
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-24">
\MakeUppercase&#x00A0;abc
</div>
<!--l. 364--><p class="nopar" > and since <span 
class="cmtt-10">\MakeUppercase </span>requires an argument, it grabs the first token (the
character &#8220;a&#8221; in this case) and uses that as the argument so that the result is:
Abc.
</p><!--l. 369--><p class="indent" >   The <span 
class="cmss-10">glossaries</span><a 
 id="dx1-4001"></a> package needs to take into account the fact that the text may be
contained in the argument of a formatting command, such as <span 
class="cmtt-10">\acronymfont</span>, so
<span 
class="cmtt-10">\makefirstuc </span>has to be more complicated than the trivial <span 
class="cmtt-10">\FirstUC </span>shown above, but
at its basic level, <span 
class="cmtt-10">\makefirstuc </span>uses this same method and is the reason why,
in most cases, you don&#8217;t need to enclose the first character in braces. So if
</p><div class="alltt">
<div class="obeylines-v">
<span 
class="cmtt-10">\MakeUppercase</span><span 
class="cmtt-10">&#x00A0;</span>&#x27E8;<span 
class="cmitt-10">stuff</span>&#x27E9;
</div>
</div> works, then <div class="alltt">
<div class="obeylines-v">
<span 
class="cmtt-10">\makefirstuc{</span>&#x27E8;<span 
class="cmitt-10">stuff</span>&#x27E9;<span 
class="cmtt-10">}</span>
</div>
</div> should also work and so should <div class="alltt">
<div class="obeylines-v">
<span 
class="cmtt-10">\makefirstuc</span><span 
class="cmsy-10">{</span><span 
class="cmtt-10">\foo{</span>&#x27E8;<span 
class="cmitt-10">stuff</span>&#x27E9;<span 
class="cmtt-10">}</span><span 
class="cmsy-10">}</span>
</div>
</div> but if <div class="alltt">
<div class="obeylines-v">
<span 
class="cmtt-10">\MakeUppercase</span><span 
class="cmtt-10">&#x00A0;</span>&#x27E8;<span 
class="cmitt-10">stuff</span>&#x27E9;
</div>
</div> doesn&#8217;t work, then neither will <div class="alltt">
<div class="obeylines-v">
<span 
class="cmtt-10">\makefirstuc{</span>&#x27E8;<span 
class="cmitt-10">stuff</span>&#x27E9;<span 
class="cmtt-10">}</span>
                                                                    

                                                                    
</div>
</div> nor <div class="alltt">
<div class="obeylines-v">
<span 
class="cmtt-10">\makefirstuc</span><span 
class="cmsy-10">{</span><span 
class="cmtt-10">\foo{</span>&#x27E8;<span 
class="cmitt-10">stuff</span>&#x27E9;<span 
class="cmtt-10">}</span><span 
class="cmsy-10">}</span>
</div>
</div>
<!--l. 401--><p class="indent" >   Try the following document: </p><div class="alltt">
<div class="obeylines-v">
<span 
class="cmtt-10">\documentclass</span><span 
class="cmsy-10">{</span><span 
class="cmtt-10">article</span><span 
class="cmsy-10">}</span>
<br />
<br /><span 
class="cmtt-10">\usepackage[utf8]</span><span 
class="cmsy-10">{</span><span 
class="cmtt-10">inputenc</span><span 
class="cmsy-10">}</span>
<br /><span 
class="cmtt-10">\usepackage[T1]</span><span 
class="cmsy-10">{</span><span 
class="cmtt-10">fontenc</span><span 
class="cmsy-10">}</span>
<br />
<br /><span 
class="cmtt-10">\begin</span><span 
class="cmsy-10">{</span><span 
class="cmtt-10">document</span><span 
class="cmsy-10">}</span>
<br />
<br /><span 
class="cmtt-10">\MakeUppercase</span><span 
class="cmtt-10">&#x00A0;</span><span 
class="cmtt-10">&atilde;</span><span 
class="cmtt-10">bc</span>
<br />
<br /><span 
class="cmtt-10">\end</span><span 
class="cmsy-10">{</span><span 
class="cmtt-10">document</span><span 
class="cmsy-10">}</span>
</div>
</div>
<!--l. 415--><p class="indent" >   This will result in the error:
                                                                    

                                                                    
</p>
   <div class="verbatim" id="verbatim-25">
!&#x00A0;Argument&#x00A0;of&#x00A0;\UTFviii@two@octets&#x00A0;has&#x00A0;an&#x00A0;extra&#x00A0;}.
</div>
<!--l. 418--><p class="nopar" > This is why <span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">\makefirstuc{</span></span></span><span 
class="cmtt-10">&atilde;</span><span 
class="cmtt-10">bc</span><span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">}</span></span></span> won&#8217;t work. It will only work if the character <span 
class="cmtt-10">&atilde;</span> is
placed inside a group.
</p><!--l. 423--><p class="indent" >   The reason for this error message is due to <span class="TEX">T<span 
class="E">E</span>X</span>&#x00A0;having been written before
Unicode was invented. Although <span 
class="cmtt-10">&atilde;</span> may look like a single character in your text editor,
from <span class="TEX">T<span 
class="E">E</span>X</span>&#8217;s point of view it&#8217;s <span 
class="cmti-10">two </span>tokens. So </p><div class="alltt">
<div class="obeylines-v">
<span 
class="cmtt-10">\MakeUppercase</span><span 
class="cmtt-10">&#x00A0;</span><span 
class="cmtt-10">&atilde;</span><span 
class="cmtt-10">bc</span>
</div>
</div> tries to apply <span 
class="cmtt-10">\MakeUppercase </span>to just the first octet of &atilde;. This means that the second
octet has been separated from the first octet, which is the cause of the error. In this
case the argument isn&#8217;t a single token, so the two tokens (the first and second octet of
&atilde;) must be grouped: <div class="alltt">
<div class="obeylines-v">
<span 
class="cmtt-10">\MakeUppercase</span><span 
class="cmsy-10">{</span><span 
class="cmtt-10">&atilde;</span><span 
class="cmsy-10">}</span><span 
class="cmtt-10">bc</span>
</div>
</div>
<!--l. 439--><p class="indent" >   Note that XeTeX&#x00A0;(and therefore XeLaTeX) is a modern implementation of
<span class="TEX">T<span 
class="E">E</span>X</span>&#x00A0;designed to work with Unicode and therefore doesn&#8217;t suffer from this
drawback. Now let&#8217;s look at the XeLaTeX&#x00A0;equivalent of the above example:
</p><div class="alltt">
<div class="obeylines-v">
<span 
class="cmtt-10">\documentclass</span><span 
class="cmsy-10">{</span><span 
class="cmtt-10">article</span><span 
class="cmsy-10">}</span>
<br />
<br /><span 
class="cmtt-10">\usepackage</span><span 
class="cmsy-10">{</span><span 
class="cmtt-10">fontspec</span><span 
class="cmsy-10">}</span>
<br />
<br /><span 
class="cmtt-10">\begin</span><span 
class="cmsy-10">{</span><span 
class="cmtt-10">document</span><span 
class="cmsy-10">}</span>
<br />
<br /><span 
class="cmtt-10">\MakeUppercase</span><span 
class="cmtt-10">&#x00A0;</span><span 
class="cmtt-10">&atilde;</span><span 
class="cmtt-10">bc</span>
<br />
<br /><span 
class="cmtt-10">\end</span><span 
class="cmsy-10">{</span><span 
class="cmtt-10">document</span><span 
class="cmsy-10">}</span>
</div>
</div>
                                                                    

                                                                    
<!--l. 455--><p class="indent" >   This works correctly when compiled with XeLaTeX. This means that
<span 
class="cmtt-10">\makefirstuc</span><span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">{</span></span></span><span 
class="cmtt-10">&atilde;</span><span 
class="cmtt-10">bc</span><span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">}</span></span></span> will work <span 
class="cmti-10">provided you use XeLaTeX</span><span 
class="cmti-10">&#x00A0;and the </span><span 
class="cmssi-10">fontspec</span><a 
 id="dx1-4002"></a>
<span 
class="cmti-10">package</span>.
</p>
    
</body></html>