From df227257473b435c063d95133438434400e00a9c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 4 Oct 2015 22:26:15 +0000 Subject: fibeamer (4oct15) git-svn-id: svn://tug.org/texlive/trunk@38549 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/dynamicnumber/dynamicnumber.sty | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/dynamicnumber/dynamicnumber.sty (limited to 'Master/texmf-dist/tex/latex/dynamicnumber') 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'. -- cgit v1.2.3