I made some tikz pictures with small caps in textboxes. They compile
fine, but when I try to add tracking using microtype I get compilation
errors (did you forget a semicolon? No I didn't)
I'm using texlive2009-pre on debian. Is this a known problem? Does a
solution exist?
\documentclass{memoir}
\usepackage[tracking=true]{microtype}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw(0,0) -- node[anchor=west,text width=5cm]{\textsc{test}}(1,1);
\end{tikzpicture}
\end{document}
had the same issue before. there was no solution but only a workaround.
\draw(0,0) -- node[anchor=west,text width=5cm]{\textsc{test}\relax}(1,1);
If I remember correctly..
> had the same issue before. there was no solution but only a workaround.
> \draw(0,0) -- node[anchor=west,text width=5cm]{\textsc{test}\relax}(1,1);
> If I remember correctly..
That does the trick, thanks a lot,
Henk
I filed this as a bug on the PGF project page:
http://sourceforge.net/tracker/?func=detail&aid=2890576&group_id=142562&atid=752792
- Kjell Magne Fauske
Why is this a PGF bug and not a microtype bug?
I don't know this is a PGF or a microtype bug. I just filed a bug
report so that the issue is not forgotten. Hopefully the PGF
developers know.
- Kjell Magne Fauske
I've investigated a bit further: the problem is that \textsc will adjust
the interword spacing after the letterspaced text; this is done
\aftergroup. tikz in turn tries to expand anything that has been put
after the node group. When it hits something unknown and unexpandable,
like in the case of microtype a dimen assignment, it will enter into the
loop. In fact, you get the same error without microtype:
\draw(0,0) -- node{\aftergroup\relax test}(1,1);
A possible solution on microtype's part would be to not adjust the
spacing when at the end of a tikz node. The only possible test I found
is \unless\tikz@expandcount=1000, which, however, will also be true
inside, not only after, a node. Unless the pgf team come up with
something better, I will add this to the next version.
Regards,
--
Robert