[Tugindia] problem with rotation of text in figure

E. Krishnan ekmath at asianetindia.com
Sat Dec 11 01:13:46 CET 2004


On Fri, 10 Dec 2004, Habeeb Basha Syed wrote:

>      I have drawn a figure using Pstricks. Then I rotated the whole
>       figure using \rput command. The figure is correctly rotated
>       but the labels (letters like P_1, P_2 etc) are totally unaffected
>       by the command.  

If labels are put using the various "put" commands and if these are also 
within the the scope of the "\rput" used to rotate the figure, then the 
labels will also be rotated, as can be seen by running the example below:

\begin{center}
  \begin{pspicture}(0,0)(4,3)
    \rput{60}{%
      \pspolygon(0,0)(4,0)(4,3)
      \uput[d](0,0){$A$}
      \uput[d](4,0){$B$}
      \uput[u](4,3){$C$}}
  \end{pspicture}
\end{center}

But then, we often need the labels in the new *locations* after rotation, 
but keep their original orientation. In that case, we have to undo the 
rotation for each of the labels as in the following:

\begin{center}
  \begin{pspicture}(0,0)(4,3)
    \rput{60}{%
      \pspolygon(0,0)(4,0)(4,3)
      \uput[d]{-60}(0,0){$A$}
      \uput[d]{-60}(4,0){$B$}
      \uput[u]{-60}(4,3){$C$}}
  \end{pspicture}
\end{center}

> How can I fix the bug ?

As you can see, it's not a bug.

-- 
Krishnan



More information about the tugindia mailing list