texlive[49121] Master/texmf-dist: register (10nov18)

commits+karl at tug.org commits+karl at tug.org
Sat Nov 10 23:18:17 CET 2018


Revision: 49121
          http://tug.org/svn/texlive?view=revision&revision=49121
Author:   karl
Date:     2018-11-10 23:18:17 +0100 (Sat, 10 Nov 2018)
Log Message:
-----------
register (10nov18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/register/register.pdf
    trunk/Master/texmf-dist/source/latex/register/register.dtx
    trunk/Master/texmf-dist/tex/latex/register/register.sty

Modified: trunk/Master/texmf-dist/doc/latex/register/register.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/register/register.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/register/register.dtx	2018-11-10 22:17:02 UTC (rev 49120)
+++ trunk/Master/texmf-dist/source/latex/register/register.dtx	2018-11-10 22:18:17 UTC (rev 49121)
@@ -20,10 +20,10 @@
 \ProvidesFile{register.dtx}
 %</dtx>
 % \fi
-% \CheckSum{739}
+% \CheckSum{776}
 %
-% \def\fileversion{v1.7}
-% \def\filedate{2018/08/18}
+% \def\fileversion{v1.8}
+% \def\filedate{2018/11/10}
 % \title{Register diagrams with field descriptions}
 % \author{Matthew Lovell\\
 %  \texttt{lovells at gmail.com}
@@ -208,7 +208,11 @@
 %
 % A final example is shown in Figure~\ref{fig:regbus_cycle}.  This
 % example shows that the register drawing macros don't have to be used
-% solely within a |register| float.
+% solely within a |register| float or environment.  With Version~1.8,
+% an unnumbered register environment is also available, using
+% |register*|.  Diagrams produced using the starred environment
+% typeset just the register name, omitting the ``Register'' and number
+% prefix.
 %
 % \begin{figure}[H]
 % \begin{center}^^A 
@@ -293,7 +297,16 @@
 % improve readability.
 % \end{macro} 
 % \hspace*{\MacroIndent}|\regfield{|\meta{name}|}{|\meta{length}|}{|^^A
-%   \meta{start bit}|}{|\meta{reset value}|}|
+%   \meta{start bit}|}{|\meta{reset value}|}|\\[2pt]
+% 
+% Note that the comments that are shown in the code are for the
+% benefit of the helper scripts that accompany the |register|
+% package.  Those scripts are quite old and have \emph{not} been
+% updated to be tolerant of the optional color argument that is now
+% supported.  However, the general notion of using embedded comments
+% to augment register or field information is still applicable, if
+% one is using this package with the intent of generating HDL code
+% from documentation.
 %
 % \begin{macro}{\regBitWidth}
 % \begin{macro}{\regnewline}
@@ -314,7 +327,7 @@
 % \hspace*{\MacroIndent}|\reglabel{|\meta{reset label}|}|\\[2pt]
 % 
 %
-% As a final example, consider Register~\ref{Configuration}, which has
+% As another example, consider Register~\ref{Configuration} below, which has
 % field descriptions as part of the float.  This diagram was created 
 % with the following code:
 % \begin{verbatim}
@@ -414,7 +427,7 @@
 % the register description body should be.  The default value is 90\%
 % of |\textwidth|.  For |reglist|, the optional argument is the
 % longest field name, which allows the list to be spaced appropriately
-% (like examples given in \textit{The \LaTeX{} Companion}).
+% (like examples given in \emph{The \LaTeX{} Companion}).
 %
 % \begin{macro}{\regfieldb}
 % Finally, if a register with no reset values is desired, one can use
@@ -427,12 +440,12 @@
 % \subsection{TR Flags}
 %
 % \begin{macro}{\TR}
-% The last example also shows the TR flags.  These marginal notes can
+% The previous example also shows the TR flags.  These marginal notes can
 % be used to denote features that are specific to a particular release
 % of a chip.  These macros were created since \LaTeX{}'s |\marginpar|
 % is itself a float; as such it cannot be nested inside other floats.
 % The |\TR| macros thus implement something very similar to the
-% solution for Problem~14.28 in \textit{The \TeX{}book}.  
+% solution for Problem~14.28 in \emph{The \TeX{}book}.  
 
 % TR flags are turned on via the |TRflags| package option.  If the
 % option is not specified, then the |\TR| macro still exists but is
@@ -487,7 +500,7 @@
 % 
 % \section{Helper Scripts} \label{sec:scripts}
 %
-% A Perl module and a perl script are included as part of the
+% A (now old) Perl module and a Perl script are included as part of the
 % |register| package.  The module augments the package by
 % providing the ability to parse the register macro information into
 % Perl.  This information consists of the parameters used within
@@ -502,6 +515,10 @@
 % information for each register.  The later data can be used in
 % simulation to ensure that registers behave as documented.
 %
+% Users are cautioned that the Perl script, since it is no longer in
+% active use by the author, has not been modified to support the
+% optional color argument for the |regfield| macro.
+%
 % \section{Version History} \label{sec:history}
 %
 % \begin{itemize}
@@ -524,6 +541,7 @@
 % \item [\textbf{v1.6}] (2011/01/11) Mainmatter correction suggested by Kjetil Oftedal
 % \item [\textbf{v1.6.1}] (2018/05/19) Published with updated email address; no functional changes
 % \item [\textbf{v1.7}] (2018/08/18) Added color option to package, suggested by Marco Stolba
+% \item [\textbf{v1.8}] (2018/11/10) Added unnumbered |register*| environment, suggested and written by Stephan Bauroth
 % \end{itemize}
 %
 %
@@ -543,7 +561,7 @@
 %
 %    Announce the name and unconditionally load most of the required packages:
 %    \begin{macrocode}
-\ProvidesPackage{register} [2018/08/18 v1.7 Register macros with
+\ProvidesPackage{register} [2018/11/10 v1.8 Register macros with
 hyperref/LyX support]
 
 \RequirePackage{ifthen}[1997/11/02]
@@ -785,7 +803,33 @@
   \end{Regfloat}}
 %    \end{macrocode}
 %
+% \begin{macro}{\register*}
+%     This register* environment provides for an unnumbered or ``captionless'' register;
+%     registers in such an environment are not added to the list of registers.
+% \end{macro}
+%    \begin{macrocode}
+\newenvironment{register*}[3]
+{\begin{Regfloat}[#1]%
+   \setlength{\leftskip}{0pt}%
+   \setlength{\oldregdescsep}{\regdescsep}%
+   \setlength{\regdescsep}{0.5\baselineskip}%
+   \setlength{\partopsep}{0pt}%
+   \setlength{\topsep}{0pt}%
+   \setboolean{RegisterContext}{true}%
+   \ifthenelse{\equal{#3}{}}%
+   {\centering\textsc{#2}\\}% else
+   {\centering\textsc{#2} ({#3})\\}%
+   \centering}
+{% restore lengths
+   \leftskip\z@%
+   \rightskip\z@%
+   \parfillskip=\z@ plus 1fil%
+   \setlength{\regdescsep}{\oldregdescsep}%
+   \setboolean{RegisterContext}{false}%
+   \end{Regfloat}}
+%    \end{macrocode}
 %
+%
 % \begin{macro}{\regUnderScore}
 % \begin{macro}{\regFiller}
 % \begin{macro}{\regSpread}

Modified: trunk/Master/texmf-dist/tex/latex/register/register.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/register/register.sty	2018-11-10 22:17:02 UTC (rev 49120)
+++ trunk/Master/texmf-dist/tex/latex/register/register.sty	2018-11-10 22:18:17 UTC (rev 49121)
@@ -22,7 +22,7 @@
 
 
 
-\ProvidesPackage{register} [2018/08/18 v1.7 Register macros with
+\ProvidesPackage{register} [2018/11/10 v1.8 Register macros with
 hyperref/LyX support]
 
 \RequirePackage{ifthen}[1997/11/02]
@@ -144,6 +144,25 @@
   \setlength{\regdescsep}{\oldregdescsep}%
   \setboolean{RegisterContext}{false}%
   \end{Regfloat}}
+\newenvironment{register*}[3]
+{\begin{Regfloat}[#1]%
+   \setlength{\leftskip}{0pt}%
+   \setlength{\oldregdescsep}{\regdescsep}%
+   \setlength{\regdescsep}{0.5\baselineskip}%
+   \setlength{\partopsep}{0pt}%
+   \setlength{\topsep}{0pt}%
+   \setboolean{RegisterContext}{true}%
+   \ifthenelse{\equal{#3}{}}%
+   {\centering\textsc{#2}\\}% else
+   {\centering\textsc{#2} ({#3})\\}%
+   \centering}
+{% restore lengths
+   \leftskip\z@%
+   \rightskip\z@%
+   \parfillskip=\z@ plus 1fil%
+   \setlength{\regdescsep}{\oldregdescsep}%
+   \setboolean{RegisterContext}{false}%
+   \end{Regfloat}}
 \def\regUnderScore{_}%
 \def\regFiller#1{\def\regInner{#1}%
 \ifx\regInner\regUnderScore%



More information about the tex-live-commits mailing list