Dear Federico,

down here in the Debian Bug Tracking system we got a complaint about
your todo package. I fails to compile the following minimal example
with TeX Live 2007:

<snip>
\documentclass{minimal}
\usepackage{todo}

\begin{document}
\todo[fix]{hi, this is to fix}
\todos
\end{document}
<snap>

The error message is attached. Further we got a suggestion how this
could be fixed (attached as fix.txt). Please be so kind and have a
look at this. The full report can be found on http://bugs.debian.org/470141

Many thanks,
  Hilmar
-- 
sigmentation fault
--- Begin Message ---
Package: texlive-latex-extra
Version: 2007.dfsg.1-1

After running latex command on my .tex containing todo package and
\todo instructions it complains with the following:

! Bad space factor (0).
<recently read> [EMAIL PROTECTED]

l.14 \todo[fix]{hi, this is to fix}

?
[1] [2] (./test.aux) )


If I press enter at the prompt the process continues properly.
I am also attaching a minimal .tex file reproducing the problem.

Attachment: test.tex
Description: TeX document


--- End Message ---
Hi,

On the Debian bug tracking system, it was reported that the \todo command from
your todo.sty package sometimes unexpectedly complains about a 'bad space
factor', when used in vertical mode. I checked this out, and I think the
problem arises when the [EMAIL PROTECTED] at the beginning of the \todo command 
is
executed in vertical mode, but the [EMAIL PROTECTED] at the end is executed in
horizontal mode. This happens if and only if the default option 'superscript'
is used, and the \todo command is used in vertical mode.

I think the following is a way to fix this:

[EMAIL PROTECTED] %new
\DeclareOption{superscript}{%
  [EMAIL PROTECTED]@todosupermark}%
  [EMAIL PROTECTED] %new
\DeclareOption{marginpar}{%
  [EMAIL PROTECTED]@todomarginpar}%
  [EMAIL PROTECTED] %new
[EMAIL PROTECTED]@gobble
  [EMAIL PROTECTED] %new

[EMAIL PROTECTED]@[EMAIL PROTECTED]
% the rest as in the current code (only the [EMAIL PROTECTED] added above)

This make the \leavevmode happen earlier than in [EMAIL PROTECTED] with the
super, and in any case either no happen at all, or before the
[EMAIL PROTECTED]/[EMAIL PROTECTED] couple. (I think hard-coding the 
\leavevmode at the
beginning of \todo is not a good idea since it makes unwanted vertical space
when using \todo with the 'nothing' option in vertical mode, for example.)

Of course you can also think that \todo should not be used in vertical mode
with the 'superscript' option and not fix this, but maybe it would be a good
idea to mention this restriction in the documentation then.

Best,
Manuel.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to