diff options
author | Karl Berry <karl@freefriends.org> | 2018-08-24 22:16:00 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-08-24 22:16:00 +0000 |
commit | cdc6f5359e9f84b2097c2bc46c0de4715384a8bd (patch) | |
tree | f654b38109b74385cc95d90e76e2686d43b215f8 /Master/texmf-dist/tex/latex | |
parent | 4ab5ba5a0b4e4fdc17bcf57555f50525a5ac4d0a (diff) |
textualicomma (24aug18)
git-svn-id: svn://tug.org/texlive/trunk@48474 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/textualicomma/textualicomma.sty | 66 |
1 files changed, 48 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/textualicomma/textualicomma.sty b/Master/texmf-dist/tex/latex/textualicomma/textualicomma.sty index 91afc703dd3..71efd3feb5a 100644 --- a/Master/texmf-dist/tex/latex/textualicomma/textualicomma.sty +++ b/Master/texmf-dist/tex/latex/textualicomma/textualicomma.sty @@ -7,7 +7,7 @@ %% textualicomma.dtx (with options: `package') %% %% textualicomma.dtx -%% Copyright 2017 Sebastian Friedl +%% Copyright 2017-18 Sebastian Friedl %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -17,11 +17,12 @@ %% and version 1.3c or later is part of all distributions of LaTeX %% version 2008/05/04 or later. %% -%% This work has the LPPL maintenance status `maintained'. +%% This work has the LPPL maintenance status 'maintained'. %% Current maintainer of the work is Sebastian Friedl %% -%% This work consists of the files textualicomma.dtx and -%% textualicomma.ins and the derived file textualicomma.sty +%% This work consists of the files textualicomma.dtx, +%% textualicomma.ins and textualicomma-doc.dtx, +%% as well as the derived file textualicomma.sty %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -38,20 +39,49 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{textualicomma}[2017/12/03 textualicomma package] -\def\mathtxtcmmaffamily{\rmfamily} -\newif\if@mathtxtcmmasffamily -\@mathtxtcmmasffamilyfalse -\DeclareOption{sffamily}{\@mathtxtcmmasffamilytrue} -\newif\if@mathtxtcmmattfamily -\@mathtxtcmmattfamilyfalse -\DeclareOption{ttfamily}{\@mathtxtcmmattfamilytrue} +\ProvidesPackage{textualicomma}% + [2018/08/23 v1.1 Use textual comma characters as decimal separators] +\NeedsTeXFormat{LaTeX2e} +\RequirePackage{amstext} +\AtBeginDocument{% + \ifx\rmfamily\@undefined% + \PackageError{textualicomma}% + {\noexpand\rmfamily is undefined. textualicomma doesn't work}% + {textualicomma requires the \noexpand\rmfamily command to be + defined; otherwise, this package won't work properly}% + \PackageWarning{textualicomma}{Emergency stop}% + \stop% + \fi% + \ifx\sffamily\@undefined% + \PackageError{textualicomma}% + {\noexpand\sffamily is undefined. textualicomma doesn't work}% + {textualicomma requires the \noexpand\sffamily command to be + defined; otherwise, this package won't work properly}% + \PackageWarning{textualicomma}{Emergency stop}% + \stop% + \fi% + \ifx\ttfamily\@undefined% + \PackageError{textualicomma}% + {\noexpand\ttfamily is undefined. textualicomma doesn't work}% + {textualicomma requires the \noexpand\ttfamily command to be + defined; otherwise, this package won't work properly}% + \PackageWarning{textualicomma}{Emergency stop}% + \stop% + \fi% +} +\newif\if@txticmma@sffamily +\@txticmma@sffamilyfalse +\DeclareOption{sffamily}{\@txticmma@sffamilytrue} +\newif\if@txticmma@ttfamily +\@txticmma@ttfamilyfalse +\DeclareOption{ttfamily}{\@txticmma@ttfamilytrue} \ProcessOptions -\if@mathtxtcmmasffamily\def\mathtxtcmmaffamily{\sffamily}\fi -\if@mathtxtcmmattfamily\def\mathtxtcmmaffamily{\ttfamily}\fi -\def\textualicommafont#1{\def\mathtxtcmmaffamily{#1}} +\def\txticmma@ffamily{\rmfamily} +\if@txticmma@sffamily\def\txticmma@ffamily{\sffamily}\fi +\if@txticmma@ttfamily\def\txticmma@ffamily{\ttfamily}\fi +\def\textualicommafont#1{\def\txticmma@ffamily{#1}} \AtBeginDocument{% - \def\mathtextcomma{\text{\mathtxtcmmaffamily,}} + \def\m@thtextcomma{\text{\txticmma@ffamily,}} \mathchardef\mathcomma\mathcode`\,% \mathcode`\,="8000 % } @@ -59,9 +89,9 @@ \gdef,{\futurelet\@let@token\sm@rtcomma} } \def\sm@rtcomma{% - \ifx\@let@token\@sptoken\mathtextcomma\protect\,\else + \ifx\@let@token\@sptoken\m@thtextcomma\protect\,\else \ifx\@let@token\space \else - \mathtextcomma\fi\fi} + \m@thtextcomma\fi\fi} \DeclareMathSymbol{.}{\mathalpha}{operators}{`.} \endinput %% |