summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/glossaries/base/mfirstuc.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/glossaries/base/mfirstuc.sty')
-rw-r--r--Master/texmf-dist/tex/latex/glossaries/base/mfirstuc.sty29
1 files changed, 26 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/glossaries/base/mfirstuc.sty b/Master/texmf-dist/tex/latex/glossaries/base/mfirstuc.sty
index 15f73330303..d188ca13208 100644
--- a/Master/texmf-dist/tex/latex/glossaries/base/mfirstuc.sty
+++ b/Master/texmf-dist/tex/latex/glossaries/base/mfirstuc.sty
@@ -7,7 +7,7 @@
%% glossaries.dtx (with options: `mfirstuc.sty,package')
%%
%% glossaries.dtx
-%% Copyright 2011 Nicola Talbot
+%% Copyright 2012 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Nicola Talbot.
%%
-%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl.
+%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-inline.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-mcols.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample-inline.tex, sample-langdict.tex, sample-mfirstuc.tex, sample-numberlist.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl.
%%
%% \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
@@ -39,7 +39,8 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mfirstuc}[2011/04/02 v1.05 (NLCT)]
+\ProvidesPackage{mfirstuc}[2012/05/21 v1.06 (NLCT)]
+\RequirePackage{etoolbox}
\newif\if@glscs
\newtoks\@glsmfirst
\newtoks\@glsmrest
@@ -89,6 +90,28 @@
\def\@gls@gobbletonil#1\@nil{\def\@gls@rest{#1}}
\newcommand*{\xmakefirstuc}[1]{%
\expandafter\makefirstuc\expandafter{#1}}
+\newcommand*{\capitalisewords}[1]{%
+ \def\gls@add@space{}%
+ \mfu@capitalisewords#1 \@nil\mfu@endcap
+ %\gls@add@space\makefirstuc{##1}\def\gls@add@space{ }%
+}
+\def\mfu@capitalisewords#1 #2\mfu@endcap{%
+ \def\mfu@cap@first{#1}%
+ \def\mfu@cap@second{#2}%
+ \gls@add@space
+ \makefirstuc{#1}%
+ \def\gls@add@space{ }%
+ \ifx\mfu@cap@second\@nnil
+ \let\next@mfu@cap\mfu@noop
+ \else
+ \let\next@mfu@cap\mfu@capitalisewords
+ \fi
+ \next@mfu@cap#2\mfu@endcap
+}
+\def\mfu@noop#1\mfu@endcap{}
+\newcommand*{\xcapitalisewords}[1]{%
+ \expandafter\capitalisewords\expandafter{#1}%
+}
\endinput
%%
%% End of file `mfirstuc.sty'.