% \iffalse meta-comment % % undolabl package % file version: v1.0b % file date: 2010/06/24 % documentation date: 2010/06/24 % % 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 % 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 % and the derived files % undolabl.sty, undolabl.pdf, undolabl.ins, undolabl.drv, % undolabl-example.tex. % % Unpacking: % (a) If undolabl.ins is present: % tex undolabl.ins % (b) Without undolabl.ins: % tex undolabl.dtx % (c) If you insist on using LaTeX % latex \let\install=y\input{undolabl.dtx} % (quote the arguments according to the demands of your shell) % % Documentation: % (a) If undolabl.drv is present: % (pdf)latex undolabl.drv % makeindex -s gind.ist undolabl.idx % (pdf)latex undolabl.drv % makeindex -s gind.ist undolabl.idx % (pdf)latex undolabl.drv % (b) Without undolabl.drv: % (pdf)latex undolabl.dtx % makeindex -s gind.ist undolabl.idx % (pdf)latex undolabl.dtx % makeindex -s gind.ist undolabl.idx % (pdf)latex undolabl.dtx % % The class ltxdoc loads the configuration file ltxdoc.cfg % if available. Here you can specify further options, e.g. % use DIN A4 as paper format: % \PassOptionsToClass{a4paper}{article} % % Programm calls to get the documentation (for example): % pdflatex undolabl.dtx % makeindex -s gind.ist undolabl.idx % % makeindex -s gglo.ist -o undolabl.gls undolabl.glo % pdflatex undolabl.dtx % makeindex -s gind.ist undolabl.idx % % makeindex -s gglo.ist -o undolabl.gls undolabl.glo % pdflatex undolabl.dtx % % Installation: % TDS:tex/latex/muench/undolabl/undolabl.sty % TDS:doc/latex/muench/undolabl/undolabl.pdf % TDS:doc/latex/muench/undolabl/undolabl-example.tex % TDS:source/latex/muench/undolabl/undolabl.dtx % %<*ignore> \begingroup \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 \obeyspaces \Msg{******************************************************} \Msg{* Installation *} \Msg{* Package: undolabl v1.0c 2010/06/24 LaTeX2e package *} \Msg{* Overriding labels (HMM) *} \Msg{******************************************************} \keepsilent \askforoverwritefalse \let\MetaPrefix\relax \preamble This is a generated file. IMPORTANT NOTICE: The usual disclaimers apply: 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 (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 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 and the derived files undolabl.sty, undolabl.pdf, undolabl.ins, undolabl.drv, undolabl-example.tex. \endpreamble \let\MetaPrefix\DoubleperCent \generate{% \file{undolabl.ins}{\from{undolabl.dtx}{install}}% \file{undolabl.drv}{\from{undolabl.dtx}{driver}}% \file{ltxdoc.cfg}{\from{undolabl.dtx}{ltxdoc}}% \usedir{tex/latex/muench/undolabl}% \file{undolabl.sty}{\from{undolabl.dtx}{package}}% \usedir{doc/latex/muench/undolabl}% \file{undolabl-example.tex}{\from{undolabl.dtx}{example}}% } \obeyspaces \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.dtx *} \Msg{* makeindex -s gind.ist undolabl.idx *} \Msg{* pdflatex undolabl.dtx *} \Msg{* makeindex -s gind.ist undolabl.idx *} \Msg{* pdflatex undolabl.dtx *} \Msg{* *} \Msg{* At least two 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}[1994/06/01] \ProvidesFile{undolabl.drv}[2010/06/24 v1.0c% Overriding labels (HMM)]% \documentclass{ltxdoc}[2007/11/11]% v2.0u \usepackage{holtxdoc}[2010/04/18]% v0.19 %% 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). %% 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) %% pdftexcmds, 2010/04/01, v0.9 %% ltxcmds, 2010/03/09, v1.4 (latest: 2010/04/26, v1.7) %% hologo, 2010/04/24, v1.2 %% array (latest: 2008/09/09, v2.4c) %% (or more recent versions) and does neither work with %% nor check for earlier versions! \hypersetup{% pdfsubject={LaTeX2e package for overriding labels (HMM)},% pdfkeywords={LaTeX, undolabl, undolabel, undo label, label, override, Hans-Martin Muench},% pdfencoding=auto,% pdflang={en},% breaklinks=true,% linktoc=all,% pdfstartview=FitH,% pdfpagelayout=OneColumn,% bookmarksnumbered=true,% bookmarksopen=true,% bookmarksopenlevel=2,% pdfmenubar=true,% pdftoolbar=true,% pdfwindowui=true,% pdfnewwindow=true% } \setlength\hfuzz{1pt} % Ignore slight overfulls. \CodelineIndex %\PageIndex % instead of \CodelineIndex to get the page numbers \EnableCrossrefs %\DisableCrossrefs % Say \DisableCrossrefs if index is ready. %\RecordChanges % Gather update information. %\OnlyDescription % Comment out for implementation details. \hyphenation{docu-ment} \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. %% \def\unit#1{\mathord{\thinspace\rm #1}}% %% End of code from tcilatex.tex %% \makeatother \begin{document} \DocInput{undolabl.dtx}% \end{document} % % \end{macrocode} % % \begin{macrocode} %<*ltxdoc> \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesFile{ltxdoc.cfg}[2010/06/01 v1.0 configuration file for undolabl (HMM)] %% Code from original ltxdoc.cfg [2007/01/08 latex-tds: ltxdoc.cls configuration (HO)], %% % copyrighted 2006, 2007 Heiko Oberdiek, part of project `latex-tds'. % That file may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % 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. % That work has the LPPL maintenance status `maintained'. % The Current Maintainer of that work is Heiko Oberdiek. % \PassOptionsToClass{a4paper}{article} \AtEndOfClass{% \RequirePackage[numbered]{hypdoc}[2010/03/26]% v1.9 \pdfstringdefDisableCommands{% \let\env\relax % longtable.dtx \let\mytt\relax % tabularx.dtx }% \addtolength{\topmargin}{-10mm}% \addtolength{\textheight}{20mm}% % Depending on the page style, the head or foot area % are put into the text area. % Usually the page style is the default "plain". % tools/verbatim.dtx uses "myheadings". \def\string@plain{plain}% \def\string@myheadings{myheadings}% \def\current@pagestyle{plain}% \let\ltxdoc@cfg@pagestyle\pagestyle \def\pagestyle#1{% \def\current@pagestyle{#1}% \ltxdoc@cfg@pagestyle{#1}% }% \edef\ltxdoc@cfg@jobname{\jobname}% \def\ltxdoc@cfg@longtable{longtable}% \@onelevel@sanitize\ltxdoc@cfg@longtable \ifx\ltxdoc@cfg@jobname\ltxdoc@cfg@longtable \def\current@pagestyle{both}% \fi \let\ltxdoc@cfg@document\document \def\document{% \ifx\current@pagestyle\string@plain \addtolength{\textheight}{\headheight}% \addtolength{\textheight}{\headsep}% \setlength{\headheight}{0pt}% \setlength{\headsep}{0pt}% \global\textheight\textheight \global\headheight\headheight \global\headsep\headsep \fi \ifx\current@pagestyle\string@myheadings \addtolength{\textheight}{\footskip}% \global\textheight\textheight \fi \ltxdoc@cfg@document }% %% End of code from original ltxdoc.cfg [2007/01/08 latex-tds: ltxdoc.cls configuration (HO)] %% %% Place additional code here. %% } % % \end{macrocode} % % \fi % % \CheckSum{0} % % \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{\documentclass,\usepackage,\hfuzz,\small,\tt,\begin,\end} % \DoNotIndex{\NeedsTeXFormat,\filedate,\fileversion,\DoNotIndex} % \DoNotIndex{\def,\edef,\gdef,\divide,\advance,\multiply} % \DoNotIndex{\",\-,\,,\\,\hskip,\H,\ldots,\indent,\noindent,\textbackslash} % \DoNotIndex{\textbf,\textit,\textquotedblleft,\textquotedblright,\textsf,\texttt} % \DoNotIndex{\ifthenelse,\and,\equal,\whiledo,\if,\ifx,\ifnum,\else,\fi} % \DoNotIndex{\CodelineIndex,\EnableCrossrefs,\DisableCrossrefs} % \DoNotIndex{\DocInput,\AltMacroFont} % \DoNotIndex{\@ne,\tw@,\thr@@} % \DoNotIndex{\newpage,\pagebreak,\newline,\linebreak,\nolinebreak} % \DoNotIndex{\lipsum,\MessageBreak,\pageref,\protect} % \DoNotIndex{\RecordChanges,\OnlyDescription} % \DoNotIndex{\smallskip,\medskip,\bigskip,\space,\thinspace} % \DoNotIndex{\item} % \DoNotIndex{\plainTeX,\TeX,\LaTeX,\pdfLaTeX} % \DoNotIndex{\holtxdoc,\hypdoc,\Oberdiek} % \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.}} % \author{H.-Martin M\"{u}nch\\ % (\texttt{Martin dot Muench at Uni-Bonn dot de})} % \date{2010/06/24} % % \maketitle % % \begin{abstract} % This package allows to override existing labels, % 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 % 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.) % % \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 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. % % \tableofcontents % % \newpage % % \section{Introduction\label{sec:Introduction}} % % 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 |.aux| file is issued and you find in the |.aux| file something % like: % \begin{verbatim} % \newlabel{foo}{{}{}{}} % \end{verbatim} % During the beginning of the next \LaTeX -run, the |.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@