Debian Codegraph @

texmf-dist/source/latex/dprogress/dprogress.dtx

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