Consider the following example. (This is either the last one or the second to last.)


% pdflatex -shell-escape test.tex




% \psset{unit=\psunit}
   \pcline(\radius,0)(!\radius\space \lige\space add 0)
   \psarc(!\radius\space \lige\space add \radius\space){\radius}{270}{90}
   \pcline(!\radius\space \lige\space add 2 \radius\space mul)%
    (!\radius\space 2 \radius\space mul)
   \pcline[arrows=|*-|*](\radius,\radius)(!\radius\space \lige\space add \radius\space)
   \pcline(!\radius\space \lige\space add \radius\space)%
    (!2 \radius\space mul \lige\space add \radius\space)
   \pcline(\radius,\radius)(!\radius\space 2 \radius\space mul)
   \pcline(!\radius\space \lige\space add \radius\space)%
    (!\radius\space \lige\space add 0)
   \pcline(!\radius\space \lige\space add \radius\space)%
    (!\radius\space \lige\space add 2 \radius\space mul)



enter image description here


I have the desired output but the code is not very elegant. Furthermore, I still don't get how to use the \psunit (see this answer).

  • 1
    Request: Hi :) For PSTricks ignorant users like me and willing to learn, can you give details on "again" in Title means, "improved","elegant" , difference between earlier Q's with elaborate explanation to be understood for dummies like me. Apr 25, 2013 at 15:06
  • @texenthusiast "again" refers to this post, "improved" means that I use a lot of keystrokes to get what I want, and for "elegant", see comment regarding "improved". Apr 25, 2013 at 15:09
  • Is it possible to absorb your comments and detailed explanation inside the question to be concise and clean to help wider audience :). Apr 25, 2013 at 15:10
  • @texenthusiast You are welcome to edit my post. I have to go now for today. Apr 25, 2013 at 15:11
  • I have no idea on this topic so i don't deem fit for rephrasing it :) Apr 26, 2013 at 4:29

2 Answers 2


Another symmetrical object. Origin is the center:


\def\Radius{19.2}  \def\lige{33.3}
\newlength\R \R=\Radius\psunit %  relative setting to \psunit
\newlength\hW  \hW=\lige\psunit \hW=0.5\hW

  \psarc( \hW,0){\R}{270}{90}
  \psline[linestyle=dotted]( \hW,-\R)( \hW,\R)
  \psline(-\hW, \R)(\hW, \R)  
  \rput*(\dimexpr\hW+0.5\R,0) {\SI{\Radius}{\cm}}

  • Really great, as always! Apr 26, 2013 at 4:08
  • 1
    Unfortunately \dimexpr does not fully support algebraic expressions such as trigonometric expressions, logarithmic expressions, etc. Then this answer is just a special lucky case. :-) Apr 26, 2013 at 5:40

Using pst-sex package to provide constants in both TeX and PS worlds at the same time.

enter image description here




        \pnodes{P}(!Radius Height)(!Radius Width add Height)(!Radius Width add Radius)
    %\rput(!Radius Width add 0){\rput{180}(0,0){\rput(-\Radius,-\Height){\Semi}}}
    %\uput{0}[0]{180}(!Radius Width add 0){\rput(-\Radius,-\Height){\Semi}}
    \rput{180}(!Radius 2 mul Width add Height){\Semi}
    \pcline[linestyle=dotted](!Radius Radius)(!Radius Width add Radius)


Next time please use English names for the constants.

  • When I uncomment the \pstFPmul commands and try to use the \edef ones instead, the document won't compile. THe problem is probably regarding the unit definition, as Herbert mentioned in the other post. Apr 25, 2013 at 14:55
  • Okay. \bredde = 2*\radius and \laengde = \bredde+\lige. (The \edefs are wrong.) Apr 25, 2013 at 15:00
  • @Bugbusters I won't see your (or any others) post before tomorrow. Good day to everyone. Apr 25, 2013 at 15:10
  • @Bugbusters can you do a favour of making this title more clear based on comments below Q :) Apr 25, 2013 at 15:15
  • 1
    @texenthusiast: I think I should not rephrase the title as the questioner should always provide more descriptive and specific title. :-) Apr 26, 2013 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.