Till Tantau | 4 Apr 11:30
Picon
Favicon

Re: isolating nested tikz code from outer tikz code

Please lookup TeX's \mathchoice command, that will do the trick.

Till

Am 03.04.2007 um 22:30 schrieb Erik Quaeghebeur:

> On Tue, 3 Apr 2007, Till Tantau wrote:
>>
>> first, I think \newcommand should have an argument [1] and \p should
>> read #1, right?
>
> Indeed, something like that.
>
>> second, the wrong placements seem to be due to changing anchors. Try
>> \useasboundingbox node[inner sep=0pt,outer sep=0pt,anchor=center] ...
>>
>> Perhaps anchor=base might be preferable and saying \tikz[baseline] so
>> that the code can be used in normal text.
>
> Thanks, this solves the positioning problem.
>
> However, I stil have the problem that the symbol thus defined doesn't
> notice it's in math mode, or in a subscript (see minimal example  
> below).
> How can I solve this?
>
> ---
> \documentclass{article}
> \usepackage{tikz}
>
> \newcommand{\lp}{{
>    \tikz[baseline]{
>      \useasboundingbox node[inner sep=0pt,outer  
> sep=0pt,anchor=base] (lp) {P};
>      \draw[line width=.08ex,-] (lp.south west) ++(.03em,-.2ex) -- + 
> (.45em,0ex);
>    }
> }}
>
> \begin{document}
>    $\lp_\lp$, {\scriptsize $\lp$}
> \end{document}
> \endinput
> ---
>
> Erik
>
> ---------------------------------------------------------------------- 
> ---
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to  
> share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php? 
> page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> pgf-users mailing list
> pgf-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pgf-users
>

--
Prof. Dr. Till Tantau <tantau <at> tcs.uni-luebeck.de>
http://www.tcs.uni-luebeck.de

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Gmane