texlive[48474] Master/texmf-dist: textualicomma (24aug18)

commits+karl at tug.org commits+karl at tug.org
Sat Aug 25 00:16:00 CEST 2018


Revision: 48474
          http://tug.org/svn/texlive?view=revision&revision=48474
Author:   karl
Date:     2018-08-25 00:16:00 +0200 (Sat, 25 Aug 2018)
Log Message:
-----------
textualicomma (24aug18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/textualicomma/README.md
    trunk/Master/texmf-dist/source/latex/textualicomma/textualicomma.dtx
    trunk/Master/texmf-dist/source/latex/textualicomma/textualicomma.ins
    trunk/Master/texmf-dist/tex/latex/textualicomma/textualicomma.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/textualicomma/textualicomma-doc.pdf
    trunk/Master/texmf-dist/source/latex/textualicomma/textualicomma-doc.dtx

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/textualicomma/textualicomma.pdf

Modified: trunk/Master/texmf-dist/doc/latex/textualicomma/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/textualicomma/README.md	2018-08-24 00:23:42 UTC (rev 48473)
+++ trunk/Master/texmf-dist/doc/latex/textualicomma/README.md	2018-08-24 22:16:00 UTC (rev 48474)
@@ -1,20 +1,32 @@
 # textualicomma
-A solution for using the textual comma character as decimal separator in math mode.  
+Use the textual comma character as decimal separator in math mode.  
 
-**`textualicomma` is based on the `icomma` package and intended as a solution for situations where the text comma character discerns from the math comma character**, e. g. when fonts whithout math support are involved.  
-Escaping to text mode every time a comma is used in math mode may slow down the compilation process.  
-Please check, whether `icomma` already satisfies your needs.  
+**`textualicomma` is based on the [`icomma`](https://ctan.org/pkg/icomma) package and intended as a solution for situations where the text comma character discerns from the math comma character**, e. g. when fonts whithout math support are involved.  
+Escaping to text mode every time a comma is used in math mode might slow down the compilation of huge documents.  
+Please check, whether [`icomma`](https://ctan.org/pkg/icomma) already satisfies your needs.  
 
-You can obtain the package files by running LaTeX over the file `textualicomma.ins`:
 
-    latex textualicomma.ins
 
-For compiling the documentation, run **LuaLaTeX** twice over the docstrip source file `textualicomma.dtx`:
+### Installation
+Extract the *package* file first:
 
-    lualatex textualicomma.dtx
-    lualatex textualicomma.dty
+  1. Run LaTeX over the file `textualicomma.ins`
+  2. Move the resulting `.sty` file to `TEXMF/tex/latex/textualicomma/`
 
+Then, you can compile the *documentation* yourself by executing
 
+    lualatex textualicomma-doc.dtx
+    makeindex -s gind.ist textualicomma-doc.idx
+    makeindex -s gglo.ist -o textualicomma-doc.gls textualicomma-doc.glo
+    lualatex textualicomma-doc.dtx
+    lualatex textualicomma-doc.dtx
+    
+
+or just use the precompiled documentation shipped with the source files.  
+In both cases, copy the files `textualicomma-doc.pdf` and `README.md` to `TEXMF/doc/latex/textualicomma/`.
+
+
+
 ### License
-This work, consisting of the files `textualicomma.dtx`, `textualicomma.ins` and the derived file `textualicomma.sty`, is licensed under the LPPL, Version 1.3c (or, at your option, any later version)  
+This work, consisting of the files `textualicomma.dtx`, `textualicomma.ins`, `textualicomma-doc.dtx` and the derived file `textualicomma.sty`, is licensed under the LPPL, Version 1.3c (or, at your option, any later version)  
 Current maintainer of the work is Sebastian Friedl.

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

Index: trunk/Master/texmf-dist/doc/latex/textualicomma/textualicomma-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/textualicomma/textualicomma-doc.pdf	2018-08-24 00:23:42 UTC (rev 48473)
+++ trunk/Master/texmf-dist/doc/latex/textualicomma/textualicomma-doc.pdf	2018-08-24 22:16:00 UTC (rev 48474)

Property changes on: trunk/Master/texmf-dist/doc/latex/textualicomma/textualicomma-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/latex/textualicomma/textualicomma.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/source/latex/textualicomma/textualicomma-doc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/textualicomma/textualicomma-doc.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/textualicomma/textualicomma-doc.dtx	2018-08-24 22:16:00 UTC (rev 48474)
@@ -0,0 +1,260 @@
+%\iffalse
+%%  Doc-Source file to use with LaTeX2e
+%%  Copyright (C) 2017-18 Sebastian Friedl
+%%
+%%  This work is subject to the LaTeX Project Public License, Version 1.3c or -- at
+%%  your option -- any later version of this license.
+%%  The work consists of the files textualicomma.dtx, textualicomma.ins,
+%%  textualicomma-doc.dtx and the derived file textualicomma.sty
+%%
+%%  This work has the LPPL maintenance status ‘maintained’.
+%%  Current maintainer of the work is Sebastian Friedl.
+%%
+%%  -------------------------------------------------------------------------------------------
+%%
+%%  Use the textual comma character as decimal separator in math mode
+%%
+%%  -------------------------------------------------------------------------------------------
+%%
+%%  Please report bugs and other problems as well as suggestions for improvements
+%%  to my email address (sfr682k at t-online.de).
+%%
+%%  -------------------------------------------------------------------------------------------
+%\fi
+
+% !TeX spellcheck=en_US
+
+\documentclass[11pt]{ltxdoc}
+
+\usepackage{iftex}
+\RequireLuaTeX
+
+\usepackage[no-math]{fontspec}
+\usepackage{polyglossia}
+\setdefaultlanguage{english}
+\usepackage[english]{selnolig}
+
+
+
+\usepackage{csquotes}
+\usepackage{graphicx}
+\usepackage{hologo}
+\usepackage{multicol}
+
+\usepackage{verbatim}
+
+
+\usepackage[a4paper,left=4.50cm,right=2.75cm,top=3.25cm,bottom=2.75cm,nohead]{geometry}
+
+
+\usepackage[unicode, pdfborder={0 0 0}, linktoc=all, hyperindex=false]{hyperref}
+
+
+\usepackage[erewhon,vvarbb]{newtxmath}
+\setmainfont{Source Serif Pro}
+\setsansfont[Scale=MatchLowercase]{Source Sans Pro}
+\setmonofont[Scale=MatchLowercase]{Hack}
+
+
+
+\newcommand*{\cls}[1]{\textsf{#1}}
+\newcommand*{\sty}[1]{\textsf{#1}}
+\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}~~option|main}}
+
+\def\DescribeOption#1{\marginpar{\raggedleft\PrintDescribeMacro{#1}}}
+
+\renewcommand*{\usage}[1]{\hyperpage{#1}}
+\renewcommand*{\main}[1]{\hyperpage{#1}}
+
+\PageIndex
+\RecordChanges
+
+\parindent0pt
+
+\MakeShortVerb{"}
+\CheckSum{101}
+
+
+\title{The \sty{textualicomma} package \\ {\large\url{https://gitlab.com/SFr682k/textualicomma}}}
+\author{Sebastian Friedl \\ \href{mailto:sfr682k at t-online.de}{\ttfamily sfr682k at t-online.de}}
+\date{2018/08/23 (v1.1)}
+
+\hypersetup{pdftitle={The textualicomma package}, pdfauthor={Sebastian Friedl}}
+
+
+\begin{document}
+    \maketitle
+    
+    \begin{abstract}\noindent
+        Use the textual comma character as decimal separator in math mode. \\[\medskipamount]
+        \sty{textualicomma} is based on the \href{https://www.ctan.org/pkg/icomma}{\sty{icomma} package}
+        and intended as a solution for cases where the comma character used in horizontal (i.e.~text) mode
+        discerns from the one used in math mode. \\
+        Note: Escaping to text mode every time a comma is used in math mode might slow down the compilation of huge documents.
+        Please check, whether \href{https://www.ctan.org/pkg/icomma}{\sty{icomma}} already satisfies your needs.
+    \end{abstract}
+
+
+    \tableofcontents
+    
+    
+    
+    \clearpage
+    \subsection*{Dependencies and other requirements}
+    \addcontentsline{toc}{subsection}{Dependencies and other requirements}
+    \sty{textualicomma} requires \LaTeXe\ and depends on the \sty{amstext} package. \\
+    Also, the three NFSS commands "\rmfamily", "\sffamily" and "\ttfamily" have to be defined
+    (which holds true for every common document class).
+    
+    
+    
+    \subsection*{Installation}
+    \addcontentsline{toc}{subsection}{Installation}
+    Extract the \textit{package} file first:
+    \begin{enumerate}
+        \item Run \LaTeX\ over the file "textualicomma.ins"
+        \item Move the resulting ".sty" file to "TEXMF/tex/latex/textualicomma/"
+    \end{enumerate}
+    
+    Then, you can compile the \textit{documentation} yourself by executing \\[\smallskipamount]
+    "lualatex textualicomma-doc.dtx" \\
+    "makeindex -s gind.ist textualicomma-doc.idx" \\
+    "makeindex -s gglo.ist -o textualicomma-doc.gls textualicomma-doc.glo" \\
+    "lualatex textualicomma-doc.dtx" \\
+    "lualatex textualicomma-doc.dtx"
+    
+    \smallskip
+    or just use the precompiled documentation shipped with the source files. \\
+    In both cases, copy the files "textualicomma-doc.pdf" and "README.md" to \\
+    "TEXMF/doc/latex/textualicomma/"
+    
+    
+    
+    \subsection*{License}
+    \addcontentsline{toc}{subsection}{License}
+    \begin{small}
+        \textcopyright\ 2017-18 Sebastian Friedl
+        
+        \smallskip
+        This work may be distributed and/or modified under the conditions of the \LaTeX\ Project Public License, either version 1.3c of this license or (at your option) any later version.
+        
+        \smallskip
+        The latest version of this license is available at \url{http://www.latex-project.org/lppl.txt} and version 1.3c or later is part of all distributions of \LaTeX\ version 2008-05-04 or later.
+        
+        \smallskip
+        This work has the LPPL maintenace status \enquote*{maintained}. \\
+        Current maintainer of this work is Sebastian Friedl.
+        
+        \medskip
+        This work consists of the following files:
+        \begin{itemize} \itemsep 0pt
+            \item "textualicomma.sty",
+            \item "textualicomma.ins",
+            \item "textualicomma-doc.dtx" and
+            \item the derived file "textualicomma.sty"
+        \end{itemize}
+    \end{small}
+
+    
+    
+
+
+
+
+    \clearpage
+    \part{The documentation}
+    \section{Introduction}
+    Using the comma as decimal separator in ordinary \LaTeX\ has always been proble\-matic: since the comma is treated as punctuation,\TeX\ adds some space after it. \\
+    The solution was defining an \enquote*{intelligent} comma recognizing whether it's used as decimal separator or punctuation character.
+    
+    \medskip
+    The common package implementing this solution is \sty{icomma} by Walter Schmidt~\cite{icomma}.
+    However, some fonts, e.g. Source Serif Pro, don't provide any math support. \\
+    Although there are fonts looking very similar to Source Serif and providing math support (like Utopia and its ‘clones’ Fourier and Erewhon), more or less obvious differences are visible (compare \enquote*{$,$} to~\enquote*{,} at high magnifications). The only solution solving this \enquote*{problem} is escaping to text mode.
+    
+    
+    
+    \section{The \sty{textualicomma} package}
+    \subsection{\sty{textualicomma}'s behaviour}
+    \sty{textualicomma} makes some changes and additions to \sty{icomma}'s code in order to provide automated escaping to text mode.
+    The behaviour remains the same:
+    \begin{itemize}
+        \item
+            The comma is treated as decimal separator if it is directly followed by a number.
+            Thus, a number is to be entered as, for instance, \\
+            "3,142"
+        \item
+            whereas mathematical expressions like $(x\text{,}\,y)$ are to be written with a space after the comma: \\
+            \verb*|(x, y)|
+    \end{itemize}
+
+    Also, the period is redefined so that it adapts to the used font.
+    This feature might be useful with \LaTeX\ \cls{beamer}'s sans-serif math.
+    
+    
+    \subsection{Package options}
+    By default, the font used for typesetting the comma is the current roman text font. This behavior can be modified by using package options:
+    
+    \medskip\leavevmode%
+    \DescribeOption{sffamily}%
+    Passing the \opt{sffamily} option to \sty{textualicomma} results in the comma character being taken from the current sans serif text font
+    
+    \medskip\leavevmode%
+    \DescribeOption{ttfamily}%
+    Passing the \opt{ttfamily} option to \sty{textualicomma} results in the comma character being taken from the current mono-spaced text font
+    
+    
+    \bigskip
+    \DescribeMacro{\textualicommafont}
+    Both options change the used font family \textit{for the whole document}.
+    Changes \emph{inside} the document can be made using the "\textualicommafont" command: \\[\smallskipamount]
+    "\textualicommafont{\rmfamily}" \qquad\rightarrow~~ roman comma in math mode \\
+    "\textualicommafont{\sffamily}" \qquad\rightarrow~~ sans-serif comma in math mode \\
+    "\textualicommafont{\ttfamily}" \qquad\rightarrow~~ monospaced comma in math mode
+    
+    
+    
+    \section{Bugs and problems}
+    Generally, since the comma is made ‘active’, problems are not unlikely.
+    
+    \medskip
+    For example, when using the ‘intelligent comma’ together with the \sty{dcolumn} package, a comma to be \textit{printed} as the decimal separator in a column of type "D" is to be specified as "{\mathord\mathcomma}", rather than "{,}", since the latter leads to an error. For example:
+    \begin{center}
+        \verb|\begin{tabular}{... D{,}{\mathord\mathcomma}{2} ...}|
+    \end{center}
+
+    Note that specifying the comma as the related input character works as usual.
+    
+    
+    
+    \phantomsection
+    \addcontentsline{toc}{section}{References}
+    \begin{thebibliography}{1}
+        \bibitem{icomma}
+        Walter Schmidt.
+        The \sty{icomma} package for \LaTeXe.
+        Package and Documentation available on CTAN (\url{https://www.ctan.org/pkg/icomma})
+    \end{thebibliography}
+    
+    
+    
+    
+    
+    % Start determining the checksum from here
+    \StopEventually{%
+        \clearpage
+        \PrintChanges
+        \setcounter{IndexColumns}{2}
+        \phantomsection
+        \addcontentsline{toc}{part}{Index}%
+        \IndexPrologue{\section*{Index}}
+        \PrintIndex}
+    
+    \clearpage
+    \part{The package code}
+    \CodelineNumbered
+    \DocInput{textualicomma.dtx}
+    
+    
+    \Finale
+\end{document}
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/source/latex/textualicomma/textualicomma-doc.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/textualicomma/textualicomma.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/textualicomma/textualicomma.dtx	2018-08-24 00:23:42 UTC (rev 48473)
+++ trunk/Master/texmf-dist/source/latex/textualicomma/textualicomma.dtx	2018-08-24 22:16:00 UTC (rev 48474)
@@ -19,239 +19,149 @@
 %\fi
 % \iffalse
 % Doc-Source file to use with LaTeX2e
-% Copyright (C) 2017 Sebastian Friedl
-% This work is subject to the LaTeX Project Public License, Version 1.3c or -- at your option -- any later version of this license.
-% The work consists of the files textualicomma.ins and textualicomma.dtx
-% as well as the derived file textualicomma.sty
-% \fi
-% \iffalse
-%<*driver>
-\documentclass[11pt]{ltxdoc}
-
-\usepackage{alltt}
-\usepackage{csquotes}
-\usepackage{graphicx}
-\usepackage{hologo}
-\usepackage{multicol}
-\usepackage{hyperref}
-	\hypersetup{pdftitle={The textualicomma package}, pdfauthor={Sebastian Friedl}}
-\usepackage{verbatim}
-
-\usepackage[no-math]{fontspec}
-\usepackage[erewhon,vvarbb]{newtxmath}
-\setmainfont[Numbers=OldStyle]{Source Serif Pro}[ItalicFont={Erewhon-Italic}, BoldItalicFont={Erewhon-BoldItalic}]
-\setsansfont[Numbers=OldStyle,Scale=MatchLowercase]{Source Sans Pro}
-\setmonofont[Numbers=OldStyle,Scale=MatchLowercase]{Source Code Pro}
-
-\usepackage{polyglossia}
-\setdefaultlanguage{english}
-\usepackage[english]{selnolig}
-
-
-\usepackage[left=4.50cm,right=2.75cm,top=3.25cm,bottom=2.75cm,nohead]{geometry}
-
-\parindent0pt
-
-
-
-\CodelineNumbered
-
-\begin{document}
-\DocInput{textualicomma.dtx}
-\end{document}
-%</driver>
-% \fi
+% Copyright (C) 2017-18 Sebastian Friedl
 %
-% \MakeShortVerb{"}
+% This work is subject to the LaTeX Project Public License, Version 1.3c or -- at
+% your option -- any later version of this license.
+% The work consists of the files textualicomma.dtx, textualicomma.ins,
+% textualicomma-doc.dtx and the derived file textualicomma.sty
 %
-% \title{The \texttt{textualicomma} package \\ {\large\url{https://github.com/SFr682k/textualicomma}}}
-% \author{Sebastian Friedl \\ \href{mailto:sfr682k at t-online.de}{\ttfamily sfr682k at t-online.de}}
-% \date{2017/12/03}
-% \maketitle
+% This work has the LPPL maintenance status 'maintained'.
+% Current maintainer of the work is Sebastian Friedl.
+% \fi
 %
-% \begin{abstract}\noindent
-%	A solution for using the textual comma character as decimal separator in math mode. \\[\medskipamount]
-%	\textbf{\texttt{textualicomma} is based on the \href{https://www.ctan.org/pkg/icomma}{\texttt{icomma} package} and intended as a solution for situations where the text comma character discerns from the math comma character.} Escaping to text mode every time a comma is used in math mode may slow down the compilation process. \\
-%	Please check, whether \href{https://www.ctan.org/pkg/icomma}{\texttt{icomma}} already satisfies your needs.
-% \end{abstract}
 %
 %
-% \subsection*{Obtaining the package and documentation file}
-% \begin{small}
-% 	You can obtain the package files by running \LaTeX\ over the file "textualicomma.ins": \\
-% 	"    latex textualicomma.ins"
+% \changes{1.0}{2017/12/03}{Initial release}
+% \changes{1.1}{2018/08/23}{Take care of dependencies and requirements}
 %
-% 	\medskip
-% 	For compiling the documentation, run \textbf{\hologo{LuaLaTeX}}~(!) twice over "textualicomma.dtx": \\
-% 	"    lualatex textualicomma.dtx" \\
-% 	"    lualatex textualicomma.dtx" \\
-% 	Please verify that all dependencies are fulfilled \emph{before} compiling.
-% \end{small}
 %
-% \subsection*{License}
-% \begin{small}
-% 	\addcontentsline{toc}{subsection}{License}
-% 	\textcopyright\ 2017 Sebastian Friedl
-% 	
-% 	\smallskip
-% 	This work may be distributed and/or modified under the conditions of the \LaTeX\ Project Public License, either version 1.3c of this license or (at your option) any later version.
-% 	
-% 	\smallskip
-% 	The latest version of this license is available at \url{http://www.latex-project.org/lppl.txt} and version 1.3c or later is part of all distributions of \LaTeX\ version 2008-05-04 or later.
-% 	
-% 	\smallskip
-% 	This work has the LPPL maintenance status \enquote*{maintained}. The current maintainer of this work is Sebastian Friedl. \\
-% 	This work consists of the files "textualicomma.dtx" and "textualicomma.ins" and the derived file "textualicomma.sty".
-% \end{small}
-% 
-% 
-% \subsection*{Call for cooperation}
-% \begin{small}
-% 	\addcontentsline{toc}{subsection}{Call for cooperation}
-% 	Please report bugs and other problems as well as suggestions for improvements by using the \href{https://github.com/SFr682k/textualicomma/issues}{issue tracker on GitHub} or sending an email to \href{mailto:sfr682k at t-online.de}{\texttt{sfr682k at t-online.de}}.
-% \end{small}
+% \subsubsection*{Initialization}
+%    \begin{macrocode}
+\ProvidesPackage{textualicomma}%
+    [2018/08/23 v1.1 Use textual comma characters as decimal separators]
+\NeedsTeXFormat{LaTeX2e}
+%    \end{macrocode}
 %
 %
 %
-%
-% \clearpage
-% \part{The documentation}
-% \section{Introduction}
-% Using the comma as decimal separator in ordinary \LaTeX\ has always been proble\-matic, since the comma is treated as a punctuation character and \LaTeX\ adds some space after it. \\
-% The solution was defining an ‘intelligent’ comma ‘recognizing’ whether it is used as decimal separator or punctuation character.
-%
-% \medskip
-% The common solution to this problem is the \texttt{icomma} package by Walter Schmidt \cite{icomma}. \\
-% However, some fonts, e.~g. Source Serif Pro, don't provide any math support. Although there are fonts looking very similar to Source Serif and providing math support (like Utopia and its ‘clones’ Fourier and Erewhon), more or less obvious differences are visible (compare ‘$,$’ to~‘,’). The only solution solving this ‘problem’ is escaping to text mode.
-%
-% \section{The \texttt{textualicomma} package}
-% \subsection{\texttt{textualicomma}'s behaviour}
-% \texttt{textualicomma} makes some changes and additions to \texttt{icomma}'s code in order to provide automated escaping to text mode. The behaviour remains the same:
-% \begin{itemize}
-%     \item The comma is treated as decimal separator if it is directly followed by a number. Thus, a number is to be entered as, for instance, \\
-%           "3,142"
-%     \item whereas mathematical expressions like $(x\text{,}\,y)$ are to be written with a space after the comma: \\
-%           \verb*|(x, y)|
-% \end{itemize}
-%
-% Also, the period is redefined so that it adapts to the used font.
-%
-%
-% \subsection{Package options}
-% By default, the font used for typesetting the comma is the roman text font. This behaviour can be modified by using package options:
-% 
-% \medskip
-% \DescribeMacro{sffamily}
-% Passing the "sffamily" option to "textualicomma" results in the comma being printed using the loaded sans serif font
-%
-% \medskip
-% \DescribeMacro{ttfamily}
-% Passing the "ttfamily" option to "textualicomma" results in the comma being printed using the loaded typewriter font
-%
 % \bigskip
-% \DescribeMacro{\textualicommafont}
-% Both options change the used font \emph{for the whole document}. Changes inside a document can be made using the "\textualicommafont" command: \\
-% "\textualicommafont{\rmfamily}" \\
-% "\textualicommafont{\sffamily}" \\
-% "\textualicommafont{\ttfamily}" \\
-%
-%
-%
-% \section{Bugs and problems}
-% Generally, since the comma is made ‘active’, problems are not unlikely.
-%
-% \medskip
-% For example, when using the ‘intelligent comma’ together with the \texttt{dcolumn} package, a comma to be \textit{printed} as the decimal separator in a column of type "D" is to be specified as "{\mathord\mathcomma}", rather than "{,}", since the latter leads to an error. For instance:
-%
-% \begin{center}
-%     \verb|\begin{tabular}{... D{,}{\mathord\mathcomma}{2} ...}|
-% \end{center}
-%
-% Note that specifying the comma as the related input character works as usual.
-%
-%
-%
-% \begin{thebibliography}{1}
-%    \bibitem{icomma}
-%        Walter Schmidt.
-%        The \texttt{icomma} package for \LaTeXe.
-%        Package and Documentation available on CTAN (\href{https://www.ctan.org/pkg/icomma}{\ttfamily https://www.ctan.org/pkg/icomma})
-% \end{thebibliography}
-%
-%
-%
-% \clearpage
-% \part{The package code}
-%
+% \subsubsection*{Load dependencies and check requirements}
+% Load the \sty{amstext} package to enable escaping to horizontal mode:
 %    \begin{macrocode}
-\ProvidesPackage{textualicomma}[2017/12/03 textualicomma package]
+\RequirePackage{amstext}
 %    \end{macrocode}
 %
-% Use the roman text font family by default
+% Check whether "\rmfamily", "\sffamily" and "\ttfamily" are available:
 %    \begin{macrocode}
-\def\mathtxtcmmaffamily{\rmfamily}
+\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%
+}
 %    \end{macrocode}
 %
-% Provide an option for switching to the sans serif font
+%
+%
+% \subsubsection*{Package options}
+% Provide a \opt{sffamily} option for using the sans serif font:
 %    \begin{macrocode}
-\newif\if at mathtxtcmmasffamily
-\@mathtxtcmmasffamilyfalse
-\DeclareOption{sffamily}{\@mathtxtcmmasffamilytrue}
+\newif\if at txticmma@sffamily
+\@txticmma at sffamilyfalse
+\DeclareOption{sffamily}{\@txticmma at sffamilytrue}
 %    \end{macrocode}
 %
-% Provide an option for switching to the typewriter font
+% Provide a \opt{ttfamily} option for using the typewriter font:
 %    \begin{macrocode}
-\newif\if at mathtxtcmmattfamily
-\@mathtxtcmmattfamilyfalse
-\DeclareOption{ttfamily}{\@mathtxtcmmattfamilytrue}
+\newif\if at txticmma@ttfamily
+\@txticmma at ttfamilyfalse
+\DeclareOption{ttfamily}{\@txticmma at ttfamilytrue}
 %    \end{macrocode}
 %
-% Process all defined options
+% Process all options passed to \sty{textualicomma}:
 %    \begin{macrocode}
 \ProcessOptions
 %    \end{macrocode}
 %
-% If one of the "sffamily" or "ttfamily" options has been used, changes are applied
+%
+%
+% \subsubsection*{Configuration}
+% Use the roman text font family by default:
 %    \begin{macrocode}
-\if at mathtxtcmmasffamily\def\mathtxtcmmaffamily{\sffamily}\fi
-\if at mathtxtcmmattfamily\def\mathtxtcmmaffamily{\ttfamily}\fi
+\def\txticmma at ffamily{\rmfamily}
 %    \end{macrocode}
 %
-% Provide an command for switching the font inside the document
+% If one of the \opt{sffamily} or \opt{ttfamily} options has been used, changes are applied:
 %    \begin{macrocode}
-\def\textualicommafont#1{\def\mathtxtcmmaffamily{#1}}
+\if at txticmma@sffamily\def\txticmma at ffamily{\sffamily}\fi
+\if at txticmma@ttfamily\def\txticmma at ffamily{\ttfamily}\fi
 %    \end{macrocode}
 %
-% We define the comma character at the beginning of the document.
+% \begin{macro}{\textualicommafont}
+% Provide a command for switching the font family inside the document:
 %    \begin{macrocode}
-\AtBeginDocument{%
-  \def\mathtextcomma{\text{\mathtxtcmmaffamily,}}
+\def\textualicommafont#1{\def\txticmma at ffamily{#1}}
 %    \end{macrocode}
+% \end{macro}
 %
-% I don't know what the following lines are exactly doing, but they can't be removed; probably, because they are making the comma ‘active’
+%
+%
+% \subsubsection*{Defining the \enquote{textual intelligent comma}}
+% At the very beginning, provide access to the textual comma character.
+% Also, define a math character referring to the comma contained in the math font,
+% to be used in enumerations:
 %    \begin{macrocode}
+\AtBeginDocument{%
+  \def\m at thtextcomma{\text{\txticmma at ffamily,}}
   \mathchardef\mathcomma\mathcode`\,%
   \mathcode`\,="8000 %
 }
+%    \end{macrocode}
+%
+% Make the comma character active and map it to the \enquote*{smart comma}:
+%    \begin{macrocode}
 {\catcode`,=\active
   \gdef,{\futurelet\@let at token\sm at rtcomma}
 }
 %    \end{macrocode}
 %
-% Define the ‘smart comma’
+% Last but not least, define the \enquote*{smart comma} \dots
 %    \begin{macrocode}
 \def\sm at rtcomma{%
-  \ifx\@let at token\@sptoken\mathtextcomma\protect\,\else
+  \ifx\@let at token\@sptoken\m at thtextcomma\protect\,\else
   \ifx\@let at token\space \else
-    \mathtextcomma\fi\fi}
+    \m at thtextcomma\fi\fi}
 %    \end{macrocode}
 %
-% Allow changing of the period's font.
+% \dots\ and allow changing the period's font:
 %    \begin{macrocode}
 \DeclareMathSymbol{.}{\mathalpha}{operators}{`.}
 %    \end{macrocode}
 %
-% \Finale
+%
+%
+% \subsubsection*{Famous last words}
 % That's enough code. "\endinput".
 %    \begin{macrocode}
 \endinput

Modified: trunk/Master/texmf-dist/source/latex/textualicomma/textualicomma.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/textualicomma/textualicomma.ins	2018-08-24 00:23:42 UTC (rev 48473)
+++ trunk/Master/texmf-dist/source/latex/textualicomma/textualicomma.ins	2018-08-24 22:16:00 UTC (rev 48474)
@@ -5,7 +5,7 @@
 \preamble
 
  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
@@ -15,11 +15,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
 
 \endpreamble
 

Modified: trunk/Master/texmf-dist/tex/latex/textualicomma/textualicomma.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/textualicomma/textualicomma.sty	2018-08-24 00:23:42 UTC (rev 48473)
+++ trunk/Master/texmf-dist/tex/latex/textualicomma/textualicomma.sty	2018-08-24 22:16:00 UTC (rev 48474)
@@ -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 at mathtxtcmmasffamily
-\@mathtxtcmmasffamilyfalse
-\DeclareOption{sffamily}{\@mathtxtcmmasffamilytrue}
-\newif\if at 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 at txticmma@sffamily
+\@txticmma at sffamilyfalse
+\DeclareOption{sffamily}{\@txticmma at sffamilytrue}
+\newif\if at txticmma@ttfamily
+\@txticmma at ttfamilyfalse
+\DeclareOption{ttfamily}{\@txticmma at ttfamilytrue}
 \ProcessOptions
-\if at mathtxtcmmasffamily\def\mathtxtcmmaffamily{\sffamily}\fi
-\if at mathtxtcmmattfamily\def\mathtxtcmmaffamily{\ttfamily}\fi
-\def\textualicommafont#1{\def\mathtxtcmmaffamily{#1}}
+\def\txticmma at ffamily{\rmfamily}
+\if at txticmma@sffamily\def\txticmma at ffamily{\sffamily}\fi
+\if at txticmma@ttfamily\def\txticmma at ffamily{\ttfamily}\fi
+\def\textualicommafont#1{\def\txticmma at ffamily{#1}}
 \AtBeginDocument{%
-  \def\mathtextcomma{\text{\mathtxtcmmaffamily,}}
+  \def\m at thtextcomma{\text{\txticmma at ffamily,}}
   \mathchardef\mathcomma\mathcode`\,%
   \mathcode`\,="8000 %
 }
@@ -59,9 +89,9 @@
   \gdef,{\futurelet\@let at token\sm at rtcomma}
 }
 \def\sm at rtcomma{%
-  \ifx\@let at token\@sptoken\mathtextcomma\protect\,\else
+  \ifx\@let at token\@sptoken\m at thtextcomma\protect\,\else
   \ifx\@let at token\space \else
-    \mathtextcomma\fi\fi}
+    \m at thtextcomma\fi\fi}
 \DeclareMathSymbol{.}{\mathalpha}{operators}{`.}
 \endinput
 %%



More information about the tex-live-commits mailing list