[pstricks] Rotate Text on PS side

Christoph Bersch usenet at bersch.net
Mon Aug 13 20:16:02 CEST 2007


Herbert Voss wrote:
> Christoph Bersch wrote:
>>    \ncput[nrot=:U]{Flipped}
>>   
>    \ncput[nrot=:D]{Flipped}
> 
> see page 94 in the PSTricks book

I think, I didn't explain it good enough:

The problem is, that I have a macro containing the
\ncline and \ncput stuff. Within this macro the text should be flipped
if necessary (based only on the node coordinates).

XA < XB  -> unchanged
XA >= XB -> extra rotate text

\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pst-node}

\def\testput(#1)(#2)#3{
  \ncline{#1}{#2}
  \ncput[nrot=:U]{#3}
}
\begin{document}
\begin{pspicture}[showgrid=true](5,4)
   \pnode(0,0){A}
   \pnode(2,4){B}
   \pnode(5,0){C}
   \pnode(3,4){D}
   \testput(A)(B){Normal}
   \testput(C)(D){Flipped}
%
\end{pspicture}
\end{document}

Thank you
Christoph



More information about the PSTricks mailing list