diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/dataref/dataref.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/dataref/dataref.dtx | 63 |
1 files changed, 47 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/latex/dataref/dataref.dtx b/Master/texmf-dist/source/latex/dataref/dataref.dtx index 8c645166e02..ff126d27305 100644 --- a/Master/texmf-dist/source/latex/dataref/dataref.dtx +++ b/Master/texmf-dist/source/latex/dataref/dataref.dtx @@ -28,11 +28,11 @@ %</driver> %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{dataref} -%<package> [2014/10/09 v0.3 dataref] +%<package> [2015/04/21 v0.4 dataref] % %<*driver> \documentclass{ltxdoc} -\usepackage[usagereport]{dataref}[2014/10/09] +\usepackage[usagereport]{dataref}[2015/04/21] \EnableCrossrefs \CodelineIndex \RecordChanges @@ -86,6 +86,7 @@ % Right brace \} Tilde \~} % % +% \changes{v0.4}{2015/04/21}{Remove Spurious Whitespaces} % \changes{v0.1}{2013/12/06}{Initial version} % % \DoNotIndex{\newcommand,\newenvironment} @@ -576,13 +577,14 @@ % \begin{macro}{\dref@set} % \begin{macrocode} \def\dref@set#1#2{% - \pgfkeys@temptoks{#2}% - \expandafter\xdef\csname - pgfk@\dref@datapath#1\endcsname{\the\pgfkeys@temptoks}% - \ifdref@refall% - \expandafter\dref@found\expandafter{\dref@datapath#1}{0} - \expandafter\dref@referenced\expandafter{\dref@datapath#1}{0}% - \fi% + \edef\dref@set@tmp{#2}% + \expandafter\pgfkeys@temptoks\expandafter{\dref@set@tmp}% + \expandafter\xdef\csname + pgfk@\dref@datapath#1\endcsname{\the\pgfkeys@temptoks}% + \ifdref@refall% + \expandafter\dref@found\expandafter{\dref@datapath#1}{0} + \expandafter\dref@referenced\expandafter{\dref@datapath#1}{0}% + \fi% } % \end{macrocode} % \end{macro} @@ -836,7 +838,7 @@ \begingroup% \pgfset{/pgf/number format/.cd, #1}% \dref@calc{#2}% - \pgfmathprintnumberto[fixed,assume math mode=true,precision=10,1000 sep={}]{\pgfmathresult}{\drefresult} + \pgfmathprintnumberto[fixed,assume math mode=true,precision=10,1000 sep={}]{\pgfmathresult}{\drefresult}% \xdef\drefresult{\drefresult}% \dref@format{\pgfmathresult}% \dref@mkannotate{\textbackslash drefcalc\{#2\}}% @@ -846,7 +848,7 @@ \begingroup% \pgfset{/pgf/number format/.cd, #1}% \dref@calc{#2}% - \pgfmathprintnumberto[fixed,assume math mode=true,precision=10,1000 sep={}]{\pgfmathresult}{\drefresult} + \pgfmathprintnumberto[fixed,assume math mode=true,precision=10,1000 sep={}]{\pgfmathresult}{\drefresult}% \xdef\drefresult{\drefresult}% \endgroup% } @@ -1037,9 +1039,23 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\drefusagereportaftergroup} +% \begin{macrocode} + +\def\drefusagereportaftergroup{} + +\def\drefusagereportbeforerow{} +\def\drefusagereportbeforetitle{} +\def\drefusagereportaftertitle{} + +\def\drefusagereportbeforedescription{} + +% \end{macrocode} +% \end{macro} % % \begin{macro}{\dref@usagereport@forhelp} % \begin{macrocode} + \newif\ifdref@withhelp \errorcontextlines=23 \newlength{\dreflinewidth}% @@ -1055,6 +1071,7 @@ \dref@usagereport@keyheader@firsttrue% \renewcommand{\do}[1]{% \dref@help@match{#1}{##1}{% + \drefusagereportbeforerow% \dref@usagereport@keyheader{##1}% \ifinlistcs{##1}{dref@usagereport@matchedkeys}{}{% \listcsgadd{dref@usagereport@matchedkeys}{##1}% @@ -1062,16 +1079,22 @@ }{}% }% \ifdref@withhelp - \tablehead{\hline & Page & Value \\\hline}% + \tablehead{\drefusagereportbeforetitle% + \hline & Page & Value % + \drefusagereportaftertitle\\\hline% + }% \setlength\tabcolsep{3pt}% \dreflinewidth=\linewidth% - \advance\dreflinewidth by -6\tabcolsep% + \advance\dreflinewidth by -4\tabcolsep% + \advance\dreflinewidth by -2\arrayrulewidth% \begin{xtabular}{|p{0.7\dreflinewidth}|p{0.15\dreflinewidth}|p{0.15\dreflinewidth}|}% \dolistcsloop{dref@usagereport@keys}\\\hline + \drefusagereportbeforedescription% \multicolumn{3}{|p{\linewidth}|}{\csuse{dref@help@#1}}\\\hline \end{xtabular}% \fi% - + \drefusagereportaftergroup% + \endgroup% } % \end{macrocode} @@ -1093,16 +1116,24 @@ \dref@usagereport@keyheader@firsttrue% \renewcommand{\do}[1]{% \ifinlistcs{##1}{dref@usagereport@matchedkeys}{}{% + \drefusagereportbeforerow% \dref@usagereport@keyheader{##1}% }% }% \ifdref@withouthelp% - \tablehead{\hline Keys without Description & Page & Value \\\hline}% + \tablehead{\drefusagereportbeforetitle% + \hline Keys without Description & Page & Value % + \drefusagereportaftertitle\\\hline% + }% \setlength\tabcolsep{3pt}% \dreflinewidth=\linewidth% - \advance\dreflinewidth by -6\tabcolsep% + \advance\dreflinewidth by -4\tabcolsep% + \advance\dreflinewidth by -2\arrayrulewidth% \begin{xtabular}{|p{0.7\dreflinewidth}|p{0.15\dreflinewidth}|p{0.15\dreflinewidth}|}% \dolistcsloop{dref@usagereport@keys}\\\hline + \drefusagereportbeforedescription% + \multicolumn{3}{|p{\linewidth}|}{% + \emph{For these keys, no description was given}}\\\hline \end{xtabular}% \fi% \endgroup% |