Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Problem with latex todonotes package

  1. Aug 10, 2012 #1

    DrDu

    User Avatar
    Science Advisor

    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?
     
  2. jcsd
  3. Aug 10, 2012 #2

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  4. Aug 11, 2012 #3

    DrDu

    User Avatar
    Science Advisor

    Thank you. I shall try it out on monday.
     
  5. Aug 13, 2012 #4

    DrDu

    User Avatar
    Science Advisor

    I tried it out. linespace did not change the interline spacing and I still get the same error messages.
     
  6. Aug 13, 2012 #5

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    Hmm... this works for me, in TeXLive on Windows, and no error messages.
    Code (Text):

    \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:

    • todo.pdf
      todo.pdf
      File size:
      23.7 KB
      Views:
      110
  7. Aug 14, 2012 #6

    DrDu

    User Avatar
    Science Advisor

    I am using not article but svjour3.cls. Maybe that's the problem. I'll try it out.
    Thanx for your help!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Problem with latex todonotes package
  1. LaTeX problem (Replies: 8)

  2. Problems with LaTeX (Replies: 4)

Loading...