From 24d8cd26aa53d1cac2260d29c6cf1c387a61a32a Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 8 Dec 2023 03:01:14 +0000 Subject: CTAN sync 202312080301 --- macros/latex/contrib/decimalcomma/README.md | 33 ++++ macros/latex/contrib/decimalcomma/decimalcomma.dtx | 189 +++++++++++++++++++++ macros/latex/contrib/decimalcomma/decimalcomma.ins | 55 ++++++ macros/latex/contrib/decimalcomma/decimalcomma.pdf | Bin 0 -> 88992 bytes macros/latex/contrib/pdfrender/README.md | 2 +- macros/latex/contrib/pdfrender/pdfrender.dtx | 17 +- macros/latex/contrib/pdfrender/pdfrender.pdf | Bin 408295 -> 408875 bytes 7 files changed, 288 insertions(+), 8 deletions(-) create mode 100644 macros/latex/contrib/decimalcomma/README.md create mode 100644 macros/latex/contrib/decimalcomma/decimalcomma.dtx create mode 100644 macros/latex/contrib/decimalcomma/decimalcomma.ins create mode 100644 macros/latex/contrib/decimalcomma/decimalcomma.pdf (limited to 'macros/latex/contrib') diff --git a/macros/latex/contrib/decimalcomma/README.md b/macros/latex/contrib/decimalcomma/README.md new file mode 100644 index 0000000000..82fcc4ec61 --- /dev/null +++ b/macros/latex/contrib/decimalcomma/README.md @@ -0,0 +1,33 @@ +# The decimalcomma package + + +## Presentation + +Many countries use a comma instead of a dot as a decimal separator. +This small package offers a new definition of the comma `,` as an active character. +It ensures the correct spacing in mathematical mode when using the comma either +as decimal separator or as list separator. + +What's the difference compared to the well-known icomma or ncccomma packages? +With decimalcomma, the comma behaves similarly to ncccomma, but the code is lighter, +and several compatibility issues have been fixed. + + +## Installation + +- run LaTeX on decimalcomma.ins, you obtain the file decimalcomma.sty, +- if then you run pdfLaTeX on decimalcomma.dtx you get the file decimalcomma.pdf which is also in the archive, +- put the files decimalcomma.sty and decimalcomma.pdf in your TeX Directory Structure. + + +## Author + +Antoine Missier + +Email: antoine.missier@ac-toulouse.fr + + +## License + +Released under the LaTeX Project Public License v1.3 or later. +See http://www.latex-project.org/lppl.txt diff --git a/macros/latex/contrib/decimalcomma/decimalcomma.dtx b/macros/latex/contrib/decimalcomma/decimalcomma.dtx new file mode 100644 index 0000000000..ae1fb4fa99 --- /dev/null +++ b/macros/latex/contrib/decimalcomma/decimalcomma.dtx @@ -0,0 +1,189 @@ +% \iffalse meta-comment +% +% Copyright (C) 2023 by Antoine Missier +% +% This file may be distributed and/or modified under the conditions of +% the LaTeX Project Public License, either version 1.3 of this license +% or (at your option) any later version. The latest version of this +% license is in: +% +% http://www.latex-project.org/lppl.txt +% +% and version 1.3 or later is part of all distributions of LaTeX version +% 2005/12/01 or later. +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{decimalcomma.dtx} +% +%<*package> +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +\ProvidesPackage{decimalcomma} + [2023/12/06 v1.0 .dtx decimalcomma file] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[english]{babel} +\usepackage[charter]{mathdesign} +\usepackage{decimalcomma} +\usepackage{sectsty} +\usepackage{xcolor} +\usepackage{centeredline} + +\definecolor{darkbrown}{rgb}{0.5,0.1,0.1} +\allsectionsfont{\color{darkbrown}} + +\DisableCrossrefs +%\CodelineIndex +%\RecordChanges +\usepackage{hyperref} +\hypersetup{% + colorlinks, + linkcolor=blue, + citecolor=red, + pdftitle={decimalcomma}, + pdfsubject={LaTeX package}, + pdfauthor={Antoine Missier} +} +\MakeShortVerb{"} +\begin{document} +\DocInput{decimalcomma.dtx} +%\PrintChanges +%\PrintIndex +\end{document} +% +% \fi +% +% \CheckSum{26} +% +% \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 +% Lower-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 +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \changes{v1.0}{2023/12/06}{Initial version} +% +% \GetFileInfo{decimalcomma.sty} +% +% \title{The \textsf{decimalcomma} package} +% \author{Antoine Missier \\ \texttt{antoine.missier@ac-toulouse.fr}} +% \date{\filedate, \fileversion} +% \maketitle +% +% \section{Why this package?} +% +% In many countries, except notably in Anglo-Saxon countries, +% the comma is used as a decimal separator for numbers. +% However, in the math mode of \LaTeX, the comma is always, by default, +% treated as a punctuation symbol and therefore is followed by a space. +% This is appropriate in intervals: "$[a,b]$" results in $[a,b]$, +% but is not appropriate for numbers where the comma represents the decimal separator. +% For example, "$12,5$" is displayed as $12, 5$ instead of $12,5$. +% +% \medskip +% Two very convenient packages allow handling the decimal comma. In math mode: +% \begin{itemize} +% \item With \textsf{icomma} (intelligent comma) by Walter Schmidt~\cite{ICOMMA}, +% the comma behaves as a punctuation character if it is followed by a space; +% otherwise, it is treated as an ordinary character. +% \item With \textsf{ncccomma} by Alexander I.~Rozhenko~\cite{NCC}, +% the comma behaves as an ordinary character if it is followed by a digit +% (without a space); otherwise, it is considered a punctuation character. +% \end{itemize} +% +% It appears that this second approach is preferable because unlike with icomma, +% you are not required to add a space after the comma when it's not followed by a digit; +% however, \textsf{ncccomma} poses several compatibility issues, +% especially when used with \textsf{babel} +% in conjunction with \textsf{numprint}~\cite{NUMP} and its \texttt{autolanguage} option +% (at least for certain languages such as French and Spanish). +% Another issue with \textsf{ncccomma} is that compiling with Lua\LaTeX, +% \textsf{unicode-math}, and "\setmathfont" fails. +% +% Let it be noted that a code proposed by Claudio Beccari~\cite{BECC}, +% similar to that of \textsf{ncccomma}, presents the same type of issues. +% +% \medskip +% Therefore, we propose a new package, functionally identical to that +% of \textsf{ncccomma} but with lighter code and without the +% aforementioned incompatibilities. +% +% \section{Bugs and problems} +% Here, we are revisiting what Walter Schmidt wrote in the documentation of his +% \textsf{icomma} package: +% +% In case the \textsf{decimalcomma} is used together with the \textsf{dcolumn} package, +% a comma to be printed as the decimal separator in a column of type \texttt{D} +% is to be specified as "{\mathord\mathcomma}", rather than "{,}", +% since the latter leads to an error. +% For instance: +% \centeredline{"\begin{tabular}{... D{,}{\mathord\mathcomma}{2} ...}"} +% +% \medskip +% Note that specifying the comma as the related input character works as usual. +% Generally, since the \textsf{decimalcomma} package makes the comma ‘active’, +% further problems are not unlikely. +% +% \StopEventually{} +% +% \section{Implementation} +% We have taken up Walter Schmidt's fundamental idea for looking up the next character, +% but with an execution loop to test all the digits from 0 to 9 instead of "\space". +% We could have also used ten nested "\if" \ldots "\else" \ldots "\fi" structures +% and that works very well. +% +% At |\begin{document}|, we store the original "\mathcode" of the comma, +% in the |\mathcomma| macro, and then we make the comma active in math mode. +% \begin{macrocode} +\AtBeginDocument{% + \mathchardef\mathcomma\mathcode`\,% + \mathcode`\,="8000% +} + +% \end{macrocode} +% The active comma checks the next input character. If the next character is in +% the list 0123456789, +% the active comma returns |\mathord| with the saved |\mathcomma|, +% so that no space will be added after the comma. +% Otherwise, |\mathcomma| is returned without |\mathord|, thus the comma behaves +% by default as a |\mathpunct|. +% \begin{macrocode} +{\catcode`,=\active + \gdef,{\futurelet\@next\sm@rtcomma}} + +\def\sm@rtcomma{% + \@tfor\@let@token:=0123456789% + \do{\expandafter\ifx\@let@token\@next\mathord\@break@tfor\fi}% + \mathcomma} + +% \end{macrocode} +% +% \begin{thebibliography}{4} +% % \begin{raggedright} +% \bibitem{ICOMMA} \emph{The \textsf{icomma} package for \LaTeXe}. +% Walter Schmidt, CTAN, v2.0 2002/03/10. +% \bibitem{NCC} \emph{The \textsf{ncccomma} package}. Alexander I.~Rozhenko, +% CTAN, v1.0 2005/02/10. +% \bibitem{BECC} \emph{Intelligent commas}. Claudio Beccari, The Prac\TeX\ Journal, +% 2011, No.\@1. +% \url{https://tug.org/pracjourn/2011-1/beccari/Intcomma.pdf} +% \bibitem{NUMP} \emph{The \textsf{numprint} package}. Harald Harders, +% CTAN, v1.39 2012/08/20. +% \end{raggedright} +% \end{thebibliography} +% \Finale +\endinput diff --git a/macros/latex/contrib/decimalcomma/decimalcomma.ins b/macros/latex/contrib/decimalcomma/decimalcomma.ins new file mode 100644 index 0000000000..b45bf2d2e7 --- /dev/null +++ b/macros/latex/contrib/decimalcomma/decimalcomma.ins @@ -0,0 +1,55 @@ +%% +%% Copyright (C) 2023 by Antoine Missier +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.3 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% + +\input docstrip.tex +\keepsilent + +\usedir{tex/latex/decimalcomma} + +\preamble + +This is a generated file. + +Copyright (C) 2023 by Antoine Missier + +This file may be distributed and/or modified under the conditions of +the LaTeX Project Public License, either version 1.3 of this license +or (at your option) any later version. The latest version of this +license is in: + + http://www.latex-project.org/lppl.txt + +and version 1.3 or later is part of all distributions of LaTeX version +2005/12/01 or later. + +\endpreamble + +\generate{\file{decimalcomma.sty}{\from{decimalcomma.dtx}{package}}} + +\obeyspaces +\Msg{*************************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the following *} +\Msg{* files into a directory searched by TeX: *} +\Msg{* *} +\Msg{* decimalcomma.sty *} +\Msg{* *} +\Msg{* To produce the documentation run the file *} +\Msg{* ibrackets.dtx through LaTeX. *} +\Msg{* *} +\Msg{* Happy TeXing! *} +\Msg{* *} +\Msg{*************************************************************} + +\endbatchfile diff --git a/macros/latex/contrib/decimalcomma/decimalcomma.pdf b/macros/latex/contrib/decimalcomma/decimalcomma.pdf new file mode 100644 index 0000000000..8ebaefab55 Binary files /dev/null and b/macros/latex/contrib/decimalcomma/decimalcomma.pdf differ diff --git a/macros/latex/contrib/pdfrender/README.md b/macros/latex/contrib/pdfrender/README.md index c7c56f18fc..765928bb08 100644 --- a/macros/latex/contrib/pdfrender/README.md +++ b/macros/latex/contrib/pdfrender/README.md @@ -1,6 +1,6 @@ # pdfrender -Version: 2023/12/04 v1.7 +Version: 2023/12/07 v1.8 The PDF format has some graphics parameter like line width or text rendering mode. This package diff --git a/macros/latex/contrib/pdfrender/pdfrender.dtx b/macros/latex/contrib/pdfrender/pdfrender.dtx index c4b8dc67b2..b00fd5285c 100644 --- a/macros/latex/contrib/pdfrender/pdfrender.dtx +++ b/macros/latex/contrib/pdfrender/pdfrender.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % File: pdfrender.dtx -% Version: 2023-12-04 v1.7 +% Version: 2023-12-07 v1.8 % Info: Access to some PDF graphics parameters % % Copyright (C) @@ -85,7 +85,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: pdfrender 2023-12-04 v1.7 Access to some PDF graphics parameters (HO)} +\Msg{* Package: pdfrender 2023-12-07 v1.8 Access to some PDF graphics parameters (HO)} \Msg{************************************************************************} \keepsilent @@ -97,7 +97,7 @@ This is a generated file. Project: pdfrender -Version: 2023-12-04 v1.7 +Version: 2023-12-07 v1.8 Copyright (C) 2010 Heiko Oberdiek @@ -170,7 +170,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{pdfrender.drv}% - [2023-12-04 v1.7 Access to some PDF graphics parameters (HO)]% + [2023-12-07 v1.8 Access to some PDF graphics parameters (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2011/11/22] \usepackage{longtable} @@ -186,7 +186,7 @@ and the derived files % \GetFileInfo{pdfrender.drv} % % \title{The \xpackage{pdfrender} package} -% \date{2023-12-04 v1.7} +% \date{2023-12-07 v1.8} % \author{Heiko Oberdiek\thanks % {Please report any issues at \url{https://github.com/ho-tex/pdfrender/issues}}} % @@ -441,7 +441,7 @@ and the derived files \fi \expandafter\x\csname ver@pdfrender.sty\endcsname \ProvidesPackage{pdfrender}% - [2023-12-04 v1.7 Access to some PDF graphics parameters (HO)]% + [2023-12-07 v1.8 Access to some PDF graphics parameters (HO)]% % \end{macrocode} % % \begin{macrocode} @@ -683,7 +683,7 @@ and the derived files \fi { \AddToHook{cmd/normalcolor/after}{\PdfRender@NormalColorHook} - \AddToHook{cmd/color@setgroup/after}{\PdfRender@PatchColorSetGroup} + \AddToHook{cmd/color@setgroup/after}{\PdfRender@NormalColorHook} } % \end{macrocode} % with plain we simply append to \cs{normalcolor} and @@ -1524,6 +1524,9 @@ and the derived files % \item Use (with LaTeX) cmd-hooks to patch \cs{normalcolor} and \cs{color@setgroup}. % This avoids a clash with xcolor. % \end{Version} +% \begin{Version}{2023-12-07 v1.8} +% \item Fix wrong command name, issue \#3. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/macros/latex/contrib/pdfrender/pdfrender.pdf b/macros/latex/contrib/pdfrender/pdfrender.pdf index 53366bba44..f2d78902c3 100644 Binary files a/macros/latex/contrib/pdfrender/pdfrender.pdf and b/macros/latex/contrib/pdfrender/pdfrender.pdf differ -- cgit v1.2.3