% \iffalse meta-comment % % File: undolabl.dtx % Version: 2015/03/29 v1.0l % % Copyright (C) 2010 - 2015 by % H.-Martin M"unch % Portions of code copyrighted by other people as marked. % % The main code of this package was invented by Ulrich Diez % 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/af6cfe93917097da?dmode=source % ). 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! % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either % version 1.3c of this license or (at your option) any later % version. This version of this license is in % http://www.latex-project.org/lppl/lppl-1-3c.txt % and the latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3c or later is part of all distributions of % LaTeX version 2005/12/01 or later. % % This work has the LPPL maintenance status "maintained". % % The Current Maintainer of this work is H.-Martin Muench. % % This work consists of the main source file undolabl.dtx, % the README, and the derived files % undolabl.sty, undolabl.pdf, % undolabl.ins, undolabl.drv, % undolabl-example.tex, undolabl-example.pdf. % % 'undolabl' is available on CTAN: % https://www.ctan.org/pkg/undolabl % % Also a TDS.ZIP file is provided that contains all the files % already sorted in a TDS tree: % http://mirrors.ctan.org/install/macros/latex/contrib/undolabl.tds.zip % %<*ignore> \begingroup \catcode123=1 % \catcode125=2 % \def\x{LaTeX2e}% \expandafter\endgroup \ifcase 0\ifx\install y1\fi\expandafter \ifx\csname processbatchFile\endcsname\relax\else1\fi \ifx\fmtname\x\else 1\fi\relax \else\csname fi\endcsname % %<*install> \input docstrip.tex \Msg{************************************************************} \Msg{* Installation} \Msg{* Package: undolabl 2015/03/29 v1.0l Overriding labels (HMM)} \Msg{************************************************************} \keepsilent \askforoverwritefalse \let\MetaPrefix\relax \preamble This is a generated file. Project: undolabl Version: 2015/03/29 v1.0l Copyright (C) 2010 - 2015 by H.-Martin M"unch Portions of code copyrighted by other people as marked. The usual disclaimer applies: If it doesn't work right that's your problem. (Nevertheless, send an e-mail to the maintainer when you find an error in this package.) This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or (at your option) any later version. This version of this license is in http://www.latex-project.org/lppl/lppl-1-3c.txt and the latest version of this license is in http://www.latex-project.org/lppl.txt and version 1.3c or later is part of all distributions of LaTeX version 2005/12/01 or later. This work has the LPPL maintenance status "maintained". The Current Maintainer of this work is H.-Martin Muench. The main code of this package was invented by Ulrich Diez (eu_angelion AT web DOT 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/af6cfe93917097da?dmode=source ). 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! This work consists of the main source file undolabl.dtx, the README, and the derived files undolabl.sty, undolabl.pdf, undolabl.ins, undolabl.drv, undolabl-example.tex, undolabl-example.pdf. In memoriam Claudia Simone Barth + 1996/01/30 Tommy Muench + 2014/01/02 Hans-Klaus Muench + 2014/08/24 \endpreamble \let\MetaPrefix\DoubleperCent \generate{% \file{undolabl.ins}{\from{undolabl.dtx}{install}}% \file{undolabl.drv}{\from{undolabl.dtx}{driver}}% \usedir{tex/latex/undolabl}% \file{undolabl.sty}{\from{undolabl.dtx}{package}}% \usedir{doc/latex/undolabl}% \file{undolabl-example.tex}{\from{undolabl.dtx}{example}}% } \catcode32=13\relax% active space \let =\space% \Msg{************************************************************************} \Msg{*} \Msg{* To finish the installation you have to move the following} \Msg{* file into a directory searched by TeX:} \Msg{*} \Msg{* undolabl.sty} \Msg{*} \Msg{* To produce the documentation run the file `undolabl.drv'} \Msg{* through (pdf)LaTeX, e.g.} \Msg{* pdflatex undolabl.drv} \Msg{* makeindex -s gind.ist undolabl.idx} \Msg{* pdflatex undolabl.drv} \Msg{* makeindex -s gind.ist undolabl.idx} \Msg{* pdflatex undolabl.drv} \Msg{*} \Msg{* At least three runs are necessary e.g. to get the} \Msg{* references right!} \Msg{*} \Msg{* Happy TeXing!} \Msg{*} \Msg{************************************************************************} \endbatchfile % %<*ignore> \fi % % % \section{The documentation driver file} % % The next bit of code contains the documentation driver file for % \TeX , i.\,e., the file that will produce the documentation you % are currently reading. It will be extracted from this file by the % \texttt{docstrip} programme. That is, run \LaTeX{} on \texttt{docstrip} % and specify the \texttt{driver} option when \texttt{docstrip} % asks for options. % % \begin{macrocode} %<*driver> \NeedsTeXFormat{LaTeX2e}[2014/05/01] \ProvidesFile{undolabl.drv}% [2015/03/29 v1.0l Overriding labels (HMM)] \documentclass{ltxdoc}[2014/09/29]% v2.0u \usepackage{holtxdoc}[2012/03/21]% v0.24 %% undolabl may work with earlier versions of LaTeX2e and those %% class and package, but this was not tested. %% Please consider updating your LaTeX, class, and package %% to the most recent version (if they are not already the most %% recent version). \hypersetup{% pdfsubject={LaTeX2e package for overriding labels (HMM)},% pdfkeywords={LaTeX, undolabl, undolabel, undo label, label, override, H.-Martin Muench},% pdfencoding=auto,% pdflang={en},% breaklinks=true,% linktoc=all,% pdfstartview=FitH,% pdfpagelayout=OneColumn,% bookmarksnumbered=true,% bookmarksopen=true,% bookmarksopenlevel=3,% pdfmenubar=true,% pdftoolbar=true,% pdfwindowui=true,% pdfnewwindow=true% } \CodelineIndex \hyphenation{docu-ment} \gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}% \begin{document} \DocInput{undolabl.dtx}% \end{document} % % \end{macrocode} % % \fi % % \CheckSum{107} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z % Digits \0\1\2\3\4\5\6\7\8\9 % Exclamation \! Double quote \" Hash (number) \# % Dollar \$ Percent \% Ampersand \& % Acute accent \' Left paren \( Right paren \) % Asterisk \* Plus \+ Comma \, % Minus \- Point \. Solidus \/ % Colon \: Semicolon \; Less than \< % Equals \= Greater than \> Question mark \? % Commercial at \@ Left bracket \[ Backslash \\ % Right bracket \] Circumflex \^ Underscore \_ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % % \GetFileInfo{undolabl.drv} % % \begingroup % \def\x{\#,\$,\^,\_,\~,\ ,\&,\{,\},\%}% % \makeatletter % \@onelevel@sanitize\x % \expandafter\endgroup % \expandafter\DoNotIndex\expandafter{\x} % \expandafter\DoNotIndex\expandafter{\string\ } % \begingroup % \makeatletter % \lccode`9=32\relax % \lowercase{%^^A % \edef\x{\noexpand\DoNotIndex{\@backslashchar9}}%^^A % }%^^A % \expandafter\endgroup\x % % \DoNotIndex{\",\-,\,,\\,\noindent} % \DoNotIndex{\documentclass,\usepackage,\ProvidesPackage,\begin,\end} % \DoNotIndex{\MessageBreak} % \DoNotIndex{\NeedsTeXFormat,\DoNotIndex,\verb} % \DoNotIndex{\def,\edef,\gdef,\global} % \DoNotIndex{\ifx,\listfiles,\mathord,\mathrm} % \DoNotIndex{\kvoptions,\SetupKeyvalOptions,\ProcessKeyvalOptions} % \DoNotIndex{\bigskip,\space,\thinspace,\ldots} % \DoNotIndex{\indent,\noindent,\newline,\linebreak,\pagebreak,\newpage} % \DoNotIndex{\textbf,\textit,\textsf,\texttt,\textsc,\textquotedblleft,\textquotedblright} % \DoNotIndex{\plainTeX,\TeX,\LaTeX,\pdfLaTeX} % \DoNotIndex{\chapter,\section} % \DoNotIndex{\Large} % % \title{The \xpackage{undolabl} package} % \date{2015/03/29 v1.0l} % \author{H.-Martin M\"{u}nch\\\xemail{Martin.Muench at Uni-Bonn.de}} % % \maketitle % % \begin{abstract} % \noindent This \LaTeX{} package allows to override existing labels, % especially automatically generated ones. % \end{abstract} % % \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 \xpackage{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}\\ % 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/af6cfe93917097da?dmode=source}% % ).\\ % While \textbf{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 documentation, % mainly layout, typos and such things) and try to maintain it. % % \bigskip % % \noindent Disclaimer for web links: The author is not responsible for any contents % referred to in this work unless he has full knowledge of illegal contents. % If any damage occurs by the use of information presented there, only the % author of the respective pages might be liable, not the one who has referred % to these pages. % % \bigskip % % \noindent {\color{green} Save per page about $200\unit{ml}$ water, % $2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood:\\ % Therefore please print only if this is really necessary.} % % \newpage % % \tableofcontents % % \newpage % % \section{Introduction\label{sec:Introduction}} % % \indent The package's name \texttt{undolabl} is an eight-letter % abbreviation for the phrases ``undo'' and ``label''.\\ % % This package allows to override existing labels, % especially automatically generated ones.\\ % % When an instance of the |\label|-macro occurs in the document\linebreak % (e.\,g.~|\label{foo}|), then a delayed |\write| (a~write which is % performed at shipout-time when the page-number is determined) to % the \xfile{.aux} file is issued and you find in the \xfile{.aux} file % something like: % \begin{verbatim} % \newlabel{foo}{{}{}{}} % \end{verbatim} % During the beginning of the next \LaTeX{}-run, the \xfile{.aux} file will be % read and % \begin{verbatim} % \newlabel{foo}{{}{}{}} % \end{verbatim} % is expanded to % \begin{verbatim} % \@newl@bel r{foo}{{}{}{}} % \end{verbatim} % which in turn gets expanded to something like (pseudo code): % \begin{verbatim} % IF (macro \r@foo is already defined) % THEN % - Issue an error-message, % - Make sure that the multiply-defined-labels-warning occurs % in the log-file % ELSE % \def\r@foo{{}{}{}} % ENDIF % \end{verbatim} % % Referencing works as follows:\\ % |\ref{foo}| |->| % \begin{description} % \item[-] expand |\r@foo|: |{}{}{}| % % \item[-] grab the second from the resulting arguments: || % \end{description} % |\pageref{foo}| |->| % \begin{description} % \item[-] expand |\r@foo|: |{}{}{}| % % \item[-] grab the first from the resulting arguments: || % \end{description} % Back to the |\label|-mechanism: % \begin{description} % \item[-] At the beginning of the \LaTeX{}-run, all the |\r@