summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex')
-rw-r--r--Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex66
1 files changed, 60 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex b/Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex
index c3ddd5377e1..ef61993f6d0 100644
--- a/Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex
+++ b/Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex
@@ -20,13 +20,13 @@
pdfkeywords={LaTeX,package,uppercase}]{hyperref}
\begin{document}
- \title{mfirstuc.sty v1.09:
+ \title{mfirstuc.sty v1.10:
uppercasing first letter}
\author{Nicola L.C. Talbot\\[10pt]
Dickimaw Books\\
\url{http://www.dickimaw-books.com/}}
- \date{2014-07-30}
+ \date{2015-02-03}
\maketitle
\tableofcontents
@@ -126,6 +126,27 @@ produces:
argument.
\end{important}
+As from version 1.10, there is now a command that fully expands the
+entire argument before applying \cs{makefirstuc}:
+\begin{definition}[\DescribeMacro\emakefirstuc]
+\cs{emakefirstuc}\marg{text}
+\end{definition}
+
+Examples:
+\begin{verbatim}
+\newcommand{\abc}{\xyz a}
+\newcommand{\xyz}{xyz}
+No expansion: \makefirstuc{\abc}.
+First object one-level expansion: \xmakefirstuc{\abc}.
+Fully expanded: \emakefirstuc{\abc}.
+\end{verbatim}
+produces:
+\renewcommand{\abc}{\xyz a}%
+\newcommand{\xyz}{xyz}
+No expansion: \makefirstuc{\abc}.
+First object one-level expansion: \xmakefirstuc{\abc}.
+Fully expanded: \emakefirstuc{\abc}.
+
If you use \styfmt{mfirstuc} without the \sty{glossaries} package,
the standard \cs{MakeUppercase} command is used. If used with
\sty{glossaries}, \ics{MakeTextUppercase} (defined by the \sty{textcase}
@@ -161,9 +182,36 @@ on \meta{text}.
This is a short cut for
\cs{expandafter}\cs{capitalisewords}\cs{expandafter}\marg{text}.
+As from version 1.10, there is now a command that fully expands the
+entire argument before applying \cs{capitalisewords}:
+\begin{definition}[\DescribeMacro\ecapitalisewords]
+\cs{ecapitalisewords}\marg{text}
+\end{definition}
+
+Examples:
+\begin{verbatim}
+\newcommand{\abc}{\xyz\space four five}
+\newcommand{\xyz}{one two three}
+No expansion: \capitalisewords{\abc}.
+First object one-level expansion: \xcapitalisewords{\abc}.
+Fully expanded: \ecapitalisewords{\abc}.
+\end{verbatim}
+produces:
+\renewcommand{\abc}{\xyz\space four five}%
+\renewcommand{\xyz}{one two three}
+No expansion: \capitalisewords{\abc}.
+First object one-level expansion: \xcapitalisewords{\abc}.
+Fully expanded: \ecapitalisewords{\abc}.
+
+(Remember that the spaces need to be explicit. In the second case
+above, using \cs{xcapitalisewords}, the space before \qt{four} has
+been hidden within \cs{space} so it's not recognised as a word
+boundary, but in the third case, \cs{space} has been expanded to an
+actual space character.)
+
\begin{important}
If you are using \sty{hyperref} and want to use \cs{capitalisewords}
-or \ics{makefirstuc} (or \cs{xcapitalisewords}\slash\cs{xmakefirstuc})
+or \ics{makefirstuc} (or the expanded variants)
in a section heading, the PDF bookmarks won't be able to use the command
as it's not expandable, so you will get a warning that looks like:
\begin{verbatim}
@@ -200,8 +248,7 @@ produces:
produces:
\newcommand{\mytitle}{a book\space of rhyme.}
\capitalisewords{\mytitle}
-(No expansion is performed on \cs{mytitle}, so \meta{text}
-consists of just one ``word''.) Compare with next example:
+(No expansion is performed on \cs{mytitle}.) Compare with next example:
\item
\begin{verbatim}
@@ -211,6 +258,13 @@ consists of just one ``word''.) Compare with next example:
produces:
\xcapitalisewords{\mytitle}
+However
+\begin{verbatim}
+\ecapitalisewords{\mytitle}
+\end{verbatim}
+produces:
+\ecapitalisewords{\mytitle}
+
\end{enumerate}
As from v1.09, you can specify words which shouldn't be capitalised unless they
@@ -339,7 +393,7 @@ doesn't work, then neither will
\begin{alltt}
\cs{makefirstuc}\marg{stuff}
\end{alltt}
-or
+nor
\begin{alltt}
\cs{makefirstuc}\{\cs{foo}\marg{stuff}\}
\end{alltt}