2

I was surprised when I saw this result!

I want to put, starting from my lower left corner, a pink, a red, and a blue node,

BUT

I was surprised when I saw that the three nodes started from the upper right corner!

I solved the problem by changing -0.25 to 0

BUT, WHY does PStricks do this?

\documentclass[12pt,a4paper]{standalone}
\usepackage{setspace} % para que no afecte el interlineado a las notas de pié de página
\setstretch{1.5}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage{amsmath,amsfonts,amssymb,latexsym}
\usepackage{eurosym}
\usepackage{graphicx}
\usepackage{verbatim}
\usepackage{hyperref}
\hypersetup{colorlinks=true, urlcolor=blue}
\usepackage{xcolor}
\usepackage{mathpazo}       % Fuente MathPazo
\usepackage{datetime}       % paquete para configurar formato de fecha y hora
\settimeformat{ampmtime}
\renewcommand*{\noon}{\pmname}

\spanishdecimal{.}
% ----------------------  PSTRICKS ---------------
\usepackage{pstricks}
\usepackage{pst-plot,pst-3dplot,pst-node,pst-tree,pst-grad,pst-coil,pst-text,pst-3d,pst-eps,pst-fill,pstricks-add,multido}
% -------- Paquetes de pst-all \usepackage{pst-all}   paquete pstricks para las figuras en postcript
\usepackage{pst-node}
\usepackage{pst-eps}
\usepackage{pstricks-add}
% ---- Fin Paquetes de pst-all
\begin{document}
\begin{pspicture}(-0.25,-0.25)(14.50,10.20) %\malla
\psset{xunit=1cm,yunit=1cm}
\psframe[fillcolor=lightgray,fillstyle=solid,linestyle=none](-0.25,-0.25)(14.50,10.20)

\cnode[fillstyle=solid,fillcolor=pink](1,1){0.15}{Current}
\cnode[fillstyle=solid,fillcolor=red](4,1){0.15}{Current}
\cnode[fillstyle=solid,fillcolor=blue](8,1){0.15}{Current}

 \end{pspicture}

\end{document} 

Try substituting -0.25 with 0 in pspicture and in psframe. It solves the problem!

2

Please provide minimal examples! Ghostscript is too clever here. It thinks that your page should rotated. Use xelatex or ps2pdf -dAutoRotatePages=/None <file>.ps or show the grid, then you'll get it upright:

\documentclass[12pt,a4paper]{standalone}

\usepackage{pst-node}
\begin{document}
\begin{pspicture}[showgrid=top](-0.5,-0.5)(14.50,10.20) %\malla
\psframe[fillcolor=lightgray,fillstyle=solid,linestyle=none,opacity=0.4](-0.25,-0.25)(14.50,10.20)
\cnode[fillstyle=solid,fillcolor=pink](1,1){0.15}{Current}
\cnode[fillstyle=solid,fillcolor=red](4,1){0.15}{Current}
\cnode[fillstyle=solid,fillcolor=blue](8,1){0.15}{Current}
\end{pspicture}

\end{document}

enter image description here

0

The minimal working example to reproduce your issue is given as follows.

\documentclass[pstricks,border=12pt]{standalone}
\begin{document}
\begin{pspicture}(4,3)
    \psframe(4,3)
    \rput{90}(2,1.5){A}
\end{pspicture}
\end{document}

Note that showgrid must be false (by default).

Compiling with latex, followed by dvips, followed by ps2pdf will produce an auto-rotated output as follows.

enter image description here

To avoid this issue, pass -dAutoRotatePages=/None to ps2pdf. By doing so, you will get what you want to get as follows.

enter image description here

Simulation

The following simulates the scenario in a self-contained code. Make sure you compile it with pdflatex -shell-escape simulation.tex.

% simulation.tex

\documentclass[preview,border=12pt]{standalone}

\usepackage{filecontents}
\begin{filecontents*}{diagram.tex}
\documentclass[pstricks,border=12pt]{standalone}
\begin{document}
\begin{pspicture}(4,3)
    \psframe(4,3)
    \rput{90}(2,1.5){A}
\end{pspicture}
\end{document}
\end{filecontents*}

\usepackage{graphicx,pgffor}
\def\PreventAutoRotate{\foreach \compiler/\ext in {latex/tex,dvips/dvi,{ps2pdf -dAutoRotatePages=/None}/ps}{\immediate\write18{\compiler\space diagram.\ext}}}
\def\LetAutoRotate{\foreach \compiler/\ext in {latex/tex,dvips/dvi,ps2pdf/ps}{\immediate\write18{\compiler\space diagram.\ext}}}

\begin{document}
\PreventAutoRotate
%\LetAutoRotate
\noindent\includegraphics{diagram}
\end{document}

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.