2

(Win8 + Winedt 10.2 + MikTeX 2.9.6515)

I usually use Winedt with PDFLaTeX or PDFTeXify, with this icon enter image description here

If I want to compile a PsTricks code, I need to: 1.- compile with LATEX (L icon), then 2.- DVI2PS (icon), then 3.- PS2PDF (icon), and finally I obtain the PDF file. enter image description here

BUT... If I want to use PDFLaTeX directly with a PSTRicks code I obtain the error: "! Undefined control sequence. \c@lor@to@ps ->\PSTricks_Not_Configured_For_This_Format l.13 ...{\circlenode{IL}{\textcolor{red}{I like}}}"

The question is: How could I do that proccess directly? or How to use PsTricks code using PDFLaTeX(PDFTeXify or other similar)?. In this example to obtain the final result: enter image description here

\documentclass[pstricks,border=12pt]{standalone}
%
\usepackage[utf8]{inputenc}
\usepackage{eurosym}
\usepackage{pst-node}
\usepackage{pstricks-add}

\begin{document}

 \begin{pspicture}(-2,-2)(12,6) %\malla

 \rput(4.5,3){\circlenode{IL}{\textcolor{red}{I like}}}
 \rput(8.5,3.5){\circlenode{L}{\textcolor{blue}{\LaTeX}}}
 \rput(6.5,-0.5){\circlenode{G}{\textcolor{blue}{\footnotesize{Galicia(Spain)}}}}


 \ncarc[arcangle=22]{->}{IL}{L}
 \nbput*{\small Yes}   % This line show error on compiling.

 \ncarc[arcangle=22]{->}{L}{IL}
 \ncput*{\small No}   % This l

 \ncarc[arcangle=8]{->}{L}{G}
 \ncarc[arcangle=-22,linewidth=0.05,linecolor=red]{->}{G}{L}

 \ncarc[arcangle=-22,linewidth=0.05,linecolor=red,linestyle=dashed]{->}{IL}{G}

 \rput(2,0){This is a test.}
\rput(8,-2){Esto é unha proba.}


 \end{pspicture}
\end{document} 
1
  • 2
    There is a winedt macro package called latexify, winedt.org/config/menus/LaTeXify.html that offers more shortcuts, e.g. LaTeXify2PDF (runs Biber and TeXify+dvips+ps2pdf with LaTeX engine). Or you could use arara or latexmk. Jan 6, 2018 at 18:31

1 Answer 1

3

Use xelatex instead of latex->dvips->ps2pdf. It needs only some changes:

\documentclass[pstricks,border=12pt]{standalone}
%
%\usepackage[utf8]{inputenc}
\usepackage{eurosym}
\usepackage{fontspec}
\usepackage{pst-node}
\usepackage{pstricks-add}
[...]

UTF-8 is the default of xelatex

2
  • is this valid for tikz pictures?… in general
    – Mika Ike
    Jan 6, 2018 at 22:26
  • 1
    Yes, there is no difference
    – user2478
    Jan 6, 2018 at 22:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .