diff options
author | Karl Berry <karl@freefriends.org> | 2007-03-18 23:49:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-03-18 23:49:25 +0000 |
commit | 8550a5a737c909d12e87b3f1bad87c7975856072 (patch) | |
tree | f0bfd1c818ff86fd07252d4888ccac7977c933f7 /Master/texmf-dist/tex/latex/register | |
parent | 95bb6802908cac4ec42d2c5a37cb42598b2980a4 (diff) |
register update (9mar07)
git-svn-id: svn://tug.org/texlive/trunk@4059 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/register')
-rw-r--r-- | Master/texmf-dist/tex/latex/register/register.sty | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/register/register.sty b/Master/texmf-dist/tex/latex/register/register.sty index 4e7624bd4de..3e1755abd56 100644 --- a/Master/texmf-dist/tex/latex/register/register.sty +++ b/Master/texmf-dist/tex/latex/register/register.sty @@ -16,7 +16,7 @@ -\ProvidesPackage{register} [2004/08/16 v1.4 Register macros with +\ProvidesPackage{register} [2007/03/08 v1.5 Register macros with hyperref/LyX support] \RequirePackage{ifthen}[1997/11/02] @@ -131,12 +131,26 @@ hyperref/LyX support] \setlength{\regdescsep}{\oldregdescsep}% \setboolean{RegisterContext}{false}% \end{Regfloat}} -\def\spread#1{{\count0=0 \spreadaux#1\end}} -\def\spreadaux#1{% - \ifx#1\end \let\next=\relax% - \else\ifx#1_\let\next=\spreadaux% - \else\advance\count0 by 1 \ifnum\count0>1{}\hfill\fi #1 % - \let\next=\spreadaux\fi\fi\next} +\def\regUnderScore{_}% +\def\regFiller#1{\def\regInner{#1}% +\ifx\regInner\regUnderScore% +\else% +\ifnum\count0>0% +\hfill#1% +\else#1\fi% +\fi% +\advance\count0 by 1% +} +\def\regSpread#1{\count0=0{}\regSpreadaux#1\empty} +\def\regSpreadaux#1#2\empty{\def\aux{#1}%\show#1% +\ifx\aux\empty% +\else% +\def\aux{#2}% +\regFiller{#1}% +\ifx\aux\empty% +\else% +\regSpreadaux#2\empty% +\fi\fi} \newcommand{\setRegLengths}{% % Compute basic width of a single bit \settowidth{\regFieldLen}{\regLabelSize \regResetName}% @@ -175,7 +189,7 @@ hyperref/LyX support] \makebox[0pt][l]{\raisebox{-1\regResetDrop}{\framebox[\regFieldLen][c]% % Place an invisible rule to control the box % surrounding the reset field - {\regResetSize \rule[-1\regResetDepth]{0pt}{\regResetHeight} \spread{#1}}}}% + {\regResetSize \rule[-1\regResetDepth]{0pt}{\regResetHeight}\regSpread{#1}}}}% } \newcommand{\regfield}[4]{% % Compute overall field length @@ -226,7 +240,7 @@ hyperref/LyX support] \regRotateFieldName% % Typeset field value \framebox[\regFieldLen][c]% - {\tiny \spread{#3}}% + {\tiny\regSpread{#3}}% \hspace{-1\fboxrule}% } \newcommand{\regspace}[1]{% |