summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/dynamicnumber/dynamicnumber.sty69
1 files changed, 69 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/dynamicnumber/dynamicnumber.sty b/Master/texmf-dist/tex/latex/dynamicnumber/dynamicnumber.sty
new file mode 100644
index 00000000000..aa774d939fc
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/dynamicnumber/dynamicnumber.sty
@@ -0,0 +1,69 @@
+%%
+%% This is file `dynamicnumber.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% dynamicnumber.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2015 by Olivier Pieters
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the MIT License, a version can be found
+%% in the GitHub repository:
+%%
+%% https://github.com/opieters/DynamicNumber
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{dynamicnumber}
+ [2015/10/04 v0.1 Dynamic Number package]
+%% \DescribeMacro{\dncurrent}
+\RequirePackage{pgfkeys}
+\RequirePackage{xparse}
+\ExplSyntaxOn
+\DeclareExpandableDocumentCommand{\@IfNoValueOrEmptyTF}{mmm}
+ {
+ \IfNoValueTF{#1}{#2}
+ {
+ \tl_if_empty:nTF {#1} {#2} {#3}
+ }
+ }
+\ExplSyntaxOff
+\DeclareDocumentCommand{\dndeclare}{m}{%
+ \pgfkeys{%
+ /dynamicnumber/#1/.is family,
+ /dynamicnumber/#1/.unknown/.style = {%
+ \pgfkeyscurrentpath/\pgfkeyscurrentname/.initial = ##1%
+ }
+ }%
+}
+\DeclareDocumentCommand{\dnsetcurrent}{m}{%
+\@ifundefined{dncurrent}{%
+ \DeclareDocumentCommand{\dncurrent}{}{#1}%
+}
+{%
+\RenewDocumentCommand{\dncurrent}{}{#1}%
+}%
+}
+\DeclareDocumentCommand{\dnload}{m}{%
+ \IfFileExists{#1.dnlist}{%
+ \newread\ccinstream
+ \immediate\openin\ccinstream=#1.dnlist
+ \@whilesw\unless\ifeof\ccinstream\fi{%
+ \immediate\read\ccinstream to \@auxcommand
+ \@auxcommand
+ }%
+ \immediate\closein\ccinstream%
+ \dnsetcurrent{#1}%
+ }{}%
+}
+\DeclareDocumentCommand{\dnget}{O{} m}{%
+\@IfNoValueOrEmptyTF{#1}{%
+ \pgfkeysvalueof{/dynamicnumber/\dncurrent/#2}}{%
+ \pgfkeysvalueof{/dynamicnumber/#1/#2}}%
+}
+\endinput
+%%
+%% End of file `dynamicnumber.sty'.