texlive[63020] Master/texmf-dist: titlecaps (13apr22)

commits+karl at tug.org commits+karl at tug.org
Wed Apr 13 21:56:34 CEST 2022


Revision: 63020
          http://tug.org/svn/texlive?view=revision&revision=63020
Author:   karl
Date:     2022-04-13 21:56:33 +0200 (Wed, 13 Apr 2022)
Log Message:
-----------
titlecaps (13apr22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/titlecaps/README
    trunk/Master/texmf-dist/doc/latex/titlecaps/titlecaps.pdf
    trunk/Master/texmf-dist/doc/latex/titlecaps/titlecaps.tex
    trunk/Master/texmf-dist/tex/latex/titlecaps/titlecaps.sty

Modified: trunk/Master/texmf-dist/doc/latex/titlecaps/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/titlecaps/README	2022-04-13 19:56:21 UTC (rev 63019)
+++ trunk/Master/texmf-dist/doc/latex/titlecaps/README	2022-04-13 19:56:33 UTC (rev 63020)
@@ -1,7 +1,7 @@
-The titlecaps package is intended for setting rich text into titling
-capitals (in which the first character of words are capitalized).  It
-automatically accounts for diacritical marks (like umlauts), national
-symbols (like "ae"), punctuation, and font changing commands that alter
-the appearance or size of the text.  It allows a list of predesignated
-words to be protected as lower-cased, and also allows for titling
+The titlecaps package is intended for setting rich text into titling 
+capitals (in which the first character of words are capitalized).  It 
+automatically accounts for diacritical marks (like umlauts), national 
+symbols (like "ae"), punctuation, and font changing commands that alter 
+the appearance or size of the text.  It allows a list of predesignated 
+words to be protected as lower-cased, and also allows for titling 
 exceptions of various sorts.

Modified: trunk/Master/texmf-dist/doc/latex/titlecaps/titlecaps.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/titlecaps/titlecaps.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/titlecaps/titlecaps.tex	2022-04-13 19:56:21 UTC (rev 63019)
+++ trunk/Master/texmf-dist/doc/latex/titlecaps/titlecaps.tex	2022-04-13 19:56:33 UTC (rev 63020)
@@ -1,6 +1,4 @@
 \documentclass{article}
-\def\version{1.2}
-%% Copyright 2013 Steven B. Segletes
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3
@@ -14,13 +12,6 @@
 %
 % The Current Maintainer of this work is Steven B. Segletes.
 %
-% V1.1  -Typographical corrections to docs.
-%       -Missing % added on line 356
-% V1.2  -Now works with \l and \aa  national symbols.
-%       -Replaced all occurrences of \roman with \romannumeral\value
-%       -Found two lines needing a trailing %
-%       -Added a trailing space following invocations of \catcode
-%
 \usepackage{titlecaps}
 \usepackage{needspace}
 \parskip 1em
@@ -41,9 +32,9 @@
 \rule{0em}{.7em}\small Routines for setting rich-text input into
 Titling Caps\\
 \rule{0em}{2.7em}\large Steven B. Segletes\\
-steven.b.segletes.civ at mail.mil\\
-\rule{0em}{1.7em}\today\\
-v\version
+SSegletes at verizon.net\\
+\rule{0em}{1.7em}\titlecapsVersionDate\\
+v\titlecapsVersionNumber
 \end{center}
 
 \Addlcwords{for a is but and with of in as the etc on to if}
@@ -156,7 +147,7 @@
 package can notably handle the titling of strings containing both
 diacritical marks found in various languages (such as \`o, \'o, \^o,
 \"o, \~o, \=o, \.o, \u o, \v o, \H o, \t{oo}, \c o, \d o, and \b o), as
-well as national symbols (such as \oe, \ae, \aa, \l, and \o).
+well as national symbols (such as \oe, \ae, and \o~[see {\QL}]).
 
 While punctuation had been earlier screened out in order to search for
 predefined lower-cased words, that is a slightly different problem from
@@ -177,6 +168,12 @@
 font-changing commands, it will not, in general, work with macros in the
 argument, unless the macros expand directly to a text string.
 
+The {\tcp} package is designed to work with diacritical marks (for
+example, umlauts) as well as national symbols (symbols like \ae, \oe,
+\textit{etc.}).  There remain, however, two national symbols which are
+not handled properly by this package.  They are {\aa} and {\l}.  They
+will not be capitalized, even if found at the beginning of a word.
+
 The {\tcp} package is designed to screen out punctuation when searching
 for words that are pre-designated as lower-cased.  So, for example, the
 word (\textit{if}) or \textit{``if''} or [\textit{if} or \textit{if,}
@@ -374,14 +371,14 @@
 either need, in this example, to add \textit{xx} to the lowercase word
 list, which you can see i did not.  instead, i put ``\bs relax~xx'' as
 the argument, so that, in essence, the \bs relax was capitalized, not
-the x.  Or you could use \texttt{\bs textnc}.  here i demonstrate that
+the x.  Or you could use \texttt{\bs textnc} .  here i demonstrate that
 text boldface, \textbf{as in the \bs textbf command}, also works fine,
 as do \texttt{texttt}, \textsl{textsl}, \textsc{textsc},
 \textsf{textsf}, \textit{etc}.  titlecap will work on diacritical marks,
 such as \"apfel, \c cacao \textit{etc.}, \scriptsize fontsize \LARGE
 changing commands\normalsize\unskip, as well as national symbols such as
-\o laf, \ae gis, \oe dipus, \aa ngstrom, and \l ucky. 
-the method will work with some
+\o laf, \ae gis, and \oe dipus.  unfortunately, i could not get it to
+work on the \aa~nor the \l~symbols. the method will work with some
 things in math mode, capitalizing symbols if there is a leading space,
 $x^2$ can become $ x^2$, and it can process but it will not capitalize
 the greek symbols, such as $\alpha$, and will choke on most macros, if

Modified: trunk/Master/texmf-dist/tex/latex/titlecaps/titlecaps.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/titlecaps/titlecaps.sty	2022-04-13 19:56:21 UTC (rev 63019)
+++ trunk/Master/texmf-dist/tex/latex/titlecaps/titlecaps.sty	2022-04-13 19:56:33 UTC (rev 63020)
@@ -1,7 +1,8 @@
+\def\titlecapsVersionNumber{1.3}
+\def\titlecapsVersionDate{2022/04/12}
 \ProvidesPackage{titlecaps}
-[2015/01/30 V1.2
+[\titlecapsVersionDate\ \titlecapsVersionNumber\
  Routines for setting rich-text input into Titling Caps]
-%% Copyright 2013 Steven B. Segletes
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3
@@ -17,10 +18,13 @@
 %
 % V1.1  -Typographical corrections to docs.
 %       -Missing % added on line 356
-% V1.2  -Now works with \l and \aa  national symbols.
-%       -Replaced all occurrences of \roman with \romannumeral\value
+% V1.2  -Replaced all occurrences of \roman with \romannumeral\value
 %       -Found two lines needing a trailing %
 %       -Added a trailing space following invocations of \catcode
+% V1.3  -Converted a number of \ifthenelse to corresponding TeX level
+%        \ifx, \ifnum, and \if syntax
+%       -Converted a number of \protected at edef to appropriately 
+%        expanded \def syntax.
 %
 \usepackage{ifnextok}
 \usepackage{ifthen}
@@ -31,6 +35,9 @@
 \def\SoftSpace{ }
 \catcode`\^^00=12 %
 \def\cmd at flag{^^00} % FLAGS END-OF-COMMAND; NEXT CHAR CAPPED
+\def\def at x#1#2{\expandafter\def\expandafter#1\expandafter{#2}}
+\def\def at xx#1#2{\expandafter\def at x\expandafter#1\expandafter{#2}}
+\def\def at xxx#1#2{\expandafter\def at xx\expandafter#1\expandafter{#2}}
 
 \let\sv at textup\textup
 \let\sv at textit\textit
@@ -83,8 +90,9 @@
 \catcode`'=12 %
 }
 
-\def\add at space{\protected at edef\@thestring{\@thestring\SoftSpace}}
+\def\add at space{\def at xx\@thestring{\expandafter\@thestring\SoftSpace}}
 
+
 % PRIMUS IS FOR BEGINNING-OF-STRING TITLE-CAPPING (1st WORD OVERRIDES
 % PREDEFINED LOWER CASE)
 \newcommand\redefine at primus{%
@@ -211,7 +219,7 @@
 
 \newcommand\add at lcword[1]{%
   \addtocounter{lc at words}{1}%
-  \expandafter\edef\csname lcword\romannumeral\value{lc at words}\endcsname{#1}%
+  \expandafter\def at xx\csname lcword\romannumeral\value{lc at words}\endcsname{#1}%
 }
 
 % SEARCH TERTIUS CONVERTED ARGUMENT FOR LOWERCASE WORDS, SET FLAG
@@ -221,7 +229,7 @@
   \setcounter{word at count}{0}%
   \whiledo{\value{word at count} < \narg}{%
     \addtocounter{word at count}{1}%
-    \protected at edef\current at word{%
+    \def at xx\current at word{%
       \csname arg\romannumeral\value{word at count}\endcsname}%
     \def\found at word{F}%
     \setcounter{lcword at index}{0}%
@@ -229,7 +237,7 @@
             found at word\romannumeral\value{word at count}\endcsname{F}%
     \whiledo{\value{lcword at index} < \value{lc at words}}{%
       \addtocounter{lcword at index}{1}%
-      \protected at edef\current at lcword{%
+      \def at xx\current at lcword{%
         \csname lcword\romannumeral\value{lcword at index}\endcsname}%
 %% THE FOLLOWING THREE LINES ARE FROM DAVID CARLISLE
   \protected at edef\tmp{\noexpand\scantokens{\def\noexpand\tmp%
@@ -256,7 +264,7 @@
   \if P#1%
     \redefine at primus%
     \get at argsC{#2}%
-    \protected at edef\primus at argi{\argi}%
+    \def at x\primus at argi{\argi}%
   \else%
   \fi%
   \setcounter{word at count}{0}%
@@ -263,16 +271,18 @@
   \redefine at secundus%
   \def\@thestring{}%
   \get at argsC{#2}%
-  \if P#1\protected at edef\argi{\primus at argi}\fi%
+  \if P#1\def at x\argi{\primus at argi}\fi%
   \whiledo{\value{word at count} < \narg}{%
     \addtocounter{word at count}{1}%
     \if F\csname found at word\romannumeral\value{word at count}\endcsname%
-      \title at word{\csname arg\romannumeral\value{word at count}\endcsname}%
-      \expandafter\protected at edef\csname%
+      \title at word{%
+        \csname arg\romannumeral\value{word at count}\endcsname}%
+      \expandafter\def at x\csname%
            arg\romannumeral\value{word at count}\endcsname{\@thestring}%
     \else%
-      \notitle at word{\csname arg\romannumeral\value{word at count}\endcsname}%
-      \expandafter\protected at edef\csname%
+      \notitle at word{%
+        \csname arg\romannumeral\value{word at count}\endcsname}%
+      \expandafter\def at x\csname%
            arg\romannumeral\value{word at count}\endcsname{\@thestring}%
     \fi%
   }%
@@ -280,9 +290,8 @@
   \setcounter{word at count}{0}%
   \whiledo{\value{word at count} < \narg}{%
     \addtocounter{word at count}{1}%
-    \ifthenelse{\value{word at count} = 1}%
-   {}{\add at space}%
-    \protected at edef\@thestring{\@thestring%
+    \ifnum\value{word at count} = 1\relax\else\add at space\fi%
+    \def at xxx\@thestring{\expandafter\expandafter\expandafter\@thestring%
       \csname arg\romannumeral\value{word at count}\endcsname}%
   }%
   \let~\SaveHardspace%
@@ -292,7 +301,7 @@
 
 \newcommand\notitle at word[1]{%
   \def\symbol at flag{F}%
-  \protected at edef\the at string{#1}%
+  \def at xx\the at string{#1}%
   \def\@thestring{}\def\make at cap{F}%
   \expandafter\eat at noTitleWord\the at string\string at end%
 }
@@ -304,41 +313,41 @@
 
 \newcommand\title at word[1]{%
   \def\symbol at flag{F}%
-  \protected at edef\the at string{#1}%
+  \def at xx\the at string{#1}%
   \def\@thestring{}\def\make at cap{T}%
   \expandafter\eat at TitleWord\the at string\string at end%
 }
 
+
 \def\eat at TitleWord{\IfNextToken\string at end%
   {\@gobble}%
   {\title at string{\eat at TitleWord}}%
 }
 
-\def\@symboli{\noexpand\`}
-\def\@symbolii{\noexpand\'}
-\def\@symboliii{\noexpand\^}
-\def\@symboliv{\noexpand\"}
-\def\@symbolv{\noexpand\~}
-\def\@symbolvi{\noexpand\=}
-\def\@symbolvii{\noexpand\.}
-\def\@symbolviii{\noexpand\u}
-\def\@symbolix{\noexpand\v}
-\def\@symbolx{\noexpand\H}
-\def\@symbolxi{\noexpand\t}
-\def\@symbolxii{\noexpand\c}
-\def\@symbolxiii{\noexpand\d}
-\def\@symbolxiv{\noexpand\b}
-\def\@symbolxv{\noexpand\r}
-\def\@symbolxvi{\noexpand\a}
-%
-\def\@symbolxvii{\ae}
- \def\uc at symbolxvii{\AE}
-\def\@symbolxviii{\o}
- \def\uc at symbolxviii{\O}
-\def\@symbolxix{\oe}
- \def\uc at symbolxix{\OE}
-\def\@symbolxx{\l}
- \def\uc at symbolxx{\L}
+\def\@symboli{\`}
+\def\@symbolii{\'}
+\def\@symboliii{\^}
+\def\@symboliv{\"}
+\def\@symbolv{\~}
+\def\@symbolvi{\=}
+\def\@symbolvii{\.}
+\def\@symbolviii{\u}
+\def\@symbolix{\v}
+\def\@symbolx{\H}
+\def\@symbolxi{\t}
+\def\@symbolxii{\c}
+\def\@symbolxiii{\d}
+\def\@symbolxiv{\b}
+\def\@symbolxv{\oe}
+ \def\uc at symbolxv{\OE}
+\def\@symbolxvi{\ae}
+ \def\uc at symbolxvi{\AE}
+\def\@symbolxvii{\o}
+ \def\uc at symbolxvii{\O}
+%\def\@symbolxviii{\aa}
+% \def\uc at symbolxviii{\AA}
+%\def\@symbolxix{\l}
+% \def\uc at symbolxix{\L}
 \newcounter{dia at count}
 
 \def\title at string#1#2{%
@@ -345,30 +354,30 @@
   \if T\make at cap%
     \setcounter{dia at count}{1}%
     \if F\symbol at flag%
-      \whiledo{\value{dia at count} < 21}{%
-        \ifthenelse{\equal{%
-           \csname @symbol\romannumeral\value{dia at count}\endcsname}{#2}}{%
+      \whiledo{\value{dia at count} < 18}{%
+        \expandafter\expandafter\expandafter\ifx
+           \csname @symbol\romannumeral\value{dia at count}\endcsname#2%
 %BEGIN IFDIACRIT
-          \ifthenelse{\value{dia at count} < 17}{%
-%IF = DIACRIT<17
-            \protected at edef\di at critic%
+          \ifnum\value{dia at count} < 15\relax%
+%IF = DIACRIT<15
+            \def at xx\di at critic%
               {\csname @symbol\romannumeral\value{dia at count}\endcsname}%
             \def\symbol at flag{D}%
             \setcounter{dia at count}{99}% INDICATING DICRIT JUST FOUND
-           }{%
+           \else%
 %IF = NATSYM
-            \protected at edef\di at critic%
+            \def at xx\di at critic%
               {\csname uc at symbol\romannumeral\value{dia at count}\endcsname}%
             \setcounter{dia at count}{90}% >19 AND <99 MEANS NON-DIACRIT SYMBOL
             \def\symbol at flag{N}%
-           }%
-         }{%
+           \fi%
+         \else
 %END IF = DIACRIT
 %IFNOT = DIACRIT
-          \addtocounter{dia at count}{1}}%
+          \addtocounter{dia at count}{1}\fi
       }% END WHILEDO
     \fi%
-    \ifthenelse{\value{dia at count} < 99}{%
+    \ifnum\value{dia at count} < 99\relax
       \if D\symbol at flag% FOR DIACRIT, ONCE ARGUMENT IS IN #2, TO BE CAPPED
         \def\next at char{\di at critic#2}%
         \def\symbol at flag{F}%
@@ -380,30 +389,33 @@
           \def\next at char{#2}%
         \fi%
       \fi%
-      \ifthenelse{\equal{\cmd at flag}{#2}}{\def\make at cap{T}}{%
-        \protected at edef\@thestring{\@thestring\uppercase{\next at char}}%
+      \expandafter\ifx\cmd at flag#2\relax\def\make at cap{T}\else%
+        \def at xx\@thestring{\expandafter\@thestring\expandafter
+          \uppercase\expandafter{\next at char}}%
         \def\make at cap{F}%
         \@checkfornewgroup{#2}%
-      }%
-    }{}%
+      \fi
+    \fi%
   \else% FOR CHARACTERS NOT TO BE CAPITALIZED
-    \ifthenelse{\equal{\cmd at flag}{#2}}{\def\make at cap{T}}{%
-      \protected at edef\@thestring{\@thestring#2}%
+    \expandafter\ifx\cmd at flag#2
+      \def\make at cap{T}%
+    \else
+      \def at x\@thestring{\@thestring#2}%
       \@checkfornewgroup{#2}%
-    }%
+    \fi
   \fi%
   #1}
 
 \def\@checkfornewgroup#1{%
-  \ifthenelse{\equal{-}{#1}}{\def\make at cap{T}}{%
-    \ifthenelse{\equal{(}{#1}}{\def\make at cap{T}}{%
-      \ifthenelse{\equal{[}{#1}}{\def\make at cap{T}}{%
-        \ifthenelse{\equal{\{}{#1}}{\def\make at cap{T}}{%
-          \ifthenelse{\equal{`}{#1}}{\def\make at cap{T}}{}%
-        }%
-      }%
-    }%
-  }%
+  \ifx-#1\def\make at cap{T}\else
+    \ifx(#1\def\make at cap{T}\else
+      \ifx[#1\def\make at cap{T}\else
+        \ifx\{#1\def\make at cap{T}\else
+          \ifx`#1\def\make at cap{T}\fi
+        \fi
+      \fi
+    \fi
+  \fi
 }
 
 %%%%%%%%%%%%%%%%%%
@@ -472,35 +484,35 @@
 % THE \makeatletter IS REQUIRED FOR PROCESSING FONTSIZE CHANGES
 \def\digest at sizes{%
 \make at lttr%
-\def\tiny{\unskip\noexpand\sz at tiny\SoftSpace}%
-\def\sz at tiny{\noexpand\sv at tiny}%
+\def\tiny{\unskip\sz at tiny\SoftSpace}%
+\def\sz at tiny{\sv at tiny}%
 %
-\def\scriptsize{\unskip\noexpand\sz at scriptsize\SoftSpace}%
-\def\sz at scriptsize{\noexpand\sv at scriptsize}%
+\def\scriptsize{\unskip\sz at scriptsize\SoftSpace}%
+\def\sz at scriptsize{\sv at scriptsize}%
 %
-\def\footnotesize{\unskip\noexpand\sz at footnotesize\SoftSpace}%
-\def\sz at footnotesize{\noexpand\sv at footnotesize}%
+\def\footnotesize{\unskip\sz at footnotesize\SoftSpace}%
+\def\sz at footnotesize{\sv at footnotesize}%
 %
-\def\small{\unskip\noexpand\sz at small\SoftSpace}%
-\def\sz at small{\noexpand\sv at small}%
+\def\small{\unskip\sz at small\SoftSpace}%
+\def\sz at small{\sv at small}%
 %
-\def\normalsize{\unskip\noexpand\sz at normalsize\SoftSpace}%
-\def\sz at normalsize{\noexpand\sv at normalsize}%
+\def\normalsize{\unskip\sz at normalsize\SoftSpace}%
+\def\sz at normalsize{\sv at normalsize}%
 %
-\def\large{\unskip\noexpand\sz at large\SoftSpace}%
-\def\sz at large{\noexpand\sv at large}%
+\def\large{\unskip\sz at large\SoftSpace}%
+\def\sz at large{\sv at large}%
 %
-\def\Large{\unskip\noexpand\sz at Large\SoftSpace}%
-\def\sz at Large{\noexpand\sv at Large}%
+\def\Large{\unskip\sz at Large\SoftSpace}%
+\def\sz at Large{\sv at Large}%
 %
-\def\LARGE{\unskip\noexpand\sz at LARGE\SoftSpace}%
-\def\sz at LARGE{\noexpand\sv at LARGE}%
+\def\LARGE{\unskip\sz at LARGE\SoftSpace}%
+\def\sz at LARGE{\sv at LARGE}%
 %
-\def\huge{\unskip\noexpand\sz at huge\SoftSpace}%
-\def\sz at huge{\noexpand\sv at huge}%
+\def\huge{\unskip\sz at huge\SoftSpace}%
+\def\sz at huge{\sv at huge}%
 %
-\def\Huge{\unskip\noexpand\sz at Huge\SoftSpace}%
-\def\sz at Huge{\noexpand\sv at Huge}%
+\def\Huge{\unskip\sz at Huge\SoftSpace}%
+\def\sz at Huge{\sv at Huge}%
 }
 
 \endinput



More information about the tex-live-commits mailing list.