summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/register/register.pdfbin288135 -> 154557 bytes
-rw-r--r--Master/texmf-dist/source/latex/register/register.dtx53
-rw-r--r--Master/texmf-dist/tex/latex/register/register.sty32
-rw-r--r--Master/texmf-dist/tpm/register.tpm8
4 files changed, 67 insertions, 26 deletions
diff --git a/Master/texmf-dist/doc/latex/register/register.pdf b/Master/texmf-dist/doc/latex/register/register.pdf
index 3b98f13d342..33f15a32092 100644
--- a/Master/texmf-dist/doc/latex/register/register.pdf
+++ b/Master/texmf-dist/doc/latex/register/register.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/register/register.dtx b/Master/texmf-dist/source/latex/register/register.dtx
index 0c9c210f685..2d8f3131b03 100644
--- a/Master/texmf-dist/source/latex/register/register.dtx
+++ b/Master/texmf-dist/source/latex/register/register.dtx
@@ -20,7 +20,7 @@
\ProvidesFile{register.dtx}
%</dtx>
% \fi
-% \CheckSum{575}
+% \CheckSum{589}
%
% \changes{v0.1}{1999/03/29}{First release}
% \changes{v0.2}{2000/01/29}{Added regdesc environment, for use under LyX}
@@ -37,9 +37,10 @@
% \changes{v1.2}{2003/03/31}{Removed requirement to specify register offset}
% \changes{v1.3}{2003/11/24}{Changed how center is handled within register environment}
% \changes{v1.4}{2004/08/16}{Now provide a boolean set only in register context}
+% \changes{v1.5}{2007/03/08}{Corrected use of conditionals used in spreading register reset value}
%
-% \def\fileversion{v1.4}
-% \def\filedate{2004/08/16}
+% \def\fileversion{v1.5}
+% \def\filedate{2007/03/08}
% \title{Register diagrams with field descriptions}
% \author{Matthew Lovell\\
% \texttt{lovell@indra.com}
@@ -497,7 +498,7 @@
%
% Announce the name and load required packages:
% \begin{macrocode}
-\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]
@@ -728,17 +729,43 @@ hyperref/LyX support]
% \end{macrocode}
%
%
+% \begin{macro}{\regUnderScore}
+% \begin{macro}{\regFiller}
+% \begin{macro}{\regSpread}
% The next definitions provide a method of spreading out
% an argument, i.e., placing |\hfill|'s between each character.
% They can be used to space the reset value of a register field
-% appropriately.
+% appropriately. Previous versions of these macros used \TeX{}'s
+% conditionals incorrectly.
+%
+% If you are using the |underscore| package, you should
+% \emph{repeat} the definition of |\regUnderScore|, after loading
+% |underscore| in order to observe the changes made by that package.
+% The spreading macros below strive to strip out underscores.
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \begin{macrocode}
-\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}
% \end{macrocode}
%
%
@@ -801,7 +828,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}}}}%
}
% \end{macrocode}
%
@@ -883,7 +910,7 @@ hyperref/LyX support]
\regRotateFieldName%
% Typeset field value
\framebox[\regFieldLen][c]%
- {\tiny \spread{#3}}%
+ {\tiny\regSpread{#3}}%
\hspace{-1\fboxrule}%
}
% \end{macrocode}
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]{%
diff --git a/Master/texmf-dist/tpm/register.tpm b/Master/texmf-dist/tpm/register.tpm
index 87f9bbd19fb..98f0ec64d3c 100644
--- a/Master/texmf-dist/tpm/register.tpm
+++ b/Master/texmf-dist/tpm/register.tpm
@@ -3,7 +3,7 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/register.zip">
<TPM:Name>register</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/11/09 14:05:58</TPM:Date>
+ <TPM:Date>2007/03/08 21:50:00</TPM:Date>
<TPM:Version></TPM:Version>
<TPM:Creator>rahtz</TPM:Creator>
<TPM:Title>
@@ -25,16 +25,16 @@ the float package.
<TPM:Size>365659</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="13230">
+ <TPM:RunFiles size="13380">
texmf-dist/tex/latex/register/register.sty
texmf-dist/tpm/register.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="308990">
+ <TPM:DocFiles size="175412">
texmf-dist/doc/latex/register/Reg_macro.pm
texmf-dist/doc/latex/register/reg_list.pl
texmf-dist/doc/latex/register/register.pdf
</TPM:DocFiles>
- <TPM:SourceFiles size="43439">
+ <TPM:SourceFiles size="44168">
texmf-dist/source/latex/register/register.dtx
texmf-dist/source/latex/register/register.ins
</TPM:SourceFiles>