5
  1. What causes this?
  2. How can this be fixed?

    \documentclass{article}
    \usepackage{todonotes}
    \usepackage{tikzsymbols}
    \usepackage{lipsum}
    
    \begin{document}
    \lipsum[1-4]
    Good stuff.\todo{hello \dWinkey how are you?}
    \lipsum[5-8]
    \end{document}
    

enter image description here

1

2 Answers 2

7

When both tikzsymbols and todonotes packages are loaded, the \dWinkey has unusual (erroneous?) height. This appears to be a conflict between the todonotes and tikzsymbols packages?

So here, I load tikzsymbols, and save a typeset copy of \dWinkey in a box. Then, I load todonotes. Thereafter, I must use the boxed version of \dWinkey.

\documentclass{article}
\usepackage{tikzsymbols}
\usepackage{lipsum}
\newsavebox\Wbox
\savebox\Wbox{\dWinkey}
\usepackage{todonotes}
\begin{document}
\lipsum[1-4]
Good stuff.\todo{hello \usebox\Wbox how are you?}
\lipsum[5-8]
\end{document}

enter image description here

For a simpler usage syntax, since \dWinkey becomes useless after the todonotes package is loaded, one can redefine it, though it will not scale with font size changes.

\documentclass{article}
\usepackage{tikzsymbols}
\usepackage{lipsum}
\newsavebox\Wbox
\savebox\Wbox{\dWinkey}
\usepackage{todonotes}
\def\dWinkey{\usebox\Wbox}
\begin{document}
\lipsum[1-4]
Good stuff.\todo{hello \dWinkey how are you?}
\lipsum[5-8]
\end{document}
4
  • 1
    Thanks! The weird thing is that according to the manual, the smileys are already typeset via savebox/usebox. The package allows me to turn it off, in which case I get the same size box but with the smiley at the top and the text at the bottom. How a savebox inside a savebox solves the problem is beyond me....
    – JPi
    Commented May 5, 2017 at 18:48
  • 1
    Funny you should mention that. I am just reading up on \unhbox to see if I can extend the answer to capture subsequent font size changes. So far, no luck, but it points out that \unhbox only unwraps the outermost box. Perhaps it is tied up in that concept... Commented May 5, 2017 at 18:52
  • 1
    Even if one turns the package's usebox feature off then using a savebox still solves the problem. Hmmm. I've written to the author. Thanks for your help.
    – JPi
    Commented May 5, 2017 at 19:10
  • I wrote to the author, who's working on a fix. He noted that if one uses it first outside a todonote, then subsequent uses inside a todonote work as desired..... Curiouser and curiouser.
    – JPi
    Commented May 6, 2017 at 18:30
3

The package author has uploaded a new version of the package to ctan in which this issue is addressed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .