[pstricks] Arrows in math equation?
Carsten Vogel
lego at wh10.tu-dresden.de
Fri May 2 16:37:04 CEST 2008
Herbert Voss schrieb:
> Anton Suchaneck schrieb:
>
>
>> I'm just starting with pstricks and wondering if it is possible to have
>> arrows in plain math equations. For example I want in
>> \[ \ln(a^b)\]
>> an arrow from above the "b" to the empty space infront of the "\ln"
>> Is that doable?
>>
>
> \documentclass[12pt,a4paper]{article}
> \usepackage{pst-node}
> \begin{document}
>
> \[ \rnode{ln}{\rule{0pt}{2ex}}% for vertical centering
> \ln(a^{\protect\rnode{b}{\scriptstyle b}})\]
> \nccurve[ncurv=2,angleA=170,angleB=90,
> arrows=<-,arrowscale=1.5,nodesepB=2pt]{ln}{b}
>
> \end{document}
>
After looking at Herbert's proposal I learned (possibly):
- ex might be the better unit using for height-alignment
2ex = Kegelhöhe?
- \rnode-using in powers needs a "protection".
- \rnode alters the math-script-behaviour and needs manual setting.
Please correct me, if I was wrong.
Thanks for lessons esp. to you Herbert!
Yours,
Carsten
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt,a4paper]{article}
\usepackage{pst-node}
\begin{document}
\[%
\rnode{start}{\vphantom{2ex}\quad}
\ln(a^{\protect\rnode{end}{\scriptstyle{}b}})%
\]
\ncbar[angle=90,arm=1ex,nodesep=.5ex,arrowscale=1.3]{<-}{start}{end}
\end{document}
More information about the PSTricks
mailing list