- What causes this?
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}
2 Answers
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}
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}
-
1Thanks! 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....– JPiMay 5, 2017 at 18:48
-
1Funny 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... May 5, 2017 at 18:52 -
1Even 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.– JPiMay 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.– JPiMay 6, 2017 at 18:30
The package author has uploaded a new version of the package to ctan in which this issue is addressed.
Label pgfid3 multiply defined.