summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/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/tex/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/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/mfirstuc/mfirstuc-english.sty4
-rw-r--r--Master/texmf-dist/tex/latex/mfirstuc/mfirstuc.sty66
2 files changed, 59 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/mfirstuc/mfirstuc-english.sty b/Master/texmf-dist/tex/latex/mfirstuc/mfirstuc-english.sty
index bbf5226af48..3419261766c 100644
--- a/Master/texmf-dist/tex/latex/mfirstuc/mfirstuc-english.sty
+++ b/Master/texmf-dist/tex/latex/mfirstuc/mfirstuc-english.sty
@@ -7,7 +7,7 @@
%% mfirstuc.dtx (with options: `mfirstuc-english.sty,package')
%%
%% 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
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mfirstuc-english}[2017/11/14 v2.06 (NLCT)]
+\ProvidesPackage{mfirstuc-english}[2021/10/15 v2.07 (NLCT)]
\RequirePackage{mfirstuc}
\MFUnocap{a}
\MFUnocap{an}
diff --git a/Master/texmf-dist/tex/latex/mfirstuc/mfirstuc.sty b/Master/texmf-dist/tex/latex/mfirstuc/mfirstuc.sty
index 1a8dbf3298e..0efe161b1d7 100644
--- a/Master/texmf-dist/tex/latex/mfirstuc/mfirstuc.sty
+++ b/Master/texmf-dist/tex/latex/mfirstuc/mfirstuc.sty
@@ -7,7 +7,7 @@
%% mfirstuc.dtx (with options: `mfirstuc.sty,package')
%%
%% 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
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mfirstuc}[2017/11/14 v2.06 (NLCT)]
+\ProvidesPackage{mfirstuc}[2021/10/15 v2.07 (NLCT)]
\RequirePackage{etoolbox}
\newif\if@glscs
\newtoks\@glsmfirst
@@ -48,12 +48,18 @@
\@MFU@p@makefirstuc#1\relax\relax\relax\@end@MFU@protected{#1}%
}
\newcommand*{\@MFU@protect}{\protect}
+\newcommand*{\@MFU@skippunc}{\MFUskippunc}
+\newrobustcmd*{\MFUskippunc}[1]{#1}
\def\@MFU@p@makefirstuc#1#2#3\@end@MFU@protected#4{%
\def\gls@argi{#1}%
\ifx\gls@argi\@MFU@protect
\@makefirstuc{#2#3}%
\else
- \@makefirstuc{#4}%
+ \ifx\gls@argi\@MFU@skippunc
+ #2\@makefirstuc{#3}%
+ \else
+ \@makefirstuc{#4}%
+ \fi
\fi
}
\newcommand*{\@makefirstuc}[1]{%
@@ -190,12 +196,12 @@
\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
}
\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
}
\def\mfu@capitalisewords#1 #2\mfu@endcap{%
@@ -216,24 +222,66 @@
\def\mfu@noop#1\mfu@endcap{}
\newif\ifMFUhyphen
\MFUhyphenfalse
+\newcommand*{\@MFU@do@capword}[1]{%
+ \let\@MFU@cappingword\MFUcapword
+ \@MFUwordbreak#1\MFUwordbreak{}\@nil\@endMFUwordbreak
+}
+\newcommand*{\@MFU@dofirst@capword}[1]{%
+ \let\@MFU@cappingword\MFUcapword
+ \@MFUfirstwordbreak#1\MFUwordbreak{}\@nil\@endMFUfirstwordbreak
+}
\newcommand*{\MFUcapword}[1]{%
\ifMFUhyphen
- \@MFUcapword#1-\@nil\@endMFUcapword
+ \MFUhyphencapword{#1}%
\else
- \makefirstuc{#1}%
+ \MFUcapwordfirstuc{#1}%
\fi
}
-\def\@MFUcapword#1-#2\@endMFUcapword{%
+\newcommand*{\MFUcapwordfirstuc}[1]{%
\makefirstuc{#1}%
+}
+\newrobustcmd*{\MFUwordbreak}[1]{#1}
+\newcommand*{\MFUhyphencapword}[1]{%
+ \@MFUcapword#1-\@nil\@endMFUcapword
+}
+\def\@MFUcapword#1-#2\@endMFUcapword{%
+ \MFUcapwordfirstuc{#1}%
\def\@mfu@argii{#2}%
\ifx\@mfu@argii\@nnil
\else
-\@MFUcapword#2\@endMFUcapword
\fi
}
+\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
+}
+\newcommand*{\@MFU@wordbreakcapword}[1]{%
+ \mfu@checkword{#1}%
+ \@mfu@domakefirstuc{#1}%
+}
+\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
+}
+\newcommand*{\@MFU@firstwordbreakcapword}[1]{%
+ \@mfu@domakefirstuc{#1}%
+}
\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
}
\newcommand*{\mfu@checkword@do}[1]{%