summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-10-15 22:15:23 +0000
committerKarl Berry <karl@freefriends.org>2021-10-15 22:15:23 +0000
commited5606c1916622e36fe979e61b30ee483380bf39 (patch)
tree7adccfe0edc07d5c349973f81ce6f1052c5a0861 /Master/texmf-dist/source/latex
parent80adc42821ac1dcac6a9fbbd6e46e77da5047fbc (diff)
mfirstuc (16oct21)
git-svn-id: svn://tug.org/texlive/trunk@60770 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r--Master/texmf-dist/source/latex/mfirstuc/mfirstuc.dtx168
-rw-r--r--Master/texmf-dist/source/latex/mfirstuc/mfirstuc.ins4
2 files changed, 150 insertions, 22 deletions
diff --git a/Master/texmf-dist/source/latex/mfirstuc/mfirstuc.dtx b/Master/texmf-dist/source/latex/mfirstuc/mfirstuc.dtx
index 708531ba486..2aa2008f415 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.2 (c) Nicola Talbot
% Command line args:
-% -codetitle "Main Package Code"
+% -setambles ".*\.perl=>\nopreamble\nopostamble"
+% -setambles ".*\.tex=>\nopreamble\nopostamble"
% -author "Nicola Talbot"
-% -macrocode ".*\.perl"
-% -macrocode ".*\.tex"
% -src "mfirstuc.sty\Z=>mfirstuc.sty"
% -src "mfirstuc-english.sty\Z=>mfirstuc-english.sty"
% -src "(sample.*\.tex)\Z=>\1"
% -src "(.*\.perl)\Z=>\1"
-% -setambles ".*\.perl=>\nopreamble\nopostamble"
-% -setambles ".*\.tex=>\nopreamble\nopostamble"
+% -macrocode ".*\.perl"
+% -macrocode ".*\.tex"
+% -codetitle "Main Package Code"
+% -doc "mfirstuc-codedoc.tex"
% -comment ".*\.perl"
% -comment ".*\.tex"
-% -doc "mfirstuc-codedoc.tex"
% mfirstuc
-% Created on 2017/11/14 12:21
+% Created on 2021/10/15 17:46
%\fi
%\iffalse
%<*package>
@@ -38,7 +38,7 @@
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
-% Copyright (C) 2017 Nicola Talbot, all rights reserved.
+% Copyright (C) 2021 Nicola Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
@@ -64,7 +64,7 @@ mfirstuc.dtx
\setcounter{IndexColumns}{2}
\setlength\IndexMin{100pt}
-\CheckSum{691}
+\CheckSum{771}
\begin{document}
\DocInput{mfirstuc.dtx}
@@ -74,12 +74,12 @@ mfirstuc.dtx
%\MakeShortVerb{"}
%\DeleteShortVerb{\|}
%
-% \title{Documented Code For mfirstuc v2.06}
+% \title{Documented Code For mfirstuc v2.07}
% \author{Nicola L.C. Talbot\\[10pt]
%Dickimaw Books\\
%\url{http://www.dickimaw-books.com/}}
%
-% \date{2017-11-14}
+% \date{2021-10-15}
% \maketitle
%
%\tableofcontents
@@ -111,7 +111,7 @@ mfirstuc.dtx
%\changes{2.0}{2015/09/09}{package split from glossaries}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mfirstuc}[2017/11/14 v2.06 (NLCT)]
+\ProvidesPackage{mfirstuc}[2021/10/15 v2.07 (NLCT)]
% \end{macrocode}
% Requires \sty{etoolbox}:\changes{1.06}{2012/05/21}{now requires
% etoolbox}
@@ -154,6 +154,20 @@ mfirstuc.dtx
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@MFU@skippunc}
+%\changes{2.07}{2021-10-15}{new}
+% \begin{macrocode}
+\newcommand*{\@MFU@skippunc}{\MFUskippunc}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\MFUskippunc}
+%\changes{2.07}{2021-10-15}{new}
+% \begin{macrocode}
+\newrobustcmd*{\MFUskippunc}[1]{#1}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\@MFU@p@makefirstuc}
% Internal command to do the required action.
% \begin{macrocode}
@@ -166,7 +180,15 @@ mfirstuc.dtx
\ifx\gls@argi\@MFU@protect
\@makefirstuc{#2#3}%
\else
- \@makefirstuc{#4}%
+% \end{macrocode}
+% v2.07+ also check for \cs{MFUskippunc}
+%\changes{2.07}{2021-10-15}{check for \cs{MFUskippunc}}
+% \begin{macrocode}
+ \ifx\gls@argi\@MFU@skippunc
+ #2\@makefirstuc{#3}%
+ \else
+ \@makefirstuc{#4}%
+ \fi
\fi
}
% \end{macrocode}
@@ -419,7 +441,7 @@ mfirstuc.dtx
\newrobustcmd*{\capitalisewords}[1]{%
\let\@mfu@checkword\@gobble
\def\gls@add@space{}%
- \let\@mfu@domakefirstuc\MFUcapword
+ \let\@mfu@domakefirstuc\@MFU@dofirst@capword
\mfu@capitalisewords#1 \@nil\mfu@endcap
}
% \end{macrocode}
@@ -431,7 +453,7 @@ mfirstuc.dtx
% \begin{macrocode}
\newcommand*{\@mfu@mid@capitalisewords}[1]{%
\def\gls@add@space{}%
- \let\@mfu@domakefirstuc\MFUcapword
+ \let\@mfu@domakefirstuc\@MFU@do@capword
\mfu@capitalisewords#1 \@nil\mfu@endcap
}
% \end{macrocode}
@@ -465,24 +487,71 @@ mfirstuc.dtx
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@MFU@do@capword}
+%\changes{2.07}{2021-10-15}{new}
+% \begin{macrocode}
+\newcommand*{\@MFU@do@capword}[1]{%
+ \let\@MFU@cappingword\MFUcapword
+ \@MFUwordbreak#1\MFUwordbreak{}\@nil\@endMFUwordbreak
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@MFU@dofirst@capword}
+%\changes{2.07}{2021-10-15}{new}
+% \begin{macrocode}
+\newcommand*{\@MFU@dofirst@capword}[1]{%
+ \let\@MFU@cappingword\MFUcapword
+ \@MFUfirstwordbreak#1\MFUwordbreak{}\@nil\@endMFUfirstwordbreak
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\MFUcapword}
%\changes{2.03}{2016-07-29}{new}
% \begin{macrocode}
\newcommand*{\MFUcapword}[1]{%
\ifMFUhyphen
- \@MFUcapword#1-\@nil\@endMFUcapword
+ \MFUhyphencapword{#1}%
\else
- \makefirstuc{#1}%
+ \MFUcapwordfirstuc{#1}%
\fi
}
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\MFUcapwordfirstuc}
+%\changes{2.07}{2021-10-15}{new}
+% \begin{macrocode}
+\newcommand*{\MFUcapwordfirstuc}[1]{%
+ \makefirstuc{#1}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\MFUwordbreak}
+%\changes{2.07}{2021-10-15}{new}
+%Markup a character (or command) that should be treated as a word
+%break.
+% \begin{macrocode}
+\newrobustcmd*{\MFUwordbreak}[1]{#1}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\MFUhyphencapword}
+%\changes{2.07}{2021-10-15}{new}
+% \begin{macrocode}
+\newcommand*{\MFUhyphencapword}[1]{%
+ \@MFUcapword#1-\@nil\@endMFUcapword
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\@MFUcapword}
%\changes{2.03}{2016-07-29}{new}
% \begin{macrocode}
\def\@MFUcapword#1-#2\@endMFUcapword{%
- \makefirstuc{#1}%
+ \MFUcapwordfirstuc{#1}%
\def\@mfu@argii{#2}%
\ifx\@mfu@argii\@nnil
\else
@@ -492,6 +561,57 @@ mfirstuc.dtx
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@MFUwordbreak}
+%\changes{2.07}{2021-10-15}{new}
+% \begin{macrocode}
+\def\@MFUwordbreak#1\MFUwordbreak#2#3\@endMFUwordbreak{%
+ \def\@mfu@argiii{#3}%
+ \ifx\@mfu@argiii\@nnil
+ \@MFU@cappingword{#1}%
+ \else
+ \let\@MFU@cappingword\@MFU@wordbreakcapword
+ \@MFU@cappingword{#1}%
+ #2\@MFUwordbreak#3\@endMFUwordbreak
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@MFU@wordbreakcapword}
+%\changes{2.07}{2021-10-15}{new}
+% \begin{macrocode}
+\newcommand*{\@MFU@wordbreakcapword}[1]{%
+ \mfu@checkword{#1}%
+ \@mfu@domakefirstuc{#1}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@MFUfirstwordbreak}
+%\changes{2.07}{2021-10-15}{new}
+% \begin{macrocode}
+\def\@MFUfirstwordbreak#1\MFUwordbreak#2#3\@endMFUfirstwordbreak{%
+ \def\@mfu@argiii{#3}%
+ \ifx\@mfu@argiii\@nnil
+ \@MFU@cappingword{#1}%
+ \else
+ \let\@MFU@cappingword\@MFU@firstwordbreakcapword
+ \@MFU@cappingword{#1}%
+ #2\@MFUfirstwordbreak#3\@endMFUfirstwordbreak
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@MFU@firstwordbreakcapword}
+%\changes{2.07}{2021-10-15}{new}
+% \begin{macrocode}
+\newcommand*{\@MFU@firstwordbreakcapword}[1]{%
+ \@mfu@domakefirstuc{#1}%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\mfu@checkword}
% Check if word should be capitalised.
% This originally used \sty{etoolbox}'s \ics{ifinlist} command
@@ -501,7 +621,7 @@ mfirstuc.dtx
% \begin{macrocode}
\newcommand*\mfu@checkword[1]{%
\def\mfu@checkword@arg{#1}%
- \let\@mfu@domakefirstuc\MFUcapword
+ \let\@mfu@domakefirstuc\@MFU@do@capword
\forlistloop\mfu@checkword@do\@mfu@nocaplist
}
% \end{macrocode}
@@ -545,6 +665,7 @@ mfirstuc.dtx
%\begin{macro}{\MFUnocap}
% Provide the user with a means to add a word to the list.
% (No expansion performed on the argument.)
+%\changes{1.09}{2017-07-30}{new}
% \begin{macrocode}
\newcommand*{\MFUnocap}[1]{\listadd{\@mfu@nocaplist}{#1}}
% \end{macrocode}
@@ -944,7 +1065,7 @@ mfirstuc.dtx
%\label{sec:code:mfirstuc-english}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mfirstuc-english}[2017/11/14 v2.06 (NLCT)]
+\ProvidesPackage{mfirstuc-english}[2021/10/15 v2.07 (NLCT)]
% \end{macrocode}
% Load \sty{mfirstuc} if not already loaded:
% \begin{macrocode}
@@ -1031,6 +1152,13 @@ Protected formatting: \xmakefirstuc{\mytext}.
\renewcommand*{\mytext}{\ae\oe{some text}}
Sequential commands: \xmakefirstuc{\mytext}.
+\verb|\makefirstuc{\MFUskippunc{?`}c\'omo est\'as?}|
+\makefirstuc{\MFUskippunc{?`}c\'omo est\'as?}
+
+\renewcommand{\mytext}{\MFUskippunc{?`}c\'omo est\'as?}
+Fully expanded:
+\emakefirstuc{\mytext}
+
\section{Title Case (No Formatting Commands)}
\bgroup
diff --git a/Master/texmf-dist/source/latex/mfirstuc/mfirstuc.ins b/Master/texmf-dist/source/latex/mfirstuc/mfirstuc.ins
index 59773096d47..02e695dcc17 100644
--- a/Master/texmf-dist/source/latex/mfirstuc/mfirstuc.ins
+++ b/Master/texmf-dist/source/latex/mfirstuc/mfirstuc.ins
@@ -1,10 +1,10 @@
-% mfirstuc.ins generated using makedtx version 1.2 2017/11/14 12:21
+% mfirstuc.ins generated using makedtx version 1.2 2021/10/15 17:46
\input docstrip
\preamble
mfirstuc.dtx
- Copyright 2017 Nicola Talbot
+ Copyright 2021 Nicola Talbot
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3