diff options
author | Karl Berry <karl@freefriends.org> | 2010-07-16 23:46:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-07-16 23:46:07 +0000 |
commit | 1e26864ecd918b1155caeb2bc233523134235afd (patch) | |
tree | df13736c2fb58d67a257e6feff4adbf1406ad538 | |
parent | b4f103cbfc783d328fbc6e0d01b330c11269200b (diff) |
undolabl 1.0d (15jul10)
git-svn-id: svn://tug.org/texlive/trunk@19486 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/undolabl/README | 151 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/undolabl/ltxdoc.cfg | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/undolabl/undolabl-example.pdf | bin | 66928 -> 55350 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/undolabl/undolabl-example.tex | 40 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/undolabl/undolabl.pdf | bin | 358041 -> 346409 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/undolabl/undolabl.drv | 11 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/undolabl/undolabl.dtx | 274 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/undolabl/undolabl.ins | 16 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/undolabl/undolabl.sty | 41 |
9 files changed, 365 insertions, 175 deletions
diff --git a/Master/texmf-dist/doc/latex/undolabl/README b/Master/texmf-dist/doc/latex/undolabl/README new file mode 100644 index 00000000000..3d3f163797f --- /dev/null +++ b/Master/texmf-dist/doc/latex/undolabl/README @@ -0,0 +1,151 @@ +README for undolabl package, 2010/07/15, v1.0d + + +TABLE OF CONTENTS +================= + +1 Introduction +2 Download +3 Installation +4 Additional Packages +5 New Features +6 Package Compatibility +7 Authors/Maintainers +8 Bug Reports +9 Known Problems + + +1 INTRODUCTION +============== + +This package allows to override existing labels, +especially automatically generated ones. + +Note: The main code of this package was invented by +Ulrich Diez (eu_angelion@web.de) and first published in the +comp.text.tex newsgroup at Sun, 20 Apr 2008 16:39:26 +0200, with subject: +Re: How to undefine/overwrite a label? (see e.g. +http://groups.google.de/group/comp.text.tex/msg/5ba8d4722e5cd326. +While Ulrich Diez neither wanted to create a package himself yet +nor have one published under his name, he granted the +publication of his code. Therefore: Thanks! +I (H.-Martin Münch) submitted this package to CTAN +(after some updates of the documentation, mainly layout, + typos and such things.) + + +2 DOWNLOAD +========== + +'undolabl' is available on CTAN: + CTAN:macros/latex/contrib/undolabl/ + +Also a ZIP file is provided that contains the files, already +sorted in a TDS tree: + CTAN:install/macros/latex/contrib/undolabl.tds.zip + +'CTAN:' means one of the 'Comprehensive TeX Archive Network' +nodes or one of its mirrors. This is explained in + http://www.tex.ac.uk/cgi-bin/texfaq2html?label=archives + +The CTAN stuff will be mirrored automatically from the +ftp server, so + ftp://ftp.tug.org/pub/tex/undolabl/ +corresponds to + CTAN:macros/latex/contrib/undolabl/ + + +3 INSTALLATION +============== + +Installation with ZIP file in TDS format +---------------------------------------- +The ZIP file 'undolabl.tds.zip' contains the files sorted +in a TDS tree. Thus you can directly unpack the ZIP file +inside a TDS tree. +(See CTAN:tds.zip for an explanation of TDS.) +Example: + cd /...somewhere.../texmf + unzip /...downloadpath.../undolabl.tds.zip +Do not forget to refresh the file name database of this +TDS tree. +Example: + texhash /...somewhere.../texmf + +Manual installation +------------------- +a) Download the undolabl files from CTAN or the TUG server. + If necessary, unpack them. +b) If directory 'beta' exists, replace the files by the + counterparts in this directory, if you want to use the + latest versions. +c) Generate the package and driver files: + tex undolabl.ins +d) Install the files '*.sty', and '*.cfg' in your TDS tree: + cp *.sty *.cfg TDS:tex/latex/muench/undolabl/ + Replace 'TDS:' by the prefix of your TDS tree + (texmf directory). +e) Copy the documentation files to + "TDS:doc/latex/muench/undolabl/": + README, undolabl.pdf, undolabl-example.tex, + undolabl-example.pdf. +f) Update the databases if necessary, e. g. for teTeX: + mktexlsr .../texmf + + +4 ADDITIONAL PACKAGES +===================== + +undolabl itself does not load other packages, +but working with labels usually means using +* hyperref.sty: + CTAN:macros/latex/contrib/hyperref/ +which again loads other packages +(see the result of the \listfiles command in the log-file + of the example). + + +5 PACKAGE COMPATIBILITY +======================= + +There are no known incompatibilities (yet). + +6 AUTHOR/MAINTAINER +===================== + +* Author of the original main code: Ulrich Dietz (Thanks!) +* Author of the recent package and maintainer: + Hans-Martin Münch + + +7 BUG REPORTS +============== + +A bug report should contain: +* Comprehensive problem description. This includes error or + warning messages. + * \errorcontextlines=\maxdimen can be added in the + TeX code to get more informations in TeX error messages. +* Minimal test file that shows the problem, but does not + contain any unnecessary packages and code. +* Used drivers/programs. +* Version information about used packages and programs. + * If you are using LaTeX, then add "\listfiles". Then + a list of version informations is printed at the end + of the LaTeX run. +* Please no other files than the minimal test file. + The other files .log, .dvi, .ps, .pdf are seldom + necessary, so send them only on request. +* Please .zip or .tar.gz your file(s) before sending them! + +Bug address +----------- +Bug reports can be send to the maintainer: + Hans-Martin Münch + <Martin [dot] Muench [at] Uni-Bonn [dot] de> + + +8 KNOWN PROBLEMS +================= + +* as yet: none...
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/undolabl/ltxdoc.cfg b/Master/texmf-dist/doc/latex/undolabl/ltxdoc.cfg index 741f977af09..307228da6b1 100644 --- a/Master/texmf-dist/doc/latex/undolabl/ltxdoc.cfg +++ b/Master/texmf-dist/doc/latex/undolabl/ltxdoc.cfg @@ -30,8 +30,11 @@ %% (Martin dot Muench at Uni-Bonn dot de). %% %% The main code of this package was invented by Ulrich Diez -%% (eu_angelion@web.de) in 2008 and published on the internet. -%% While Ulrich Diez neither wanted to create a package himself +%% (eu_angelion@web.de) and first published in the comp.text.tex +%% newsgroup at Sun, 20 Apr 2008 16:39:26 +0200, with subject: +%% Re: How to undefine/overwrite a label? (see e.g. +%% http://groups.google.de/group/comp.text.tex/msg/5ba8d4722e5cd326). +%% While Ulrich Diez neither wanted to create a package himself yet %% nor have one published under his name, he granted the %% publication of his code. Therefore: Thanks! %% diff --git a/Master/texmf-dist/doc/latex/undolabl/undolabl-example.pdf b/Master/texmf-dist/doc/latex/undolabl/undolabl-example.pdf Binary files differindex 433dfc75411..8794cedfd11 100644 --- a/Master/texmf-dist/doc/latex/undolabl/undolabl-example.pdf +++ b/Master/texmf-dist/doc/latex/undolabl/undolabl-example.pdf diff --git a/Master/texmf-dist/doc/latex/undolabl/undolabl-example.tex b/Master/texmf-dist/doc/latex/undolabl/undolabl-example.tex index 868ad0d708d..89b41a72cf7 100644 --- a/Master/texmf-dist/doc/latex/undolabl/undolabl-example.tex +++ b/Master/texmf-dist/doc/latex/undolabl/undolabl-example.tex @@ -30,8 +30,11 @@ %% (Martin dot Muench at Uni-Bonn dot de). %% %% The main code of this package was invented by Ulrich Diez -%% (eu_angelion@web.de) in 2008 and published on the internet. -%% While Ulrich Diez neither wanted to create a package himself +%% (eu_angelion@web.de) and first published in the comp.text.tex +%% newsgroup at Sun, 20 Apr 2008 16:39:26 +0200, with subject: +%% Re: How to undefine/overwrite a label? (see e.g. +%% http://groups.google.de/group/comp.text.tex/msg/5ba8d4722e5cd326). +%% While Ulrich Diez neither wanted to create a package himself yet %% nor have one published under his name, he granted the %% publication of his code. Therefore: Thanks! %% @@ -43,9 +46,9 @@ \documentclass[british]{article} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\usepackage{undolabl}[2010/06/24]% v1.0c +\usepackage{undolabl}[2010/07/15]% v1.0d %% There are no options for the undolabl package. %% -\usepackage{hyperref}[2010/06/04]% v6.81f; if you want to use nameref +\usepackage{hyperref}[2010/06/18]% v6.81g; if you want to use nameref \hypersetup{% extension=pdf,% plainpages=false,% @@ -53,20 +56,22 @@ hyperindex=false,% pdflang={en},% pdftitle={undolabl package example},% - pdfauthor={Hans-Martin Muench},% + pdfauthor={Hans-Martin Muench, after Ulrich Dietz},% pdfsubject={Example for the undolabl package},% - pdfkeywords={LaTeX, undolabl, Hans-Martin Muench},% + pdfkeywords={LaTeX, undolabl, Ulrich Dietz, Hans-Martin Muench},% pdfview=FitH,% pdfstartview=FitH,% pdfpagelayout=OneColumn,% bookmarksopen=true% } \makeatletter -%% Code from tcilatex.tex, Macros for Scientific Word and Scientific WorkPlace 5.5 <06 Oct 2005> %% -%% Copyright (C) 2005 Mackichan Software, Inc. %% -%% That macro file is NOT proprietary and may be freely copied and distributed. %% +%% Code from tcilatex.tex, Macros for Scientific Word and %% +%% Scientific WorkPlace 5.5 <06 Oct 2005> %% +%% Copyright (C) 2005 Mackichan Software, Inc. %% +%% That macro file is NOT proprietary and may be freely copied %% +%% and distributed. %% \def\unit#1{\mathord{\thinspace\rm #1}}% -%% End of code from tcilatex.tex %% +%% End of code from tcilatex.tex %% \makeatother \listfiles \begin{document} @@ -74,15 +79,14 @@ \section*{Example for undolabl} This example demonstrates the use of package\newline -\textsf{undolabl}, v1.0c as of 2010/06/24 (HMM).\newline -The used options were \texttt{linktextcolour=black}, -\texttt{backgroundcolour=white}, and \texttt{pdfborder={0 0 1}} -(the default ones).\newline -For more details please see the documentation!\newline - -\noindent Save per page about $200\unit{ml}$ water, -$2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood:\newline +\textsf{undolabl}, v1.0d as of 2010/07/15 (HMM).\newline +For details please see the documentation!\newline + +\noindent Save per page about $200\unit{ml}$~water, +$2\unit{g}$~CO$_{2}$ and $2\unit{g}$~wood:\newline Therefore please print only if this is really necessary.\newline +I do NOT think, that it is necessary to print THIS file, really\newline +(at least not after this page)! \bigskip diff --git a/Master/texmf-dist/doc/latex/undolabl/undolabl.pdf b/Master/texmf-dist/doc/latex/undolabl/undolabl.pdf Binary files differindex 7df146c8b0d..738d47c062d 100644 --- a/Master/texmf-dist/doc/latex/undolabl/undolabl.pdf +++ b/Master/texmf-dist/doc/latex/undolabl/undolabl.pdf diff --git a/Master/texmf-dist/source/latex/undolabl/undolabl.drv b/Master/texmf-dist/source/latex/undolabl/undolabl.drv index ce9f30801db..1e4a05b2b92 100644 --- a/Master/texmf-dist/source/latex/undolabl/undolabl.drv +++ b/Master/texmf-dist/source/latex/undolabl/undolabl.drv @@ -30,8 +30,11 @@ %% (Martin dot Muench at Uni-Bonn dot de). %% %% The main code of this package was invented by Ulrich Diez -%% (eu_angelion@web.de) in 2008 and published on the internet. -%% While Ulrich Diez neither wanted to create a package himself +%% (eu_angelion@web.de) and first published in the comp.text.tex +%% newsgroup at Sun, 20 Apr 2008 16:39:26 +0200, with subject: +%% Re: How to undefine/overwrite a label? (see e.g. +%% http://groups.google.de/group/comp.text.tex/msg/5ba8d4722e5cd326). +%% While Ulrich Diez neither wanted to create a package himself yet %% nor have one published under his name, he granted the %% publication of his code. Therefore: Thanks! %% @@ -41,7 +44,7 @@ %% undolabl-example.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/06/01] -\ProvidesFile{undolabl.drv}[2010/06/24 v1.0c% +\ProvidesFile{undolabl.drv}[2010/07/15 v1.0d% Overriding labels (HMM)]% \documentclass{ltxdoc}[2007/11/11]% v2.0u \usepackage{holtxdoc}[2010/04/18]% v0.19 @@ -52,7 +55,7 @@ %% recent version). %% Warning: holtxdoc, 2010/04/24 v0.19, requires the packages %% hypdoc, 2010/03/26, v1.9 -%% hyperref, 2010/03/30, v6.80u (latest: 2010/06/04 v6.81f) +%% hyperref, 2010/03/30, v6.80u (latest: 2010/06/18 v6.81g) %% pdftexcmds, 2010/04/01, v0.9 %% ltxcmds, 2010/03/09, v1.4 (latest: 2010/04/26, v1.7) %% hologo, 2010/04/24, v1.2 diff --git a/Master/texmf-dist/source/latex/undolabl/undolabl.dtx b/Master/texmf-dist/source/latex/undolabl/undolabl.dtx index a87d1d77bf1..35e2d9f84bc 100644 --- a/Master/texmf-dist/source/latex/undolabl/undolabl.dtx +++ b/Master/texmf-dist/source/latex/undolabl/undolabl.dtx @@ -1,16 +1,19 @@ % \iffalse meta-comment % % undolabl package -% file version: v1.0b -% file date: 2010/06/24 -% documentation date: 2010/06/24 +% file version: v1.0d +% file date: 2010/07/15 +% documentation date: 2010/07/15 % % Copyright (C) 2010 H.-Martin M\"{u}nch (Martin dot Muench at Uni-Bonn dot de) % Portions of code copyrighted by other people as marked. % -% The main code of this package was invented and published -% on the internet by Ulrich Diez (eu_angelion@web.de) in 2008. -% While Ulrich Diez neither wanted to create a package himself +% The main code of this package was invented by +% Ulrich Diez (eu_angelion@web.de) and first published in the +% comp.text.tex newsgroup at Sun, 20 Apr 2008 16:39:26 +0200, with subject: +% Re: How to undefine/overwrite a label? (see e.g. +% http://groups.google.de/group/comp.text.tex/msg/5ba8d4722e5cd326. +% While Ulrich Diez neither wanted to create a package himself yet % nor have one published under his name, he granted the % publication of his code. Therefore: Thanks! % @@ -91,7 +94,7 @@ \obeyspaces \Msg{******************************************************} \Msg{* Installation *} -\Msg{* Package: undolabl v1.0c 2010/06/24 LaTeX2e package *} +\Msg{* Package: undolabl v1.0d 2010/07/15 LaTeX2e package *} \Msg{* Overriding labels (HMM) *} \Msg{******************************************************} @@ -125,8 +128,11 @@ The Current Maintainer of this work is H.-Martin Muench (Martin dot Muench at Uni-Bonn dot de). The main code of this package was invented by Ulrich Diez -(eu_angelion@web.de) in 2008 and published on the internet. -While Ulrich Diez neither wanted to create a package himself +(eu_angelion@web.de) and first published in the comp.text.tex +newsgroup at Sun, 20 Apr 2008 16:39:26 +0200, with subject: +Re: How to undefine/overwrite a label? (see e.g. +http://groups.google.de/group/comp.text.tex/msg/5ba8d4722e5cd326). +While Ulrich Diez neither wanted to create a package himself yet nor have one published under his name, he granted the publication of his code. Therefore: Thanks! @@ -190,7 +196,7 @@ and the derived files % \begin{macrocode} %<*driver> \NeedsTeXFormat{LaTeX2e}[1994/06/01] -\ProvidesFile{undolabl.drv}[2010/06/24 v1.0c% +\ProvidesFile{undolabl.drv}[2010/07/15 v1.0d% Overriding labels (HMM)]% \documentclass{ltxdoc}[2007/11/11]% v2.0u \usepackage{holtxdoc}[2010/04/18]% v0.19 @@ -201,7 +207,7 @@ and the derived files %% recent version). %% Warning: holtxdoc, 2010/04/24 v0.19, requires the packages %% hypdoc, 2010/03/26, v1.9 -%% hyperref, 2010/03/30, v6.80u (latest: 2010/06/04 v6.81f) +%% hyperref, 2010/03/30, v6.80u (latest: 2010/06/18 v6.81g) %% pdftexcmds, 2010/04/01, v0.9 %% ltxcmds, 2010/03/09, v1.4 (latest: 2010/04/26, v1.7) %% hologo, 2010/04/24, v1.2 @@ -360,7 +366,7 @@ and the derived files % \DoNotIndex{\@ne,\tw@,\thr@@} % \DoNotIndex{\newpage,\pagebreak,\newline,\linebreak,\nolinebreak} % \DoNotIndex{\lipsum,\MessageBreak,\pageref,\protect} -% \DoNotIndex{\RecordChanges,\OnlyDescription} +% \DoNotIndex{\RecordChanges,\OnlyDescription,\ProvidesPackage} % \DoNotIndex{\smallskip,\medskip,\bigskip,\space,\thinspace} % \DoNotIndex{\item} % \DoNotIndex{\plainTeX,\TeX,\LaTeX,\pdfLaTeX} @@ -368,11 +374,11 @@ and the derived files % \DoNotIndex{\makeatletter,\makeatother,\footnote,\section} % % \title{The \textsf{undolabl} package\footnote{This file% -% has version number v1.0c, last% -% revised 2010/06/24, documentation dated 2010/06/24.}} +% has version number v1.0d, last% +% revised 2010/07/15, documentation dated 2010/07/15.}} % \author{H.-Martin M\"{u}nch\\ % (\texttt{Martin dot Muench at Uni-Bonn dot de})} -% \date{2010/06/24} +% \date{2010/07/15} % % \maketitle % @@ -381,10 +387,19 @@ and the derived files % especially automatically generated ones. % \end{abstract} % -% \noindent Note: The main code of this package was invented and -% published on the internet by \textbf{Ulrich Diez} -% (\texttt{eu\_angelion@web.de}) in 2008. -% While Ulrich Diez neither wanted to create a package himself +% \noindent \textbf{WARNING}: Since version 1.0d [2010/07/15] the |\undonewlabel| +% command takes only one argument, \texttt{\textbackslash undonewlabel\{<\textit{label name}>\}}, +% instead of two, \texttt{\textbackslash undonewlabel\{<\textit{label name}>\}\{\textbackslash on@line\}}. +% Packages or documents, which used older versions of the \textsf{undolabl} package, must be +% updated by removing the second argument of |\undonewlabel|, i.\,e. the |{\on@line}|.\\ +% +% \noindent Note: The main code of this package was invented by\\ +% \textbf{Ulrich Diez} (\texttt{eu\_angelion@web.de})\\ +% and first published in the \Newsgroup{comp.text.tex} newsgroup at\\ +% \texttt{Sun,~20~Apr~2008~16:39:26~+0200}, with subject:\\ +% \texttt{Re:~How~to~undefine/overwrite~a~label?} (see e.\,g.\\ +% \url{http://groups.google.de/group/comp.text.tex/msg/5ba8d4722e5cd326}).\\ +% While Ulrich Diez neither wanted to create a package himself yet % nor have one published under his name, he granted the % publication of his code. Therefore: Thanks! % I submitted this package to CTAN (after some updates of the @@ -404,6 +419,10 @@ and the derived files % $2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood: % Therefore please print only if this is really necessary. % +% \bigskip +% +% \pagebreak +% % \tableofcontents % % \newpage @@ -492,13 +511,13 @@ and the derived files % \begin{description} % \item[-] First you need to write to the |.aux| file to silently undefine % the associated |\r@<label>|-macro if it is already defined. -% That's why |\overridelabel| writes in terms of |\protected@write| +% That is why |\overridelabel| writes in terms of |\protected@write| % to the |.aux| file: % \begin{verbatim} -% \undonewlabel{<label>}{<code-line-number>} +% \undonewlabel{<label>} % \end{verbatim} -% |\undonewlabel| "undefines" the |\r@<label>|-macro. -% (How this works will be explained below.) +% |\undonewlabel| \textquotedblleft undefines\textquotedblright\ the +% |\r@<label>|-macro. (How this works will be explained below.) % % \item[-] Then |\overridelabel| can call |\label{<label>}| again % and thus produce another |\newlabel{<label>}|-entry to the @@ -511,11 +530,11 @@ and the derived files % |->| \r@<label>-macro gets produced. % % from the \overrridelabel-call: % % - call to \undonewlabel within \overrridelabel: -% \undonewlabel{<label>}{<code-line-number>} +% \undonewlabel{<label>} % |->| \r@<label>-macro gets destroyed. % % - call to \label within \overrridelabel: % \newlabel{<label>}{..} -% |->| a new \r@<label>-macro and no multiply-label-defined warning +% |->| a new \r@<label>-macro but no multiply-label-defined warning % gets produced. % \end{verbatim} % @@ -538,52 +557,21 @@ and the derived files % changed although that might not be a correct statement. % \end{description} % -% Ulrich Diez decided to catch this up by letting |\undonewlabel| "count" -% within the macro |\s@<label>| how many times the label was -% overridden. That means: Whenever |\r@<label>| is overridden, the -% definition of |\s@<label>| gets a character "i" attached. -% -% The |\@testdef|-comparison-mechanism gets enhanced via replacing\footnote{% -% "replacing" works as follows: When |.aux| file is read at the% -% beginning of the \LaTeX -run, |\@newl@bel| is \underline{not} let equal to% -% |\@testdef|. When |.aux| file is read at the end of the \LaTeX -run,% -% |\@newl@bel| \underline{is} let equal to |\@testdef|. Thus it is sufficient% -% to write into the beginning of the |.aux| file a direction which% -% leads to letting |\@newl@bel| equal to% -% \nolinebreak{\textbackslash |my@testdef|} in case its% -% definition equals |\@testdef|. That direction is called% -% \nolinebreak{"\textbackslash |reset@newl@bel|".}% -% Also, when the |.aux| file is read at the end of the \LaTeX -run,% -% \nolinebreak{\textbackslash |undonwelabel|}-entries therein should% -% do nothing, thus% -% \nolinebreak{\textbackslash |undonewlabel|} is let equal% -% to |\@gobbletwo|.} it by |\undolabl@testdef|: -% Before actually executing |\@testdef|, check whether\linebreak -% |\s@<label>| is defined and empty. If undefined or empty, -% perform |\@testdef|. If not empty, remove an "i" from its definition-text. -% This way it is ensured that only the last one of several -% |\newlabel{<label>}|-entries is used for the |\@testdef|-comparison. -% -% \begin{verbatim} -% \undonewlabel{<label>}{<code-line-number>} -% -> -% \@und@newl@bel rs{<label>}{<code-line-number>} -% -> -% % IF \r@<label> is undefined just \relax, otherwise: -% \@ifundefined{r@<label>}\relax{% -% % Inform via |.log| file about overriding the label: -% \@latex@warning@no@line{Label `<label>' overridden<code-line-number>}% -% % Undefine \r@label via letting it equal to \relax: -% \expandafter\global -% \expandafter\let -% \csname r@<label>\endcsname\relax -% % IF \s@label is undefined, define it to {i} ELSE -% % add another i to it via \g@addto@macro ENDIF: -% \@ifundefined{s@<label>}{\global\@namedef{s@<label>}{i}}{% -% \expandafter\g@addto@macro\csname s@<label>\endcsname{i}% -% }% -% }% -% \end{verbatim} +% Ulrich Diez decided to catch this up by his |\undolabl@testdef| command. +% The |\undolabl@testdef|-comparison-mechanism gets enhanced via +% \textquotedblleft replacing\textquotedblright . This works as follows: +% When |.aux| file is read at the beginning of the \LaTeX -run, |\@newl@bel| is +% \underline{not} let equal to |\@testdef|. When |.aux| file is read at the end +% of the \LaTeX -run, |\@newl@bel| \underline{is} let equal to |\@testdef|. Thus +% it is sufficient to write into the beginning of the |.aux| file a direction which +% leads to letting |\@newl@bel| equal to +% \nolinebreak{\textbackslash |my@testdef|} in case its +% definition equals |\@testdef|. That direction is called +% \nolinebreak{\textquotedblleft \textbackslash |reset@newl@bel|\textquotedblright .} +% Also, when the |.aux| file is read at the end of the \LaTeX -run, +% \nolinebreak{\textbackslash |undonwelabel|}-entries therein should +% do nothing, thus +% \nolinebreak{\textbackslash |undonewlabel|} is let equal to |\@gobble|. % % \section{Usage} % @@ -606,9 +594,9 @@ and the derived files %<*example> \documentclass[british]{article} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\usepackage{undolabl}[2010/06/24]% v1.0c +\usepackage{undolabl}[2010/07/15]% v1.0d %% There are no options for the undolabl package. %% -\usepackage{hyperref}[2010/06/04]% v6.81f; if you want to use nameref +\usepackage{hyperref}[2010/06/18]% v6.81g; if you want to use nameref \hypersetup{% extension=pdf,% plainpages=false,% @@ -616,20 +604,22 @@ and the derived files hyperindex=false,% pdflang={en},% pdftitle={undolabl package example},% - pdfauthor={Hans-Martin Muench},% + pdfauthor={Hans-Martin Muench, after Ulrich Dietz},% pdfsubject={Example for the undolabl package},% - pdfkeywords={LaTeX, undolabl, Hans-Martin Muench},% + pdfkeywords={LaTeX, undolabl, Ulrich Dietz, Hans-Martin Muench},% pdfview=FitH,% pdfstartview=FitH,% pdfpagelayout=OneColumn,% bookmarksopen=true% } \makeatletter -%% Code from tcilatex.tex, Macros for Scientific Word and Scientific WorkPlace 5.5 <06 Oct 2005> %% -%% Copyright (C) 2005 Mackichan Software, Inc. %% -%% That macro file is NOT proprietary and may be freely copied and distributed. %% +%% Code from tcilatex.tex, Macros for Scientific Word and %% +%% Scientific WorkPlace 5.5 <06 Oct 2005> %% +%% Copyright (C) 2005 Mackichan Software, Inc. %% +%% That macro file is NOT proprietary and may be freely copied %% +%% and distributed. %% \def\unit#1{\mathord{\thinspace\rm #1}}% -%% End of code from tcilatex.tex %% +%% End of code from tcilatex.tex %% \makeatother \listfiles \begin{document} @@ -637,15 +627,14 @@ and the derived files \section*{Example for undolabl} This example demonstrates the use of package\newline -\textsf{undolabl}, v1.0c as of 2010/06/24 (HMM).\newline -The used options were \texttt{linktextcolour=black}, -\texttt{backgroundcolour=white}, and \texttt{pdfborder={0 0 1}} -(the default ones).\newline -For more details please see the documentation!\newline +\textsf{undolabl}, v1.0d as of 2010/07/15 (HMM).\newline +For details please see the documentation!\newline -\noindent Save per page about $200\unit{ml}$ water, -$2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood:\newline +\noindent Save per page about $200\unit{ml}$~water, +$2\unit{g}$~CO$_{2}$ and $2\unit{g}$~wood:\newline Therefore please print only if this is really necessary.\newline +I do NOT think, that it is necessary to print THIS file, really\newline +(at least not after this page)! \bigskip @@ -687,7 +676,7 @@ name-reference: \nameref{testlabel}%% -> Still another test %</example> % \end{macrocode} % -% \pagebreak +% \bigskip % % \section{The implementation} % @@ -702,7 +691,7 @@ name-reference: \nameref{testlabel}%% -> Still another test % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/06/01] -\ProvidesPackage{undolabl}[2010/06/24 v1.0c +\ProvidesPackage{undolabl}[2010/07/15 v1.0d Overriding labels (HMM)] % \end{macrocode} @@ -710,15 +699,17 @@ name-reference: \nameref{testlabel}%% -> Still another test % \DescribeMacro{\overridelabel} % In order to override a label, first you need to write to the % |.aux| file to silently undefine the associated |\r@<label>|-macro -% if it is already defined. That's why |\overridelabel| writes in +% if it is already defined. That is why |\overridelabel| writes in % terms of |\protected@write| to the |.aux| file: -% |\undonewlabel{<label>}{<code-line-number>}|, -% "undefining" the |\r@<label>|-macro. +% |\undonewlabel{<label>}|, +% \textquotedblleft undefining\textquotedblright\ the |\r@<label>|-macro. +% And a message about this is given. % % \begin{macrocode} \newcommand\overridelabel[1]{% \@bsphack - \protected@write\@auxout{}{\string\undonewlabel{#1}{\on@line}}% + \protected@write\@auxout{}{\string\undonewlabel{#1}}% + \@overriddenmessage s{#1}% % \end{macrocode} % % Then |\overridelabel| can call |\label{<label>}| again @@ -728,54 +719,53 @@ name-reference: \nameref{testlabel}%% -> Still another test % \begin{macrocode} \label{#1}% \@esphack - }% + } % \end{macrocode} % % \DescribeMacro{\undonewlabel} % % \begin{macrocode} -\newcommand\undonewlabel{\@und@newl@bel rs}% +\newcommand\undonewlabel{\@und@newl@bel r}% % \end{macrocode} % % \DescribeMacro{\@und@newl@bel} % -% If |\r@<label>| is undefined, just |\relax| +% If |\r@<label>| is undefined, give an error message: % % \begin{macrocode} -\newcommand\@und@newl@bel[4]{% - \@ifundefined{#1@#3}\relax{% -% \end{macrocode} -% -% otherwise:\\ -% Inform via |.log| file about overriding the label: -% -% \begin{macrocode} - \@latex@warning@no@line{Label `#3' overridden#4}% +\newcommand\@und@newl@bel[2]{% + \@ifundefined{#1@#2}{% + \PackageError{undolabl}{Label `#2' shall be overridden ^^J + although it does not yet exist}{% + A label which does not exist cannot be overridden.}% + }{% % \end{macrocode} % +% \noindent otherwise:\\ % Undefine |\r@label| via letting it equal to |\relax|: % % \begin{macrocode} \expandafter\global \expandafter\let - \csname #1@#3\endcsname\relax + \csname #1@#2\endcsname\relax + }% + } + % \end{macrocode} % -% If |\s@label| is undefined, define it to |{i}| -% -% \begin{macrocode} - \@ifundefined{#2@#3}{\global\@namedef{#2@#3}{i}}{% -% \end{macrocode} +% \DescribeMacro{\@overriddenmessage} % -% else add another |i| to it via |\g@addto@macro|. +% Command for the notification of overriding a label: % % \begin{macrocode} - \expandafter\g@addto@macro\csname #2@#3\endcsname{i}% - }% +\newcommand\@overriddenmessage[2]{% + \@ifundefined{#1@#2}{\global\@namedef{#1@#2}{i}}{% + \expandafter\g@addto@macro\csname #1@#2\endcsname{i}% }% - }% + \PackageWarning{undolabl}{Label `#2' overridden} + } % \end{macrocode} % @@ -815,7 +805,7 @@ name-reference: \nameref{testlabel}%% -> Still another test \newcommand\reset@newl@bel{% \ifx\@newl@bel\@testdef \let\@newl@bel\undolabl@testdef - \let\undonewlabel\@gobbletwo + \let\undonewlabel\@gobble \fi }% % \end{macrocode} @@ -824,6 +814,8 @@ name-reference: \nameref{testlabel}%% -> Still another test %</package> % \end{macrocode} % +% \pagebreak +% % \section{Installation} % % \subsection{Downloads} @@ -860,12 +852,12 @@ name-reference: \nameref{testlabel}%% -> Still another test % \item[-] class \textsf{article}, 2007/10/19, v1.4h, from \textsf{classes.dtx}:\\ % \CTAN{macros/latex/base/classes.dtx} % -% \item[-] package \textsf{hyperref}, 2010/06/04, v6.81f,\\ +% \item[-] package \textsf{hyperref}, 2010/06/18, v6.81g,\\ % \CTAN{macros/latex/contrib/hyperref/},\\ % if |nameref| shall be used\\ % (and when the references shall be hyperlinked, of course) % -% \item[-] package \textsf{undolabl}, 2010/06/24, v1.0c,\\ +% \item[-] package \textsf{undolabl}, 2010/07/15, v1.0d,\\ % \CTAN{macros/latex/contrib/undolabl/undolabl.dtx}\\ % (Well, it is the example file for this package, and because you are reading the % documentation for the \textsf{undolabl} package, it can be assumed that you already @@ -882,7 +874,7 @@ name-reference: \nameref{testlabel}%% -> Still another test % \textbf{Warning}: holtxdoc, 2010/04/24 v0.19, requires the packages % \begin{description} % \item[-] hypdoc, 2010/03/26, v1.9 -% \item[-] hyperref, 2010/03/30, v6.80u (latest: 2010/06/04, v6.81f) +% \item[-] hyperref, 2010/03/30, v6.80u (latest: 2010/06/18, v6.81g) % \item[-] pdftexcmds, 2010/04/01, v0.9 % \item[-] ltxcmds, 2010/03/09, v1.4 (latest: 2010/04/26, v1.7) % \item[-] hologo, 2010/04/24, v1.2 @@ -895,13 +887,18 @@ name-reference: \nameref{testlabel}%% -> Still another test % and use this, because the packages in there should be both % recent and compatible.)\\ % +% \pagebreak +% % \DescribeMacro{M\"{u}nch} % Packages of mine:\\ % \begin{description} -% \item[undolabl] 2010/06/24, v1.0c, \CTAN{macros/latex/contrib/undolabl.dtx}\\ -% The package described in this very documentation. +% \item[undolabl] 2010/07/15, v1.0d, \CTAN{macros/latex/contrib/undolabl.dtx}\\ +% The package described in this very documentation.\\ +% (Code initally by Ulrich Dietz on \Newsgroup{comp.text.tex} at\\ +% \texttt{Mon,~21~Apr~2008~23:04:03~+0200}, see e.\,g.\\ +% \url{http://groups.google.de/group/comp.text.tex/msg/af6cfe93917097da}.) % -% \item[pagesLTS] 2010/06/24, v1.1c, \CTAN{macros/latex/contrib/pagesLTS.dtx}\\ +% \item[pagesLTS] 2010/07/15, v1.1d, \CTAN{macros/latex/contrib/pagesLTS.dtx}\\ % That package allows to refer to the (very) last page, gives the total number of % pages, references to special pages, facilitates the use of nearly any pagenumbering % you like (e.\,g. negative |Roman| numbers or more than |Z| pages with |Alph| page numbering), @@ -938,8 +935,8 @@ name-reference: \nameref{testlabel}%% -> Still another test % The example file. % \item[\CTAN{macros/latex/contrib/undolabl/undolabl-example.pdf}]\hspace*{0.1cm} \\ % The compiled example file, as it should look like. -% \item[\CTAN{install/macros/latex/contrib/undolabl/undolabl.tds.zip}]\hspace*{0.1cm} \\ -% Everything in TDS compliant, compiled format (submitted, should become available soon). +% \item[\CTAN{install/macros/latex/contrib/undolabl.tds.zip}]\hspace*{0.1cm} \\ +% Everything in TDS compliant, compiled format. % \end{description} % % For required other packages, see the preceding subsection. @@ -1085,13 +1082,20 @@ name-reference: \nameref{testlabel}%% -> Still another test %\end{verbatim} % \end{quote} % +% \pagebreak +% % \section{Acknowledgements} % -% I (H.-Martin M\"{u}nch) would like to thank -% \textbf{Ulrich Diez (\texttt{eu\_angelion@web.de})} -% for writing the main code of this package as well as for the -% permission to publish it on \CTAN{}. I also thank -% those anonymouse people who had published it on the internet. +% The main code of this package was invented by \textbf{Ulrich Diez} +% (\texttt{eu\_angelion@web.de}) and first published in the \Newsgroup{comp.text.tex} +% newsgroup at\\ +% \texttt{Sun,~20~Apr~2008~16:39:26~+0200}, with subject:\\ +% \texttt{Re:~How~to~undefine/overwrite~a~label?} (see e.\,g.\\ +% \url{http://groups.google.de/group/comp.text.tex/msg/5ba8d4722e5cd326}).\\ +% I (H.-Martin M\"{u}nch) would like to thank Ulrich Diez for this as well as +% for his permission to publish it on \CTAN{}. +% I also thank those anonymouse people who had published it somewhere else +% on the internet, where I found it first. % Further I would like to thank Heiko Oberdiek % (\texttt{heiko dot oberdiek at googlemail dot com}) for providing % a~lot~(!) of useful packages (from which I also got everything I @@ -1116,7 +1120,7 @@ name-reference: \nameref{testlabel}%% -> Still another test % better compatibility with other packages. % \item The main code of this package was invented in 2008 by Ulrich Diez % (\texttt{eu\_angelion@web.de}) and published on the internet. -% Because Ulrich Diez neither wanted to create a package himself +% Because Ulrich Diez neither wanted to create a package himself yet % nor have one published under his name, % but granted the publication of his code (Thanks!), % I had to change author/maintainer of this package and resubmit it. @@ -1134,6 +1138,15 @@ name-reference: \nameref{testlabel}%% -> Still another test % \item Updated references to other packages: \textsf{hyperref} and \textsf{pagesLTS}. % \item Added a list of my other packages. % \end{Version} +% \begin{Version}{2010/07/15 v1.0d} +% \item There was another update by Ulrich Dietz on \Newsgroup{comp.text.tex} at +% \texttt{Mon,~21~Apr~2008~23:04:03~+0200}, see e.\,g.\\ +% \url{http://groups.google.de/group/comp.text.tex/msg/af6cfe93917097da},\\ +% which was now included in this package. +% \item Put more emphasis on \textbf{Ulrich Dietz} writing the initial code. +% \item Updated references to other packages: \textsf{hyperref} and \textsf{pagesLTS}. +% \item Corrected the given location of the \textsf{undolabl.tds.zip} file at CTAN. +% \end{Version} % \end{History} % % % \PrintChanges @@ -1143,10 +1156,9 @@ name-reference: \nameref{testlabel}%% -> Still another test % When you find a mistake or have a suggestion for an improvement of this package, % please send an e-mail to the maintainer, thanks! (Please see BUG REPORTS in the README.) % -% \pagebreak +% \bigskip % % \PrintIndex % % \Finale -% \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/undolabl/undolabl.ins b/Master/texmf-dist/source/latex/undolabl/undolabl.ins index f4a00254c93..0ff49e4539c 100644 --- a/Master/texmf-dist/source/latex/undolabl/undolabl.ins +++ b/Master/texmf-dist/source/latex/undolabl/undolabl.ins @@ -30,8 +30,11 @@ %% (Martin dot Muench at Uni-Bonn dot de). %% %% The main code of this package was invented by Ulrich Diez -%% (eu_angelion@web.de) in 2008 and published on the internet. -%% While Ulrich Diez neither wanted to create a package himself +%% (eu_angelion@web.de) and first published in the comp.text.tex +%% newsgroup at Sun, 20 Apr 2008 16:39:26 +0200, with subject: +%% Re: How to undefine/overwrite a label? (see e.g. +%% http://groups.google.de/group/comp.text.tex/msg/5ba8d4722e5cd326). +%% While Ulrich Diez neither wanted to create a package himself yet %% nor have one published under his name, he granted the %% publication of his code. Therefore: Thanks! %% @@ -45,7 +48,7 @@ \obeyspaces \Msg{******************************************************} \Msg{* Installation *} -\Msg{* Package: undolabl v1.0c 2010/06/24 LaTeX2e package *} +\Msg{* Package: undolabl v1.0d 2010/07/15 LaTeX2e package *} \Msg{* Overriding labels (HMM) *} \Msg{******************************************************} @@ -79,8 +82,11 @@ The Current Maintainer of this work is H.-Martin Muench (Martin dot Muench at Uni-Bonn dot de). The main code of this package was invented by Ulrich Diez -(eu_angelion@web.de) in 2008 and published on the internet. -While Ulrich Diez neither wanted to create a package himself +(eu_angelion@web.de) and first published in the comp.text.tex +newsgroup at Sun, 20 Apr 2008 16:39:26 +0200, with subject: +Re: How to undefine/overwrite a label? (see e.g. +http://groups.google.de/group/comp.text.tex/msg/5ba8d4722e5cd326). +While Ulrich Diez neither wanted to create a package himself yet nor have one published under his name, he granted the publication of his code. Therefore: Thanks! diff --git a/Master/texmf-dist/tex/latex/undolabl/undolabl.sty b/Master/texmf-dist/tex/latex/undolabl/undolabl.sty index c1c9993cfc9..c57a9d683dd 100644 --- a/Master/texmf-dist/tex/latex/undolabl/undolabl.sty +++ b/Master/texmf-dist/tex/latex/undolabl/undolabl.sty @@ -30,8 +30,11 @@ %% (Martin dot Muench at Uni-Bonn dot de). %% %% The main code of this package was invented by Ulrich Diez -%% (eu_angelion@web.de) in 2008 and published on the internet. -%% While Ulrich Diez neither wanted to create a package himself +%% (eu_angelion@web.de) and first published in the comp.text.tex +%% newsgroup at Sun, 20 Apr 2008 16:39:26 +0200, with subject: +%% Re: How to undefine/overwrite a label? (see e.g. +%% http://groups.google.de/group/comp.text.tex/msg/5ba8d4722e5cd326). +%% While Ulrich Diez neither wanted to create a package himself yet %% nor have one published under his name, he granted the %% publication of his code. Therefore: Thanks! %% @@ -43,29 +46,37 @@ \NeedsTeXFormat{LaTeX2e}[1994/06/01] -\ProvidesPackage{undolabl}[2010/06/24 v1.0c +\ProvidesPackage{undolabl}[2010/07/15 v1.0d Overriding labels (HMM)] \newcommand\overridelabel[1]{% \@bsphack - \protected@write\@auxout{}{\string\undonewlabel{#1}{\on@line}}% + \protected@write\@auxout{}{\string\undonewlabel{#1}}% + \@overriddenmessage s{#1}% \label{#1}% \@esphack - }% + } -\newcommand\undonewlabel{\@und@newl@bel rs}% +\newcommand\undonewlabel{\@und@newl@bel r}% -\newcommand\@und@newl@bel[4]{% - \@ifundefined{#1@#3}\relax{% - \@latex@warning@no@line{Label `#3' overridden#4}% +\newcommand\@und@newl@bel[2]{% + \@ifundefined{#1@#2}{% + \PackageError{undolabl}{Label `#2' shall be overridden ^^J + although it does not yet exist}{% + A label which does not exist cannot be overridden.}% + }{% \expandafter\global \expandafter\let - \csname #1@#3\endcsname\relax - \@ifundefined{#2@#3}{\global\@namedef{#2@#3}{i}}{% - \expandafter\g@addto@macro\csname #2@#3\endcsname{i}% - }% + \csname #1@#2\endcsname\relax }% - }% + } + +\newcommand\@overriddenmessage[2]{% + \@ifundefined{#1@#2}{\global\@namedef{#1@#2}{i}}{% + \expandafter\g@addto@macro\csname #1@#2\endcsname{i}% + }% + \PackageWarning{undolabl}{Label `#2' overridden} + } \newcommand\undolabl@testdef[3]{% \@ifundefined{s@#2}\@secondoftwo\@firstofone{% @@ -90,7 +101,7 @@ \newcommand\reset@newl@bel{% \ifx\@newl@bel\@testdef \let\@newl@bel\undolabl@testdef - \let\undonewlabel\@gobbletwo + \let\undonewlabel\@gobble \fi }% \endinput |