% \iffalse meta-comment % % File: undolabl.dtx % Version: 2024-12-05 v1.0n % Info: Overriding labels % % Copyright © 2010 - 2024 by % H.-Martin Münch % 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. % https://groups.google.com/g/comp.text.tex/c/MBiR-EpPceo/m/2pdwkZP-bK8J % ). 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 % https://www.latex-project.org/lppl/lppl-1-3c.txt % and the latest version of this license is in % https://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 Münch. % % 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: % https://mirror.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 2024-12-05 v1.0n Overriding labels (HMM)*} \Msg{*************************************************************} \keepsilent \askforoverwritefalse \let\MetaPrefix\relax \preamble This is a generated file. Project: undolabl Version: 2024-12-05 v1.0n Copyright (C) 2010 - 2024 by H.-Martin Muench Portions of code copyrighted by other people as marked. 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 https://www.latex-project.org/lppl/lppl-1-3c.txt and the latest version of this license is in https://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. https://groups.google.com/g/comp.text.tex/c/MBiR-EpPceo/m/2pdwkZP-bK8J ). 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}[2024-06-01] \ProvidesFile{undolabl.drv}% [2024-12-05 v1.0n Overriding labels (HMM)] \documentclass{ltxdoc}[2024/02/08]% v2.1j \usepackage{holtxdoc}[2019/12/09]% v0.30 \hypersetup{% pdfsubject={Overriding labels (HMM)},% pdfkeywords={LaTeX, undolabl, undolabel, undo label, label, override},% 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} \begin{document} \DocInput{undolabl.dtx}% \end{document} % % \end{macrocode} % \fi % % \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{\@auxout,\@bsphack,\@esphack,\@firstofone,\@gobble,\@ifl@t@r,\@ifundefined,% % \@namedef,\@secondoftwo,\\,\AddToHook,\begin,\begindocument,\bigskip,% % \csname,\documentclass,\empty,\end,\endcsname,\endinput,\fmtversion,\g@addto@macro,% % \holtxdoc,\hypdoc,\hyperref,\if@filesw,\IfFormatAtLeastTF,\IfPackageAtLeastF,% % \IfPackageLoadedT,\IfPackageLoadedTF,\ifx,\label,\listfiles,\MessageBreak,\nameref,% % \NeedsTeXFormat,\newcommand,\newline,\newpage,\PackageError,\PackageWarning,% % \pagenumbering,\pageref,\par,\ProvidesPackage,\ref,\section,\space,\textsf,% % \usepackage} % % \title{The \xpackage{undolabl} package} % \date{2024-12-05 v1.0n} % \author{H.-Martin Mü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,\newline % \texttt{\textbackslash undonewlabel\{<\textit{label name}>\}},\newline % instead of two,\newline % \texttt{\textbackslash undonewlabel\{<\textit{label name}>\}\{\textbackslash on@line\}}.\newline % 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}|. % \bigskip % % \noindent Note: The main code of this package was invented by\newline % \textbf{ULRICH DIEZ}\newline % and first published in the \Newsgroup{comp.text.tex} newsgroup at\newline % \texttt{Sun,~20~Apr~2008~16:39:26~+0200}, with subject:\newline % \texttt{Re:~How~to~undefine/overwrite~a~label?} (see e.\,g.~% % \url{https://groups.google.com/g/comp.text.tex/c/MBiR-EpPceo/m/2pdwkZP-bK8J}% % ).\newline % 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 having 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 those pages. % \newpage % \tableofcontents % % \section{Introduction\label{sec:Introduction}} % \indent The package's name \texttt{undolabl} is an eight-letter % abbreviation for the phrases ``undo'' and ``label''.\bigskip % % This package allows to override existing labels, % especially automatically generated ones.\bigskip % % 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}{{eval(\@currentlabel)}{eval(\thepage)}% % {eval(\@currentlabelname)}{eval(\@currentHref)}{% % eval(\@kernel@reserved@label@data)}} % \end{verbatim} % (in one line). During the beginning of the next \LaTeX{}-run, % the \xfile{.aux} file will be read and |\newlabel{FOO}{...}| is expanded to % |\@newl@bel r{FOO}{...}|, which in turn gets expanded to something % like (pseudo code): % \newpage % \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} % % \begin{description} % \item[-] At the beginning of the \LaTeX{}-run, all the |\r@