Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

According to PSTricks manual, as shown in the screenshot below, there is an optional angle option.

enter image description here

Unfortunately, the example above does not show how to use angle option.

I have tried using angle but I always fail. The option does not affect anything.

enter image description here

\documentclass[border=12pt]{standalone}  
\usepackage{pst-eucl,multido}

\begin{document}
\multido{\i=0+30}{3}{%
\begin{pspicture}[showgrid](6,6)
    \pstGeonode(0,5){B}(3,3){A}
    \pstLineAB[nodesepB=-3]{B}{A}
    \pstCircleOA[Radius=\pstDistVal{1},linestyle=dashed]{A}{}
    \uput{1.5}[90](A){angle=$\i^\circ$}
    \psline[linecolor=blue]([offset=1,angle=\i]{B}A)% does not affect anything!
\end{pspicture}\hspace{5mm}}

\end{document}

How to use angle option when using ([angle=number]{node1} node2) notation?

share|improve this question
I discard the bounty because there is no useful answer. – Click Me Aug 18 '12 at 15:28

3 Answers

\documentclass{article}  
\usepackage{pst-node}\SpecialCoor

\begin{document}
\begin{pspicture}[showgrid](4,4)
  \pnode(3,3){A}\psdot[dotscale=2](A)\uput[135](A){A}
  \pnode(4,0){B}\psline[linestyle=dotted](A)(B)
  \pscircle[linestyle=dotted](A){1}
  \psline([nodesep=1]A)                \uput[0](3.5,2){I}
  \psline[linecolor=red]([nodesep=-1]A)\uput[-45](2,4){II}
  \psline[linecolor=blue]([offset=1]A) \uput[-225](4,4){III}
  \psline[linecolor=green]([offset=1]A)\uput[0](2,2){IV}
\end{pspicture}
\qquad
\begin{pspicture}[showgrid](4,4)
  \pnode(3,3){A}\psdot[dotscale=2](A)\uput[135](A){A}
  \pnode(4,0){B}\psline[linestyle=dotted](A)(B)
  \pscircle[linestyle=dotted](A){1}
  \psline([nodesep=1,angle=-45]A)                \uput[0](3.5,2){I}
  \psline[linecolor=red]([nodesep=-1,angle=-45]A)\uput[-45](2,4){II}
  \psline[linecolor=blue]([offset=1,angle=-45]A) \uput[-225](4,4){III}
  \psline[linecolor=green]([offset=1,angle=135]A)\uput[0](2,2){IV}
\end{pspicture}
\qquad
\begin{pspicture}[showgrid](4,4)
  \pnode(3,3){A}\psdot[dotscale=2](A)\uput[135](A){A}
  \pnode(4,0){B}\psline[linestyle=dotted](A)(B)
  \pscircle[linestyle=dotted](A){1}
  \psline([nodesep=1,angle=-45]{B}A)                \uput[0](3.5,2){I}
  \psline[linecolor=red]([nodesep=-1,angle=-45]{B}A)\uput[-45](2,4){II}
  \psline[linecolor=blue]([offset=1,angle=-45]{B}A) \uput[-225](4,4){III}
  \psline[linecolor=green]([offset=1,angle=135]{B}A)\uput[0](2,2){IV}
\end{pspicture}

\end{document}

enter image description here

share|improve this answer
Your answer for me is a little bit subtle. How do you use the ([angle=number]{node1} node2) syntax based on your answer? Can I also ask you about if my answer is wrong ? (I'll happily delete it if it is) – percusse Aug 12 '12 at 13:15
it should not be too difficult to insert the second node ... ;-) – Herbert Aug 12 '12 at 13:16
I still cannot notice the difference when changing the angle for your third example. – Click Me Aug 12 '12 at 13:41

I can say, with some degree of certainty, that it is a typo since ([angle=number]{node1} node2) has the constraint that the result should be on the virtual line connecting A to B. So an additional angle option would be confusing. The angle is working just fine when you have ([angle=number]node) syntax :

\documentclass[border=12pt,pstricks]{standalone}  
\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}[showgrid](6,6)
    \pstGeonode(0,5){B}(3,3){A}
    \pstCircleOA[Radius=\pstDistVal{1},linestyle=dashed]{A}{}
    \psline[linecolor=blue]([angle=-90,nodesep=1]B)
    ([angle=45,nodesep=1.414]A)
\end{pspicture}
\end{document}

enter image description here

In the relative point syntax the virtual line from (B) to (A) is the nodesep direction and normal to that line at (A) is the offset direction.

\documentclass[border=12pt,pstricks]{standalone}  
\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}[showgrid](4,4)
    \pstGeonode(0,4){B}(3,3){A}
    \pstCircleOA[Radius=\pstDistVal{1},linestyle=dashed]{A}{}
    \psline[linecolor=blue]([nodesep=2]{B}A)(A)([offset=2]{B}A)
    \psline[linecolor=green]([offset=0.1]{B}A)
    \psline[linecolor=green]([offset=0.3]{B}A)
    \psline[linecolor=green]([offset=0.5]{B}A)
    \psline[linecolor=green]([offset=0.7]{B}A)
    \psline[linecolor=green]([offset=0.9]{B}A)
    \psline[linecolor=green]([offset=1.1]{B}A)
\end{pspicture}
\end{document}

enter image description here

share|improve this answer
Please see the green line in my code, the node in question is no longer in the line connecting nodes A and B. – Click Me Aug 12 '12 at 12:23
@GarbageCollector I've added more details. – percusse Aug 12 '12 at 12:46
"The position is relative to node A and on the virtual line joining nodes A and B" is contradictory to our result when using offset because the resulting node is not in the virtual line. – Click Me Aug 12 '12 at 13:25
@GarbageCollector You are right but a little bit of relief comes from the paragraph before that: Using both nodesep and offset allow to define relative moves (nodesep for horizontal and offset for vertical) from an existing node. – percusse Aug 12 '12 at 13:27
up vote 0 down vote accepted

Using angle option might be a feature that has not been implemented.

share|improve this answer
Even if it is a feature what would it do other than ([angle=number]node)? – percusse Aug 12 '12 at 20:54
@percusse: I don't know. Maybe relative to point B in my example above. :-) – Click Me Aug 13 '12 at 9:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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