2 %% This is file `fixme.sty',
3 %% generated with the docstrip utility.
5 %% The original source files were:
11 %% Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006 Didier Verna
13 %% This file is part of FiXme.
15 %% FiXme may be distributed and/or modified under the
16 %% conditions of the LaTeX Project Public License, either version 1.1
17 %% of this license or (at your option) any later version.
18 %% The latest version of this license is in
19 %% http://www.latex-project.org/lppl.txt
20 %% and version 1.1 or later is part of all distributions of LaTeX
21 %% version 1999/06/01 or later.
23 %% FiXme consists of the files listed in the file `README'.
26 %% {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
27 %% 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
28 %% Digits \0\1\2\3\4\5\6\7\8\9
29 %% Exclamation \! Double quote \" Hash (number) \#
30 %% Dollar \$ Percent \% Ampersand \&
31 %% Acute accent \' Left paren \( Right paren \)
32 %% Asterisk \* Plus \+ Comma \,
33 %% Minus \- Point \. Solidus \/
34 %% Colon \: Semicolon \; Less than \<
35 %% Equals \= Greater than \> Question mark \?
36 %% Commercial at \@ Left bracket \[ Backslash \\
37 %% Right bracket \] Circumflex \^ Underscore \_
38 %% Grave accent \` Left brace \{ Vertical bar \|
39 %% Right brace \} Tilde \~}
40 \NeedsTeXFormat{LaTeX2e}
42 \ProvidesPackage{fixme}[2006/04/12 v3.2
43 Insert fixme notes in your documents]
45 \RequirePackage{ifthen}
46 \RequirePackage{verbatim}
48 \newcommand*\fixmelogo{\textsf{FiXme}}
51 \newcommand\listoffixmes{}
52 \def\listoffixmes@final{}
53 \def\listoffixmes@draft{%
54 \IfFileExists{\jobname .lox}{\@listoffixmes@pretoc}{}%
56 \IfFileExists{\jobname .lox}{\@listoffixmes@posttoc}{}%
59 \def\listoffixmes@draft@amsbook{\@starttoc{lox}\listfixmename}
61 \newcommand*\listfixmename{}
63 \def\@listoffixmes@pretoc@article{%
64 \section*{\listfixmename%
65 \@mkboth{\MakeUppercase\listfixmename}{\MakeUppercase\listfixmename}}%
67 \def\@listoffixmes@posttoc@article{}
69 \def\@listoffixmes@pretoc@report{%
71 \@restonecoltrue\onecolumn
75 \chapter*{\listfixmename%
76 \@mkboth{\MakeUppercase\listfixmename}{\MakeUppercase\listfixmename}}%
78 \def\@listoffixmes@posttoc@report{\if@restonecol\twocolumn\fi}
80 \def\@listoffixmes@pretoc@book{%
82 \@restonecoltrue\onecolumn
86 \chapter*{\listfixmename%
87 \@mkboth{\MakeUppercase\listfixmename}{\MakeUppercase\listfixmename}}%
89 \def\@listoffixmes@posttoc@book{\if@restonecol\twocolumn\fi}
91 \def\@listoffixmes@pretoc@scrartcl{%
92 \section*{\listfixmename%
93 \@mkboth{\listfixmename}{\listfixmename}}%
95 \def\@listoffixmes@posttoc@scrartcl{}
97 \def\@listoffixmes@pretoc@scrreprt{%
99 \@restonecoltrue\onecolumn
103 \chapter*{\listfixmename%
104 \@mkboth{\listfixmename}{\listfixmename}}%
106 \def\@listoffixmes@posttoc@scrreprt{\if@restonecol\twocolumn\fi}
108 \def\@listoffixmes@pretoc@scrbook{%
110 \@restonecoltrue\onecolumn
114 \chapter*{\listfixmename%
115 \@mkboth{\listfixmename}{\listfixmename}}%
117 \def\@listoffixmes@posttoc@scrbook{\if@restonecol\twocolumn\fi}
119 \newcommand\FXInline[2]{%
120 \textbf{#1}: \emph{#2}}
121 \newcommand\FXMargin[2]{%
122 \marginpar{\footnotesize\raggedleft\textbf{#1}: \emph{#2}}}
123 \newcommand\FXMarginClue[1]{%
124 \marginpar{\footnotesize\raggedleft\textbf{#1}~!}}
125 \newcommand\FXFootnote[2]{%
126 \footnote{\textbf{#1}: \emph{#2}}}
128 \newcommand*\fixmeindexname{}
129 \newcommand\FXIndex[1]{%
130 \index{***@\fixmeindexname:!#1}}
132 \newcommand*\fixmefatalprefix{}
133 \newcommand\FiXmeInline[1]{\FXInline{\fixmefatalprefix}{#1}}
134 \newcommand\FiXmeMargin[1]{\FXMargin{\fixmefatalprefix}{#1}}
135 \newcommand\FiXmeFootnote[1]{\FXFootnote{\fixmefatalprefix}{#1}}
136 \newcommand\FiXmeUser[1]{}
139 \newcommand\FiXmeIndex[1]{\FXIndex{#1}}
140 \newcommand\FiXmeInfo[1]{}
141 \newcommand\FiXmeWarning[1]{}
143 \newif\iffixme@inline
144 \newif\iffixme@margin
145 \newif\iffixme@marginclue
146 \newif\iffixme@footnote
150 \let\fixme@setinline\fixme@inlinetrue
151 \def\fixme@setmargin{%
153 \PackageWarning{FiXme}{%
154 Marginal notes requested; tunrning marginal clues off}%
155 \fixme@margincluefalse%
158 \def\fixme@setmarginclue{%
160 \PackageWarning{FiXme}{%
161 Marginal clues requested; tunrning marginal notes off}%
164 \fixme@margincluetrue}
165 \let\fixme@setfootnote\fixme@fottnotetrue
166 \let\fixme@setuser\fixme@usertrue
167 \let\fixme@setindex\fixme@indextrue
169 \def\fixme@text#1#2{%
170 \iffixme@inline\FXInline{#1}{#2}\fi%
171 \iffixme@margin\FXMargin{#1}{#2}\fi%
172 \iffixme@marginclue\FXMarginClue{#1}\fi%
173 \iffixme@footnote\FXFootnote{#1}{#2}\fi%
174 \iffixme@user\FXUser{#1}{#2}\fi}
176 \DeclareOption{inline}{\fixme@setinline}
177 \DeclareOption{noinline}{\fixme@inlinefalse}
178 \DeclareOption{margin}{\fixme@setmargin}
179 \DeclareOption{nomargin}{\fixme@marginfalse}
180 \DeclareOption{marginclue}{\fixme@setmarginclue}
181 \DeclareOption{nomarginclue}{\fixme@margincluefalse}
182 \DeclareOption{footnote}{\fixme@footnotetrue}
183 \DeclareOption{nofootnote}{\fixme@footnotefalse}
184 \DeclareOption{user}{\fixme@usertrue}
185 \DeclareOption{nouser}{\fixme@userfalse}
186 \DeclareOption{index}{\fixme@indextrue}
187 \DeclareOption{noindex}{\fixme@indexfalse}
189 \DeclareOption{info}{}
190 \DeclareOption{noinfo}{}
191 \DeclareOption{warning}{}
192 \DeclareOption{nowarning}{}
194 \newcommand\FXNote[1]{%
196 (FiXme)\@spaces\@spaces\@spaces\@spaces}{%
197 Package FiXme Note: `#1'}}
198 \newcommand\FXWarning[1]{%
199 \PackageWarning{FiXme}{`#1'}}
200 \newcommand\FXError[1]{%
202 (FiXme)\@spaces\@spaces\@spaces\@spaces}{%
203 Package FiXme Error: `#1'}}
204 \newcommand\FXFatal[1]{%
206 (FiXme)\@spaces\@spaces\@spaces\@spaces}{%
207 Package FiXme: `#1'}}
209 \newif\iffixme@silent
211 %% Options that control whether to be silent or not:
212 \DeclareOption{silent}{\fixme@silenttrue}
213 \DeclareOption{nosilent}{\fixme@silentfalse}
215 \newcounter{fixmecount}
216 \newcounter{fixmenotecount}
217 \newcounter{fixmewarningcount}
218 \newcounter{fixmeerrorcount}
219 \newcounter{fixmefatalcount}
221 \newcommand*\fixmenoteprefix{}
222 \newcommand*\fixmenoteindexname{}
223 \def\fixme@note@draft#1{%
224 \fixme@text{\fixmenoteprefix}{#1}%
225 \iffixme@index\FXIndex{\fixmenoteindexname\thefixmenotecount: #1}\fi%
226 \iffixme@silent\else\FXNote{#1}\fi%
227 \addcontentsline{lox}{fixme}{\protect\fixmenoteprefix: #1}}
228 \def\fixme@note@final#1{%
229 \iffixme@silent\else\FXNote{#1}\fi%
230 \addcontentsline{lox}{fixme}{\protect\fixmenoteprefix: #1}}
232 \newcommand*\fixmewarningprefix{}
233 \newcommand*\fixmewarningindexname{}
234 \def\fixme@warning@draft#1{%
235 \fixme@text{\fixmewarningprefix}{#1}%
236 \iffixme@index\FXIndex{\fixmewarningindexname\thefixmewarningcount: #1}\fi%
237 \iffixme@silent\else\FXWarning{#1}\fi%
238 \addcontentsline{lox}{fixme}{\protect\fixmewarningprefix: #1}}
239 \def\fixme@warning@final#1{%
240 \iffixme@silent\else\FXWarning{#1}\fi%
241 \addcontentsline{lox}{fixme}{\protect\fixmewarningprefix: #1}}
243 \newcommand*\fixmeerrorprefix{}
244 \newcommand*\fixmeerrorindexname{}
245 \def\fixme@error@draft#1{%
246 \fixme@text{\fixmeerrorprefix}{#1}%
247 \iffixme@index\FXIndex{\fixmeerrorindexname\thefixmeerrorcount: #1}\fi%
248 \iffixme@silent\else\FXError{#1}\fi%
249 \addcontentsline{lox}{fixme}{\protect\fixmeerrorprefix: #1}}
250 \def\fixme@error@final#1{%
251 \iffixme@silent\else\FXError{#1}\fi%
252 \addcontentsline{lox}{fixme}{\protect\fixmeerrorprefix: #1}}
254 \newcommand*\fixmefatalindexname{}
255 \def\fixme@fatal@draft#1{%
256 \iffixme@inline\FiXmeInline{#1}\fi%
257 \iffixme@margin\FiXmeMargin{#1}\fi%
258 \iffixme@marginclue\FXMarginClue{\fixmefatalprefix}\fi%
259 \iffixme@footnote\FiXmeFootnote{#1}\fi%
260 \iffixme@user\FiXmeUser{#1}\fi%
261 \iffixme@index\FiXmeIndex{%
262 \fixmefatalindexname\thefixmefatalcount: #1}\fi%
263 \iffixme@silent\else\FXFatal{#1}\fi%
264 \addcontentsline{lox}{fixme}{\protect\fixmefatalprefix: #1}}
265 \def\fixme@fatal@final#1{%
266 \PackageError{FiXme}{`#1' fixme left in final version}{%
267 You are processing your document in final mode,\MessageBreak
268 but you still have some critical FiXme's left behind.\MessageBreak
269 Type X to quit, fix your document, and rerun LaTeX.}}
272 \stepcounter{fixmecount}%
273 \stepcounter{fixme#1count}%
274 \csname fixme@#1\endcsname{#2}}
275 \def\@fixme#1[#2]#3{%
279 \fixme@margincluefalse%
280 \fixme@footnotefalse%
283 \@for\fixme@option:=#2\do{%
284 \expandafter\ifx\csname fixme@\fixme@option true\endcsname\relax
285 \PackageError{FiXme}{Unknown layout option `\fixme@option'}{%
286 You have given an invalid option to \string\fixme, or an \string\fx %
287 command.\MessageBreak
288 Valid options are `inline', `margin', `marginclue', `footnote', %
290 and `index'.\MessageBreak
291 Type X to quit, fix your document, and rerun LaTeX.}%
293 \csname fixme@set\fixme@option\endcsname%
297 \newcommand\fxnote{\@ifnextchar[%]
298 {\@fixme{note}}{\@@fixme{note}}}
299 \newcommand\fxwarning{\@ifnextchar[%]
300 {\@fixme{warning}}{\@@fixme{warning}}}
301 \newcommand\fxerror{\@ifnextchar[%]
302 {\@fixme{error}}{\@@fixme{error}}}
303 \newcommand\fixme{\@ifnextchar[%]
304 {\@fixme{fatal}}{\@@fixme{fatal}}}
306 \newcommand\FXEnvBegin{\begin{quotation}}
307 \newcommand\FXEnvEnd{\end{quotation}}
309 \def\@fxenvbegin@draft#1#2{%
311 \edef\fixme@args{inline%
312 \iffixme@index,index\fi%
313 \iffixme@marginclue,marginclue\fi}%
314 \csname#1\endcsname[\fixme@args]{#2}}
315 \def\@fxenvbegin@final#1#2{
316 \edef\fixme@args{inline%
317 \iffixme@index,index\fi%
318 \iffixme@marginclue,marginclue\fi}%
319 \csname#1\endcsname[\fixme@args]{#2}
323 \def\@fxenvend@draft{\FXEnvEnd}
324 \def\@fxenvend@final{\endcomment}
326 \newenvironment{anfxnote}[1][]{%
327 \@fxenvbegin{fxnote}{#1}}{%
329 \newenvironment{anfxwarning}[1][]{%
330 \@fxenvbegin{fxwarning}{#1}}{%
332 \newenvironment{anfxerror}[1][]{%
333 \@fxenvbegin{fxerror}{#1}}{%
335 \newenvironment{afixme}[1][]{%
336 \@fxenvbegin{fixme}{#1}}{%
339 \DeclareOption{english}{%
340 \renewcommand*\fixmenoteprefix{\fixmelogo\nobreakspace Note}
341 \renewcommand*\fixmewarningprefix{\fixmelogo\nobreakspace Warning}
342 \renewcommand*\fixmeerrorprefix{\fixmelogo\nobreakspace Error}
343 \renewcommand*\fixmefatalprefix{\fixmelogo}
344 \renewcommand*\fixmeindexname{\fixmelogo}
345 \renewcommand*\fixmenoteindexname{**a@Notes:!}
346 \renewcommand*\fixmewarningindexname{**b@Warnings:!}
347 \renewcommand*\fixmeerrorindexname{**c@Errors:!}
348 \renewcommand*\fixmefatalindexname{}
349 \renewcommand*{\listfixmename}{List of Corrections}}
350 \DeclareOption{french}{%
351 \renewcommand*\fixmenoteprefix{\fixmelogo\nobreakspace Note}
352 \renewcommand*\fixmewarningprefix{\fixmelogo\nobreakspace Attention}
353 \renewcommand*\fixmeerrorprefix{\fixmelogo\nobreakspace Erreur}
354 \renewcommand*\fixmefatalprefix{\fixmelogo}
355 \renewcommand*\fixmeindexname{\fixmelogo}
356 \renewcommand*\fixmenoteindexname{**a@Notes:!}
357 \renewcommand*\fixmewarningindexname{**b@Avertissements:!}
358 \renewcommand*\fixmeerrorindexname{**c@Erreurs:!}
359 \renewcommand*\fixmefatalindexname{}
360 \renewcommand*{\listfixmename}{Liste des Corrections}}
361 \DeclareOption{francais}{\ExecuteOptions{french}}
362 \DeclareOption{spanish}{%
363 \renewcommand*\fixmenoteprefix{\fixmelogo\nobreakspace Nota}
364 \renewcommand*\fixmewarningprefix{\fixmelogo\nobreakspace Aviso}
365 \renewcommand*\fixmeerrorprefix{\fixmelogo\nobreakspace Error}
366 \renewcommand*\fixmefatalprefix{\fixmelogo}
367 \renewcommand*\fixmeindexname{\fixmelogo}
368 \renewcommand*\fixmenoteindexname{**a@Notas:!}
369 \renewcommand*\fixmewarningindexname{**b@Avisos:!}
370 \renewcommand*\fixmeerrorindexname{**c@Errores:!}
371 \renewcommand*\fixmefatalindexname{}
372 \renewcommand*{\listfixmename}{Lista de Correcciones}}
373 \DeclareOption{italian}{%
374 \renewcommand*\fixmenoteprefix{\fixmelogo\nobreakspace Nota}
375 \renewcommand*\fixmewarningprefix{\fixmelogo\nobreakspace Avviso}
376 \renewcommand*\fixmeerrorprefix{\fixmelogo\nobreakspace Errore}
377 \renewcommand*\fixmefatalprefix{\fixmelogo}
378 \renewcommand*\fixmeindexname{\fixmelogo}
379 \renewcommand*\fixmenoteindexname{**a@Note:!}
380 \renewcommand*\fixmewarningindexname{**b@Avvisi:!}
381 \renewcommand*\fixmeerrorindexname{**c@Errori:!}
382 \renewcommand*\fixmefatalindexname{}
383 \renewcommand*{\listfixmename}{Corrigenda}}
384 \DeclareOption{german}{%
385 \renewcommand*\fixmenoteprefix{\fixmelogo\nobreakspace Anm}
386 \renewcommand*\fixmewarningprefix{\fixmelogo\nobreakspace Warnung}
387 \renewcommand*\fixmeerrorprefix{\fixmelogo\nobreakspace Fehler}
388 \renewcommand*\fixmefatalprefix{\fixmelogo}
389 \renewcommand*\fixmeindexname{\fixmelogo}
390 \renewcommand*\fixmenoteindexname{**a@Anmerkungen:!}
391 \renewcommand*\fixmewarningindexname{**b@Warnungen:!}
392 \renewcommand*\fixmeerrorindexname{**c@Fehler:!}
393 \renewcommand*\fixmefatalindexname{}
394 \renewcommand*{\listfixmename}{Verzeichnis der Korrekturen}}
395 \DeclareOption{ngerman}{%
396 \ExecuteOptions{german}}
397 \DeclareOption{danish}{%
398 \renewcommand*\fixmenoteprefix{\fixmelogo\nobreakspace Note}
399 \renewcommand*\fixmewarningprefix{\fixmelogo\nobreakspace Advarsel}
400 \renewcommand*\fixmeerrorprefix{\fixmelogo\nobreakspace Fejl}
401 \renewcommand*\fixmefatalprefix{\fixmelogo}
402 \renewcommand*\fixmeindexname{\fixmelogo}
403 \renewcommand*\fixmenoteindexname{**a@Noter:!}
404 \renewcommand*\fixmewarningindexname{**b@Advarsler:!}
405 \renewcommand*\fixmeerrorindexname{**c@Fejl:!}
406 \renewcommand*\fixmefatalindexname{}
407 \renewcommand*{\listfixmename}{Rettelser}}
408 \DeclareOption{croatian}{%
409 \renewcommand*\fixmenoteprefix{\fixmelogo\nobreakspace Poruka}
410 \renewcommand*\fixmewarningprefix{\fixmelogo\nobreakspace Upozorenje}
411 \renewcommand*\fixmeerrorprefix{\fixmelogo\nobreakspace Gre\v ska}
412 \renewcommand*\fixmefatalprefix{\fixmelogo}
413 \renewcommand*\fixmeindexname{\fixmelogo}
414 \renewcommand*\fixmenoteindexname{**a@Poruke:!}
415 \renewcommand*\fixmewarningindexname{**b@Upozorenja:!}
416 \renewcommand*\fixmeerrorindexname{**c@Greske:!}
417 \renewcommand*\fixmefatalindexname{}
418 \renewcommand*{\listfixmename}{Popis korekcija}}
420 \DeclareOption{final}{
421 \let\fixme@note\fixme@note@final
422 \let\fixme@warning\fixme@warning@final
423 \let\fixme@error\fixme@error@final
424 \let\fixme@fatal\fixme@fatal@final
425 \let\@fxenvbegin\@fxenvbegin@final
426 \let\@fxenvend\@fxenvend@final
427 \let\listoffixmes\listoffixmes@final
430 \DeclareOption{draft}{
431 \@ifclassloaded{article}{
432 \let\@listoffixmes@pretoc\@listoffixmes@pretoc@article
433 \let\@listoffixmes@posttoc\@listoffixmes@posttoc@article}{
434 \@ifclassloaded{report}{
435 \let\@listoffixmes@pretoc\@listoffixmes@pretoc@report
436 \let\@listoffixmes@posttoc\@listoffixmes@posttoc@report}{
437 \@ifclassloaded{book}{
438 \let\@listoffixmes@pretoc\@listoffixmes@pretoc@book
439 \let\@listoffixmes@posttoc\@listoffixmes@posttoc@book}{
440 \@ifclassloaded{scrartcl}{
441 \let\@listoffixmes@pretoc\@listoffixmes@pretoc@scrartcl
442 \let\@listoffixmes@posttoc\@listoffixmes@posttoc@scrartcl}{
443 \@ifclassloaded{scrreprt}{
444 \let\@listoffixmes@pretoc\@listoffixmes@pretoc@scrreprt
445 \let\@listoffixmes@posttoc\@listoffixmes@posttoc@scrreprt}{
446 \@ifclassloaded{scrbook}{
447 \let\@listoffixmes@pretoc\@listoffixmes@pretoc@scrbook
448 \let\@listoffixmes@posttoc\@listoffixmes@posttoc@scrbook}{
449 \@ifclassloaded{amsbook}{
450 \let\listoffixmes@draft\listoffixmes@draft@amsbook}{
451 %% Use the article layout by default.
452 \let\@listoffixmes@pretoc\@listoffixmes@pretoc@article
453 \let\@listoffixmes@posttoc\@listoffixmes@posttoc@article}
460 \let\fixme@note\fixme@note@draft
461 \let\fixme@warning\fixme@warning@draft
462 \let\fixme@error\fixme@error@draft
463 \let\fixme@fatal\fixme@fatal@draft
464 \let\@fxenvbegin\@fxenvbegin@draft
465 \let\@fxenvend\@fxenvend@draft
466 \let\listoffixmes\listoffixmes@draft
469 \ExecuteOptions{english,final,margin,nosilent}
474 \renewcommand\FiXmeUser[1]{\FXUser{\fixmefatalprefix}{#1}}
479 (FiXme)\@spaces\@spaces\@spaces\@spaces
481 Package FiXme Summary: Number of notes: \thefixmenotecount,\MessageBreak%
482 Number of warnings: \thefixmewarningcount,\MessageBreak%
483 Number of errors: \thefixmeerrorcount,\MessageBreak%
484 Number of fatal errors: \thefixmefatalcount,\MessageBreak%
485 Total: \thefixmecount\@gobble%
489 %% End of file `fixme.sty'.