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.tex60
1 files changed, 48 insertions, 12 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex b/Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex
index 84d09ecc7d1..c3ddd5377e1 100644
--- a/Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex
+++ b/Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex
@@ -44,6 +44,16 @@ sequence followed by a non-empty group, in which case the first
object in the group is converted to uppercase.
\textbf{No expansion is performed on the argument.}
+\begin{important}
+If \meta{stuff} starts with a control sequence that takes more than
+one argument, the case-changing will always be applied to the
+\emph{first} 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 \verb|\color{red}{text}|
+you need to define, say, \verb|\red| as \verb|\color{red}| and use
+\verb|\red{text}|.
+\end{important}
+
Examples:
\begin{itemize}
\item |\makefirstuc{abc}| produces \makefirstuc{abc}.
@@ -55,7 +65,7 @@ than \cs{emph}). Note however that
\makefirstuc{{\em abc}}
\end{verbatim}
produces \makefirstuc{{\em abc}} (first object is |{\em abc}| so
-equivalent to |\MakeUppercase{\em abc}|), and
+this is equivalent to |\MakeUppercase{\em abc}|), and
\begin{verbatim}
{\makefirstuc{\em abc}}
\end{verbatim}
@@ -118,8 +128,8 @@ argument.
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 \sty{textcase}
-the package) is used instead. If you are using \styfmt{mfirstuc}
+\sty{glossaries}, \ics{MakeTextUppercase} (defined by the \sty{textcase}
+package) is used instead. If you are using \styfmt{mfirstuc}
without the \styfmt{glossaries} package and want to use
\ics{MakeTextUppercase} instead, you can redefine
\begin{definition}[\DescribeMacro\glsmakefirstuc]
@@ -205,11 +215,11 @@ produces:
As from v1.09, you can specify words which shouldn't be capitalised unless they
occur at the start of \meta{text} using:
-\begin{definition}[\DescribeMacro]
+\begin{definition}[\DescribeMacro\MFUnocap]
\cs{MFUnocap}\marg{word}
\end{definition}
This only has a local effect. The global version is:
-\begin{definition}[\DescribeMacro]
+\begin{definition}[\DescribeMacro\gMFUnocap]
\cs{gMFUnocap}\marg{word}
\end{definition}
@@ -290,7 +300,14 @@ A~simplistic version of the \cs{makefirstuc} command is:
\begin{verbatim}
\newcommand*{\FirstUC}[1]{\MakeUppercase #1}
\end{verbatim}
-Here \verb|\FirstUC{abc}| is equivalent to \verb|\MakeUppercase abc|
+Here
+\begin{verbatim}
+\FirstUC{abc}
+\end{verbatim}
+is equivalent to
+\begin{verbatim}
+\MakeUppercase abc
+\end{verbatim}
and since \cs{MakeUppercase} requires an argument, it grabs the
first token (the character ``a'' in this case) and uses that as the
argument so that the result is: Abc.
@@ -301,12 +318,31 @@ command, such as \cs{acronymfont}, so \cs{makefirstuc} has to be
more complicated than the trivial \cs{FirstUC} shown above, but at
its basic level, \cs{makefirstuc} uses this same method and is the
reason why, in most cases, you don't need to enclose the first
-character in braces. So if \verb|\MakeUppercase |\meta{stuff} works,
-then \verb|\makefirstuc|\marg{stuff} should also work and so should
-\verb|\makefirstuc{\foo|\marg{stuff}\verb|}|, but if
-\verb|\MakeUppercase |\meta{stuff} doesn't work, then neither will
-\verb|\makefirstuc|\marg{stuff}
-(or \verb|\makefirstuc{\foo|\marg{stuff}\verb|}|).
+character in braces. So if
+\begin{alltt}
+\cs{MakeUppercase} \meta{stuff}
+\end{alltt}
+works,
+then
+\begin{alltt}
+\cs{makefirstuc}\marg{stuff}
+\end{alltt}
+should also work and so should
+\begin{alltt}
+\cs{makefirstuc}\{\cs{foo}\marg{stuff}\}
+\end{alltt}
+but if
+\begin{alltt}
+\cs{MakeUppercase} \meta{stuff}
+\end{alltt}
+doesn't work, then neither will
+\begin{alltt}
+\cs{makefirstuc}\marg{stuff}
+\end{alltt}
+or
+\begin{alltt}
+\cs{makefirstuc}\{\cs{foo}\marg{stuff}\}
+\end{alltt}
Try the following document:
\begin{alltt}