New Reply

Problem with latex todonotes package

 
Share Thread Thread Tools
Aug10-12, 02:04 AM   #1
 
Recognitions:
Science Advisor Science Advisor

Problem with latex todonotes package


I tried out the latex todonotes package. Specifically I defined in the preamble:

\usepackage{todonotes}
\newcommand{\tinytodo}[2][]
{\todo[size=\small,inline]{\renewcommand{\baselinestretch}{0.5}%
\selectfont%
[\uppercase{#1}]:~#2%
\par
}}

In the body I use:

\tinytodo[A]{``accute'' vs. ``protracted'' }

I get the following error message in the log:

Runaway argument?
{\@firstoftwo {\let \l@ngrel@x \relax \renew@command }}\def \reserved@b \ETC.
! Paragraph ended before \reserved@a was complete.
<to be read again>
\par
l.82 ...``accute'' vs. ``protracted'' }

?
[2]

Although ignoring it yields a correct pdf, I would like to get rid of it. Any ideas?
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> Ants and carnivorous plants conspire for mutualistic feeding
>> Forecast for Titan: Wild weather could be ahead
>> Researchers stitch defects into the world's thinnest semiconductor
Aug10-12, 11:40 AM   #2

Math 2012
 
Recognitions:
Science Advisor Science Advisor
The problem seems to be that the "renewcommand" ends up soewhere it shouldn't be.
If you change
\renewcommand{\baselinestretch}{0.5}%
to
\linespread{0.5}%
(which has the same effect) the error message goes away.

FWIW trying to reduce the line spacing this way doesn't seem to do much, but increasing it with say \linespread{2.0} works for me.
Aug11-12, 07:05 AM   #3
 
Recognitions:
Science Advisor Science Advisor
Thank you. I shall try it out on monday.
Aug13-12, 03:12 AM   #4
 
Recognitions:
Science Advisor Science Advisor

Problem with latex todonotes package


I tried it out. linespace did not change the interline spacing and I still get the same error messages.
Aug13-12, 08:35 PM   #5

Math 2012
 
Recognitions:
Science Advisor Science Advisor
Hmm... this works for me, in TeXLive on Windows, and no error messages.
Code:
\documentclass{article}
\usepackage{todonotes}
\newcommand{\tinytodo}[2][]
{\todo[size=\small,inline]{\linespread{2.0}%
\selectfont%
[\uppercase{#1}]:~#2%
\par
}}

\begin{document}
Some  text. \\
Line two
\tinytodo[A]
{A note with two lines\\
A note with two lines}
Line three \\
Line four
\end{document}
PDF output attached.
Attached Files
File Type: pdf todo.pdf (23.7 KB, 2 views)
Aug14-12, 02:13 AM   #6
 
Recognitions:
Science Advisor Science Advisor
I am using not article but svjour3.cls. Maybe that's the problem. I'll try it out.
Thanx for your help!
New Reply
Thread Tools


Similar Threads for: Problem with latex todonotes package
Thread Forum Replies
Projectile Motion problem with Plane dropping package Introductory Physics Homework 2
Work Energy Problem Package released to Spring Introductory Physics Homework 2
plane drops package; superman on ground flys at angle then horizontal to meet package Introductory Physics Homework 1
Problem with LaTeX hyperref package Programming & Comp Sci 3
Can we include a LaTeX package? Forum Feedback & Announcements 4