diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/mfirstuc/mfirstuc.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/mfirstuc/mfirstuc.dtx | 54 |
1 files changed, 34 insertions, 20 deletions
diff --git a/Master/texmf-dist/source/latex/mfirstuc/mfirstuc.dtx b/Master/texmf-dist/source/latex/mfirstuc/mfirstuc.dtx index 9b96044e2d6..5191f0d5787 100644 --- a/Master/texmf-dist/source/latex/mfirstuc/mfirstuc.dtx +++ b/Master/texmf-dist/source/latex/mfirstuc/mfirstuc.dtx @@ -1,21 +1,21 @@ %\iffalse % mfirstuc.dtx generated using makedtx version 1.1 (c) Nicola Talbot % Command line args: -% -author "Nicola Talbot" +% -src "mfirstuc.sty\Z=>mfirstuc.sty" +% -src "mfirstuc-english.sty\Z=>mfirstuc-english.sty" +% -src "(sample.*\.tex)\Z=>\1" +% -src "(.*\.perl)\Z=>\1" +% -doc "mfirstuc-codedoc.tex" % -comment ".*\.perl" % -comment ".*\.tex" +% -author "Nicola Talbot" +% -setambles ".*\.perl=>\nopreamble\nopostamble" +% -setambles ".*\.tex=>\nopreamble\nopostamble" % -codetitle "Main Package Code" % -macrocode ".*\.perl" % -macrocode ".*\.tex" -% -setambles ".*\.perl=>\nopreamble\nopostamble" -% -setambles ".*\.tex=>\nopreamble\nopostamble" -% -doc "mfirstuc-codedoc.tex" -% -src "mfirstuc.sty\Z=>mfirstuc.sty" -% -src "mfirstuc-english.sty\Z=>mfirstuc-english.sty" -% -src "(sample.*\.tex)\Z=>\1" -% -src "(.*\.perl)\Z=>\1" % mfirstuc -% Created on 2015/12/8 14:22 +% Created on 2015/12/17 12:46 %\fi %\iffalse %<*package> @@ -63,7 +63,7 @@ mfirstuc.dtx \setcounter{IndexColumns}{2} -\CheckSum{260} +\CheckSum{268} \begin{document} \DocInput{mfirstuc.dtx} @@ -73,12 +73,12 @@ mfirstuc.dtx %\MakeShortVerb{"} %\DeleteShortVerb{\|} % -% \title{Documented Code For mfirstuc v2.01} +% \title{Documented Code For mfirstuc v2.02} % \author{Nicola L.C. Talbot\\[10pt] %Dickimaw Books\\ %\url{http://www.dickimaw-books.com/}} % -% \date{2015-12-08} +% \date{2015-12-17} % \maketitle % %\tableofcontents @@ -110,7 +110,7 @@ mfirstuc.dtx %\changes{2.0}{2015/09/09}{package split from glossaries} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{mfirstuc}[2015/12/08 v2.01 (NLCT)] +\ProvidesPackage{mfirstuc}[2015/12/17 v2.02 (NLCT)] % \end{macrocode} % Requires \sty{etoolbox}:\changes{1.06}{2012/05/21}{now requires % etoolbox} @@ -317,16 +317,30 @@ mfirstuc.dtx % %\begin{macro}{\mfu@checkword} % Check if word should be capitalised. +% This originally used \sty{etoolbox}'s \ics{ifinlist} command +% but this doesn't work if the word contains grouping. %\changes{1.09}{2017-07-30}{new} +%\changes{2.02}{2015-12-17}{modified to use loop instead of \cs{ifinlist}} % \begin{macrocode} \newcommand*\mfu@checkword[1]{% - \ifinlist{#1}{\@mfu@nocaplist}% - {% - \let\@mfu@domakefirstuc\@firstofone - }% - {% - \let\@mfu@domakefirstuc\makefirstuc - }% + \def\mfu@checkword@arg{#1}% + \let\@mfu@domakefirstuc\makefirstuc + \forlistloop\mfu@checkword@do\@mfu@nocaplist +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\mfu@checkword@do} +% Handler for loop used by \cs{mfu@checkword} +%\changes{2.02}{2015-12-17}{new} +% \begin{macrocode} +\newcommand*{\mfu@checkword@do}[1]{% + \ifdefstring{\mfu@checkword@arg}{#1}% + {% + \let\@mfu@domakefirstuc\@firstofone + \listbreak + }% + {}% } % \end{macrocode} %\end{macro} |