1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
|
% \iffalse meta-comment
%
% Copyright (C) 2008 by Brian Amberg <latex@brian-amberg.de>
% -------------------------------------------------------
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.2
% 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.2 or later is part of all distributions of LaTeX
% version 1999/12/01 or later.
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{dprogress.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{dprogress}
%<*package>
[2008/02/21 v0.1 .dtx dprogress]
%</package>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{dprogress}[2008/02/21]
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
\DocInput{dprogress.dtx}
\PrintChanges
\PrintIndex
\end{document}
%</driver>
% \fi
%
% \CheckSum{139}
%
% \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 \~}
%
%
% \changes{v0.1}{2008/02/21}{Initial version}
%
% \GetFileInfo{dprogress.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
%
% \title{The \textsf{dprogress} package\thanks{This document
% corresponds to \textsf{dprogress}~\fileversion, dated \filedate.}}
% \author{Brian Amberg\\ \texttt{latex@brian-amberg.de}}
%
% \maketitle
%
% \section{Installation}
% \begin{enumerate}
% \item \verb|pdflatex dprogress.ins|
% \item \verb|pdflatex dprogress.dtx|
% \item Copy the generated file \verb|dprogress.sty| into a directory where
% latex can find it.
% \end{enumerate}
%
%
% \section{Introduction}
%
% This package logs latex's dprogress through the file, making the latex output
% more verbose. This helps to make latex debugging easier, as it is simpler to
% find where exactly latex failed.
% It outputs the typesetting of section, subsection, subsubsection headers and
% the align environment. The align environment is only output if the amsmath
% package is loaded.
%
% \section{Usage}
%
% Use\\
% \verb|\usepackage{dprogress}|\\
% as the last include, and read the latex output.
%
% \StopEventually{}
%
% \section{Implementation}
%
%\begin{macro}{\dprogress@Display}
% A macro to typeout a header in a very obtrusive style
% \begin{macrocode}
\newcommand{\dprogress@Display}[3]{%
\typeout{#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1}%
\typeout{#1 #2: #3}%
\typeout{}
}
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\align}
% Redefinition of the amsmath displayed equation environment. Output the equation number.
% \begin{macrocode}
\ifdefined\align
\message{\string\foo\space is defined}%
\let\dprogress@OldAlign\align
\renewcommand{\align}{%
\typeout{}%
\typeout{= Equation: \theequation}%
\typeout{}%
\dprogress@OldAlign%
}
\else
\message{Progress: the align command is not defined, not overriding. If you use amsmath, be sure to include dprogress as the last file}%
\fi
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\part}
% Redefinition of the \verb|\part| command. Output the section number and title.
% \begin{macrocode}
\ifdefined\part
\let\dprogress@OldPart\part
\renewcommand{\part}{%
\@ifstar
\dprogress@DisplayPartStar%
\dprogress@DisplayPartNoStar%
}
\newcommand{\dprogress@DisplayPartNoStar}[1]{%
\dprogress@Display{*}{Part \thepart}{#1}
\dprogress@OldPart{#1}%
}
\newcommand{\dprogress@DisplayPartStar}[1]{%
\dprogress@Display{*}{Part \thepart}{#1}
\dprogress@OldPart*{#1}%
}
\else
\message{Progress: the part command is not defined, not overriding. Be sure to include dprogress as the last file, if your document uses this command.}%
\fi
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\chapter}
% Redefinition of the \verb|\chapter| command. Output the section number and title.
% \begin{macrocode}
\ifdefined\chapter
\let\dprogress@OldChapter\chapter
\renewcommand{\chapter}{%
\@ifstar
\dprogress@DisplayChapterStar%
\dprogress@DisplayChapterNoStar%
}
\newcommand{\dprogress@DisplayChapterNoStar}[1]{%
\dprogress@Display{*}{Chapter \thechapter}{#1}
\dprogress@OldChapter{#1}%
}
\newcommand{\dprogress@DisplayChapterStar}[1]{%
\dprogress@Display{*}{Chapter \thechapter}{#1}
\dprogress@OldChapter*{#1}%
}
\else
\message{Progress: the chapter command is not defined, not overriding. Be sure to include dprogress as the last file, if your document uses this command.}%
\fi
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\section}
% Redefinition of the \verb|\section| command. Output the section number and title.
% \begin{macrocode}
\ifdefined\section
\let\dprogress@OldSection\section
\renewcommand{\section}{%
\@ifstar
\dprogress@DisplaySectionStar%
\dprogress@DisplaySectionNoStar%
}
\newcommand{\dprogress@DisplaySectionNoStar}[1]{%
\dprogress@Display{*}{Section \thesection}{#1}
\dprogress@OldSection{#1}%
}
\newcommand{\dprogress@DisplaySectionStar}[1]{%
\dprogress@Display{*}{Section \thesection}{#1}
\dprogress@OldSection*{#1}%
}
\else
\message{Progress: the section command is not defined, not overriding. Be sure to include dprogress as the last file, if your document uses this command.}%
\fi
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\section}
% Redefinition of the \verb|\subsection| command. Output the section number and title.
% \begin{macrocode}
\ifdefined\subsection
\let\dprogress@OldSubSection\subsection
\renewcommand{\subsection}{\@ifstar
\dprogress@DisplaySubSectionStar%
\dprogress@DisplaySubSectionNoStar%
}
\newcommand{\dprogress@DisplaySubSectionNoStar}[1]{%
\dprogress@Display{+}{Subsection \thesubsection}{#1}
\dprogress@OldSubSection{#1}%
}
\newcommand{\dprogress@DisplaySubSectionStar}[1]{%
\dprogress@Display{+}{Subsection \thesubsection}{#1}
\dprogress@OldSubSection*{#1}%
}
\else
\message{Progress: the subsection command is not defined, not overriding. Be sure to include dprogress as the last file, if your document uses this command.}%
\fi
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\section}
% Redefinition of the \verb|\subsubsection| command. Output the section number and title.
% \begin{macrocode}
\ifdefined\subsubsection
\let\dprogress@OldSubSubSection\subsubsection
\renewcommand{\subsubsection}{\@ifstar
\dprogress@DisplaySubSubSectionStar%
\dprogress@DisplaySubSubSectionNoStar%
}
\newcommand{\dprogress@DisplaySubSubSectionNoStar}[1]{%
\dprogress@Display{-}{Subsubsection \thesubsection}{#1}
\dprogress@OldSubSubSection{#1}%
}
\newcommand{\dprogress@DisplaySubSubSectionStar}[1]{%
\dprogress@Display{-}{Subsubsection \thesubsection}{#1}
\dprogress@OldSubSubSection*{#1}%
}
\else
\message{Progress: the subsubsection command is not defined, not overriding. Be sure to include dprogress as the last file, if your document uses this command.}%
\fi
% \end{macrocode}
%\end{macro}
%
% \Finale
\endinput
|