Graphics, Figures & TablesMarking right angles

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Marking right angles

Post by Mini »

Hello,

I'm using the following code to mark the right angle:

Code: Select all

\begin{figure}[!htb]
\begin{pspicture}(0,0)(5,5)
\psline{-}(0,0)(5,5)
\psline{-}(5,0)(5,5)
\psline{-}(0,0)(5,0)
\psarc(0,0){1}{0}{45}
\psframe[dimen=middle](0,0)(.35,.35)
\end{pspicture}
\end{figure}
I can't seem to get '\psframe[dimen=middle](0,0)(.35,.35)' to mark the right angle. If I change (0,0) to (5,0) (ie. where the right angle is) then it just stretches the box.

How could I move it to where the right angle is?

THanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Marking right angles

Post by localghost »

The two coordinate pairs determine the lower left (ll) and upper right (ur) corner of the frame.

Code: Select all

\psframe(<llx>,<lly>)(<urx>,<ury>)
And these coordinates are not relative but absolute. Thus you have to insert other coordinates for the frame as shown below.

Code: Select all

\documentclass{minimal}
\usepackage{pstricks-add}

\begin{document}
  \begin{pspicture}(0,0)(5,5)
    \psline(0,0)(5,0)(5,5)(0,0)
    \psarc(0,0){1}{0}{45}
    \psframe[dimen=middle](4.5,0)(5,0.5)
    \psdot[dotsize=1.6pt](4.75,0.25)
  \end{pspicture}
\end{document}

Thorsten
Post Reply