texlive[60580] Master/texmf-dist: datax (22sep21)

commits+karl at tug.org commits+karl at tug.org
Wed Sep 22 22:35:43 CEST 2021


Revision: 60580
          http://tug.org/svn/texlive?view=revision&revision=60580
Author:   karl
Date:     2021-09-22 22:35:42 +0200 (Wed, 22 Sep 2021)
Log Message:
-----------
datax (22sep21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/datax/datax.pdf
    trunk/Master/texmf-dist/source/latex/datax/datax.dtx
    trunk/Master/texmf-dist/tex/latex/datax/datax.sty

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

Modified: trunk/Master/texmf-dist/source/latex/datax/datax.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/datax/datax.dtx	2021-09-22 20:35:18 UTC (rev 60579)
+++ trunk/Master/texmf-dist/source/latex/datax/datax.dtx	2021-09-22 20:35:42 UTC (rev 60580)
@@ -17,7 +17,7 @@
 % \iffalse
 %<package>\NeedsTeXFormat{LaTeX2e}[2020/02/02]
 %<package>\ProvidesPackage{datax}
-%<package>      [2020/11/29 v1.1.1 data import into LaTeX]
+%<package>      [2021-09-22 v1.1.2 data import into LaTeX]
 %<package>\RequirePackage{pgfkeys}
 %<package>\RequirePackage{pgfopts}
 %
@@ -60,7 +60,7 @@
 %</driver>
 % \fi
 %
-%\CheckSum{19}
+%\CheckSum{29}
 %
 % \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
@@ -81,6 +81,7 @@
 % \changes{v1.0}{2020/11/15}{Initial version}
 % \changes{v1.1}{2020/11/17}{Polishing for release}
 % \changes{v1.1.1}{2020/11/29}{Renaming the plugins, adding Python support}
+% \changes{v1.1.2}{2021-09-22}{Removing excessive spaces}
 %
 % \GetFileInfo{datax.sty}
 % \DoNotIndex{}
@@ -180,6 +181,7 @@
 % Default data file name: \texttt{data.tex}
 %    \begin{macrocode}
 \pgfkeys{ /packageoptions/dataxfile/.initial=data.tex, }
+\pgfkeys{ /packageoptions/siunitxoptions/.initial={}, }
 %    \end{macrocode}
 % Read any given options into family \texttt{/packageoptions/}. Then introduce
 % family \texttt{/datax/} where all the variables will be stored.
@@ -186,10 +188,10 @@
 %    \begin{macrocode}
 \ProcessPgfPackageOptions{/packageoptions}
 
-\pgfkeys{ /datax/.is family, datax, %
-        .unknown/.code={ \pgfkeyssetvalue{ %
-                        \pgfkeyscurrentpath/\pgfkeyscurrentname %
-        }{ #1 } },
+\pgfkeys{ /datax/.is family, datax,%
+        .unknown/.code={ \pgfkeyssetvalue{%
+                        \pgfkeyscurrentpath/\pgfkeyscurrentname%
+        }{ #1 } },%
 }
 
 %    \end{macrocode}
@@ -202,17 +204,24 @@
         }{}{
         \PackageWarning{datax}{Cannot read file `\dataxfile'}
 }
+\newif\ifhassiunitx
+\@ifpackageloaded{siunitx}{\hassiunitxtrue}{\hassiunitxfalse} 
 %    \end{macrocode}
 % \begin{macro}{\datax}
 % Include datum. If the supplied tag is unused, print bold question marks (like
 % |\ref|), and throw a warning.
 %    \begin{macrocode}
-\newcommand{\datax}[1]{
-        \pgfkeysifdefined{/datax/#1}{ %
-                \pgfkeysvalueof{/datax/#1} %
-                }{ %
-                \PackageWarning{datax}{Data value `#1' undefined}\textbf{??} %
-        } %
+\newcommand{\datax}[2][]{%
+        \pgfkeysifdefined{/datax/#2}{%
+                {%
+                        \ifhassiunitx%
+                                \sisetup{\pgfkeysvalueof{/packageoptions/siunitxoptions},#1}%
+                        \fi%
+                        \pgfkeysvalueof{/datax/#2}%
+                }%
+                }{%
+                \PackageWarning{datax}{Data value `#2' undefined}\textbf{??}%
+        }%
 }
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/Master/texmf-dist/tex/latex/datax/datax.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datax/datax.sty	2021-09-22 20:35:18 UTC (rev 60579)
+++ trunk/Master/texmf-dist/tex/latex/datax/datax.sty	2021-09-22 20:35:42 UTC (rev 60580)
@@ -21,17 +21,18 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2020/02/02]
 \ProvidesPackage{datax}
-      [2020/11/29 v1.1.1 data import into LaTeX]
+      [2021-09-22 v1.1.2 data import into LaTeX]
 \RequirePackage{pgfkeys}
 \RequirePackage{pgfopts}
 
 \pgfkeys{ /packageoptions/dataxfile/.initial=data.tex, }
+\pgfkeys{ /packageoptions/siunitxoptions/.initial={}, }
 \ProcessPgfPackageOptions{/packageoptions}
 
-\pgfkeys{ /datax/.is family, datax, %
-        .unknown/.code={ \pgfkeyssetvalue{ %
-                        \pgfkeyscurrentpath/\pgfkeyscurrentname %
-        }{ #1 } },
+\pgfkeys{ /datax/.is family, datax,%
+        .unknown/.code={ \pgfkeyssetvalue{%
+                        \pgfkeyscurrentpath/\pgfkeyscurrentname%
+        }{ #1 } },%
 }
 
 \def\dataxfile{./\pgfkeysvalueof{/packageoptions/dataxfile}}
@@ -40,12 +41,19 @@
         }{}{
         \PackageWarning{datax}{Cannot read file `\dataxfile'}
 }
-\newcommand{\datax}[1]{
-        \pgfkeysifdefined{/datax/#1}{ %
-                \pgfkeysvalueof{/datax/#1} %
-                }{ %
-                \PackageWarning{datax}{Data value `#1' undefined}\textbf{??} %
-        } %
+\newif\ifhassiunitx
+\@ifpackageloaded{siunitx}{\hassiunitxtrue}{\hassiunitxfalse}
+\newcommand{\datax}[2][]{%
+        \pgfkeysifdefined{/datax/#2}{%
+                {%
+                        \ifhassiunitx%
+                                \sisetup{\pgfkeysvalueof{/packageoptions/siunitxoptions},#1}%
+                        \fi%
+                        \pgfkeysvalueof{/datax/#2}%
+                }%
+                }{%
+                \PackageWarning{datax}{Data value `#2' undefined}\textbf{??}%
+        }%
 }
 \endinput
 %%



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