# setstretch and todonotes

I'm attempting to use the todonotes package to make margin annotations connected to points in a text. In order to give more space for the annotations, I'd like to be able to increase the line spacing of the main text without increasing the spacing inside the notes. I've used setspace to set the line spacing, but placing an additional \setstretch command inside the \todo command has no effect at all.

\documentclass{article}

\usepackage{todonotes}

\usepackage{setspace}

\setstretch{1.7}

\begin{document}

This is a long text that goes onto two lines. \todo{\setstretch{1.0} This is a longish note about the text.} I'm not sure what else to put here because I need form and not content but form has to have content.

\end{document}


How can I go about setting line spacing independently inside notes? Have I misunderstood something about setspace, or is there a different package I should be using, or something?

(I've seen the solution to this problem for fixme, but it involves a parameter which todonotes doesn't seem to have.)

You're missing \selectfont after \setstretch{1}.

In order to avoid having to type in \setstretch{1}\selectfont in every note, you can abuse the size key:

\documentclass{article}

\usepackage{todonotes}

\usepackage{setspace}

\setstretch{1.7}
\presetkeys{todonotes}{size=\setstretch{1}\selectfont}{}

\begin{document}

This is a long text that goes onto two
lines.\todo{This is a longish note about the text.}
I'm not sure what else to put here because I need
form and not content but form has to have content.

\end{document}


• Wonderful, thank you! That solves the problem! – Sjiveru Jul 18 '18 at 23:10
• If I do this, I get Undefined control sequence. \presetkeys and if I then load xkeyval package, then I get the error Package xkeyval Error: uniquename' undefined in families blx@opt@name'. .... What am I missing? I don't understand the error. xkeyval thinks I am misspelling uniquenames, but I am not spelling uniquenames at all. Should I open a new question about it do you happen to recognize what happened there? – thymaro Sep 8 '19 at 16:27
• @thymaro This has to do with biblatex and appears to be unrelated to the present problem. – egreg Sep 8 '19 at 16:37
• ah, ok, thx. I'll toss out xkeyval and \presetkeys then and leave the todo notes stretched as they are. – thymaro Sep 8 '19 at 17:21