Fwd: Tracking small caps using microtype fails in tikz-boxes

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown Fwd: Tracking small caps using microtype fails in tikz-boxes

by Kjell Magne Fauske :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear PGF developers,

I'm forwarding this post from comp.text.tex about an issue with
microtype and small caps in tikz-boxes:
http://groups.google.com/group/comp.text.tex/browse_thread/thread/c2e3c3ce1e03267e#


---------- Forwarded message ----------
From: Robert <w....@...>
Date: Nov 3, 5:49 pm
Subject: Tracking small caps using microtype fails in tikz-boxes
To: comp.text.tex


On 03.11.2009 15:20 Uhr, Kjell Magne Fauske wrote:



> On Nov 2, 2:25 pm, Brian Rantz <brian.ra...@...> wrote:
>> On Nov 2, 8:08 am, Kjell Magne Fauske <kjel...@...> wrote:
>>> On Nov 2, 7:06 am, hscm <henkmetsel...@...> wrote:
>>>> hi,
>>>> 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}
>>> I filed this as a bug on the PGF project page:http://sourceforge.net/tracker/?func=detail&aid=2890576&group_id=1425...
>>> - 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.

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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
pgf-users mailing list
pgf-users@...
https://lists.sourceforge.net/lists/listinfo/pgf-users