# graphics in pstricks, etc., not working

I'm using TeXworks and MiKTeX on Windows 7 Professional, and also LaTeX on a Linux machine, and including some graphics commands seen below. On windows, the diagonal lines are not visible, and that might not be much of a problem although it's irritating. But on Windows, I also get error messages about psarc and psline not being recognized, despite the inclusion of this:

\usepackage{pict2e}
\usepackage{pst-node,pst-plot}
\psset{plotpoints=9,unit=3}


And on Linux I haven't been able to get the arrows to work right. I had something like this:

\put(125,2){\psline(1,0){45}}


(Some numbers specifying locations of things have changed since I ran this; I don't think 125 and 2 would be right for what I have here.) I had thought {45} would be the length of the arrow

It put an arrow where I wanted it but also showed the number 45. So then I wrote

\put(125,2){\psline(1,0)}


without that number and it still put the arrow just where I wanted it, without the number 45. How the end of the arrow ended up in the right place I don't know, but then I tried another arrow, and it ended up longer than what I wanted, and I have no idea what determines the length of the arrow or how to get it to be what I want.

I also haven't gotten \psarc to work. I tried to follow an online manual that was a long pdf document; I don't have the URL just now.

I only need simple stuff: line segments, arrows, arcs of circles, and mathematical notation. The line segments and the mathematical notation haven't been any problem at all; the rest isn't working. What should I do?

\documentclass[12pt]{article}

\usepackage{pict2e}
\usepackage{pst-node,pst-plot}
\psset{plotpoints=9,unit=3}

\usepackage{eepic}

\begin{document}

Lorem ipsum.
%
\begin{figure}[h]
\setlength{\unitlength}{0.66mm}
\begin{picture}(100,130)(0,0)
% \thicklines
\put(80,8){\line(1,0){90}}
\put(170,8){\line(0,1){120}}
\put(80,8){\line(3,4){90}}
\put(90,13){$\theta$}
%  \psarc*[linewidth=1pt](10,8){20}{0}{53}
\put(175,68){$\tan\theta$}
\put(110,68){$\sec\theta$}
\put(120,0){$1$}
%  {\psset{arrows=->}
%  \put(125,2){\psline(1,0)}
%  \put(117,2){\psline(-1,0)} }
\put(74,0){$V$}
\end{picture}
\caption{}\label{big triangle}
\end{figure}

Lorem ipsum.

\end{document}

• Please post a complete small document demonstrating the issue. Have you compared the versions of packages you are using and the version of TeX in the two cases?
– cfr
May 27 '14 at 23:50
• I'm not sure it's a good idea to mix commands from pict2e and from \pstricks. May 28 '14 at 1:17
• @Bernard : OK, you now see a complete file. May 28 '14 at 2:04
• Are you trying to draw commutative diagrams? May 28 '14 at 3:45
• There is a problem with the units: for the picture environment, it is 0.66 mm, for pstricks it is 3, whih means 3cm. So the centre of your arc is set at (30cm, 24cm), which is outside of a normal page! Also I don't see why you load eepic. I have an idea of what you want to draw, but (if I'm right) everything can be done very simply from within pstricks. May 28 '14 at 8:36

Just for fun!

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}[PointSymbol=none](4,6)
\pstGeonode[PointName={V,none},PosAngle=-135,CurveType=polygon,linecolor=red]{A}(4,0){B}(4,6){C}
\pstMarkAngle[arrows=->,MarkAngleRadius=4]{B}{A}{C}{$\theta$}
\pcline[offset=-8pt,linecolor=red]{|*-|*}(A)(B)\ncput*{1}
\ncline[linestyle=none]{A}{C}\naput[nrot=:U]{$\sec \theta$}
\ncline[linestyle=none]{C}{B}\naput[nrot=:U]{$\tan \theta$}
\end{pspicture}
\end{document}


• In the course of running this I needed to download three style files and then I was told that \pstMarkAngle is an undefined control sequence. May 29 '14 at 12:22

Is that more or less what you want?

\documentclass[11pt, x11names, pdf]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{heuristica}

\usepackage{caption}

\begin{document}

Lorem ipsum.
%
\begin{figure}[!ht ]
\centering
\begin{pspicture}(-1,-1,)(7,9)
\psset{unit=6,shortput = nab, linecolor = IndianRed3,arrows = c-c}
\pnodes(0,0){V}(1,0){A}(1,1.333){T}(1;53){M}
\uput[dl](V){$V$}
\ncline[arrows = c-]{V}{A}\ncline[offset = -0.05, linewidth = 0.5pt, arrows = |<->|]{V}{A}\ncput*{1}
\ncline{T}{A}\ncline[offset = 0.05, linewidth = 0.5pt, arrows = |<->|]{T}{A}\ncput*[nrot=:U]{$\tan θ$}
\ncline{V}{T}\ncline[offset = 0.05, linewidth = 0.5pt, arrows = |<->|]{V}{T}\ncput*[nrot=:U]{$\sec θ$}
\psarc[linecolor =LightSteelBlue3,linewidth = 1.5pt](V){1}{0}{53}\uput[dl](1;27){$θ$}
\end{pspicture}
\caption{}\label{big triangle}
\end{figure}

Lorem ipsum.

\end{document}


• Thank you. That's definitely well on the way toward what I need. I will need some arcs of circles without arrows, and some arrows like the ones surrounding the "1" also surrounding the \sec\theta and \tan\theta, and some other similar ones on at least one additional triangle yet to be drawn. But the first snag I hit is that \ncline is an "undefined control sequence". Is there some package that needs to be used for that? May 28 '14 at 19:44
• ??? I don't understand. It is a very common command, defined in pst-node, which is loaded by pstricks-add. Maybe you added unvoluntarily a spurious space, such as \ ncline. Did you try to compile the code "as is"? May 28 '14 at 19:51
• @Michael Hardy: I've just modified my answer to adapt to some of your requirements. May 28 '14 at 20:41
• I haven't yet tried running a file that is verbatim the same as what you've got here; I just pasted some of your code into my file. I will try that, and I also have a suspicion about something else. May 28 '14 at 21:06
• OK, now I've tried running the file you've got above, verbatim. I was told that fourier.sty was missing. Before bothering with that, I removed the things about colors to see if that would make a difference. Then I had to install about a half-dozen other files, including heuristica.sty, which was not in any of the "repositories" but could be found on the web. Then I was told I needed mweights.sty, and similarly I had to go looking for that. OK, next is etoolbox.sty. Then fontaxes.sty. Then caption.sty. Then "'shell escape' (or 'write18') is not enabled: auto-pst-pdf will not work!" May 28 '14 at 21:33