2

I’m trying to produce a pspicture with marked angles, so I’m using the pstricks extention pst-eucl. Here is a minimal example: (I’m using MikTeX 9.25 together with TeXmaker on Windows 7)

\documentclass[12pt,a4paper]{report}

%\usepackage[latin1]{inputenc}
%\usepackage[francais]{babel}
%\usepackage[T1]{fontenc}

\usepackage{fontspec} 
\usepackage{xunicode}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\usepackage{pstricks}
\usepackage{pstricks-add}
\usepackage{pst-tools,pst-plot,pst-eucl}

\usepackage{graphicx}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}

\begin{document}
  \begin{center}
       \resizebox{0.8\linewidth}{!}{
            \begin{pspicture}(-1,-1)(6,6)
                \psset{nodesep=-1cm}
                \psset{PointName=none, PointSymbol=none}
                \pstGeonode[PosAngle=90](0,1){A}(5,2){B}(0,4){C}(5,3){D}(2,5){E}(4,0){F}
                \pstLineAB{A}{B}
                \pstLineAB{C}{D}
                \pstLineAB{E}{F}
                \pstInterLL{C}{D}{E}{F}{G}
                \pstInterLL{A}{B}{E}{F}{H}
                \uput[135](C){\Large $(d_1)$} \uput[135](A){\Large $(d_2)$} \uput[45](E){\Large $(d_3)$}
                \pstMarkAngle[fillstyle=solid, fillcolor=gray,  MarkAngleRadius=.5]{H}{G}{D}{}
                \pstMarkAngle[fillstyle=solid, fillcolor=gray, MarkAngleRadius=.7]{G}{H}{A}{}
            \end{pspicture}                 
       }
  \end{center}

\end{document}

It seems that there is some kind of conflict between pstricks and XeLaTeX. When using \pstMarkAngle this is the message of error I get:

MikTeX GPL Ghostscript 9.25 : Unrecoverable error, exit code 1

It slows down the compilation but doesn’t break it though. At the end, the compiler announces that there were no errors. This is unconvenient because when loading multiple pspictures containing \pstMarkAngle the compilation takes much more longer.

The problem does not seem to take place when using LaTeX instead of XeLaTeX. But changing to LaTeX for me is not the desired solution.

Does anyone have an idea what is going wrong? I searched for the solution with no success, and any help would be appreciated. Thank you very much.

1

no problem with an up-to-date TeXLive 2019:

\documentclass[12pt,a4paper]{report}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{fontspec} 
\usepackage{pst-tools,pst-plot,pst-eucl}
\usepackage{pstricks-add}

\usepackage{graphicx}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}

\begin{document}
\begin{center}
\resizebox{0.8\linewidth}{!}{%
    \begin{pspicture}(-1,-1)(6,6)
        \psset{nodesep=-1cm}
        \psset{PointName=none, PointSymbol=none}
        \pstGeonode[PosAngle=90](0,1){A}(5,2){B}(0,4){C}(5,3){D}(2,5){E}(4,0){F}
        \pstInterLL{C}{D}{E}{F}{G}
        \pstInterLL{A}{B}{E}{F}{H}
        \uput[135](C){\Large $(d_1)$} \uput[135](A){\Large $(d_2)$} \uput[45](E){\Large $(d_3)$}
        \pstMarkAngle[fillstyle=solid, fillcolor=gray,  MarkAngleRadius=.5]{H}{G}{D}{}
        \pstMarkAngle[fillstyle=solid, fillcolor=gray, MarkAngleRadius=.7]{G}{H}{A}{}
        \pstLineAB{A}{B}
        \pstLineAB{C}{D}
        \pstLineAB{E}{F}
    \end{pspicture}%
}
\end{center}

\end{document}

enter image description here

For MikTeX try the following under Windows in a cmd command window:

xelatex --no-pdf <file>
xdvipdfmx -dNoSafer -vv <file>.xdv

it should create a document and in the terminal output you'll see what's the problem.

  • Good to know. Although changing from MikTeX to TeXlive may generate other complications for me. Is it an inner problem in MikTeX or si there a fix for this situation somewhere? – ladi May 5 at 8:16
  • see at the end of my answer. – Red-Cloud May 5 at 8:51
  • Sorry, my mistake, didn’t see the end of the message. I tried the compiling instructions you suggested, and the log file indicates some problems relating to the language, nothing about pstMarkAngle, although nothing in the code indicates that I am using other language than English, there is no accents in the text. Here is some of the messages of the log file: - Invalid UTF-8 byte or sequence at line 35 replaced by U+FFFD. - Package fontspec Info: Adjusting the maths setup (use [no-math] to avoid (fontspec) this). - LaTeX Font Info:Try loading font information for U+msa on input line 21. – ladi May 5 at 9:41
  • Out-of-topic: I found a weird thing in which pst-news16 shows 2017. – Gold Digging Programmer May 8 at 10:04

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.