0

I am encountering an error that I am very confused by. My usual method of googling and looking at other answers has not helped. I am trying to include some image files, and I get the following error.

### ps2pdf -dCompatibilityLevel=1.5  /tmp/altpdflatex.4031-1618004853/q-polytope.2021.4.2.ps /tmp/altpdflatex.4031-1618004853/q-polytope.2021.4.2.pdf
Error: /syntaxerror in (binary token, type=137)
Operand stack:
   1950.0   2954.0   0.0   -128.037   128.037   -71.1319   128.037   71.1319   0.0   128.037   -128.037   71.1319
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1974   1   3   %oparray_pop   1973   1   3   %oparray_pop   1961   1   3   %oparray_pop   1817   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:727/1123(ro)(G)--   --dict:1/20(G)--   --dict:199/200(L)--   --dict:212/300(L)--   --dict:97/200(L)--
Current allocation mode is local
Current file position is 556914
GPL Ghostscript 9.50: Unrecoverable error, exit code 1
GPL Ghostscript 9.50: ERROR: A pdfmark destination page 15 points beyond the last page 14.
### FAILED to generate /tmp/altpdflatex.4031-1618004853/q-polytope.2021.4.2.pdf ()

My latex file looks something like this


\documentclass[12pt]{amsart}

\usepackage{amsmath,amssymb,euscript,mathrsfs,bm,enumerate,pstricks}

\usepackage[shortlabels]{enumitem}

\usepackage{tikz-cd} \usepackage{graphicx} \graphicspath{ {./images/} }

\usepackage[colorlinks=true,linkcolor=black,citecolor=black,urlcolor=black]{hyperref}

\begin{figure}[h!] \centering \subcaptionbox{a nice picture}[.3\linewidth][c]{% \includegraphics[width=.8\linewidth,natwidth=640,natheight=412]{filename.png}}\quad \end{figure}

I am using texshop, and typesetting using xelatex. Does anyone have any idea what could be the issue?

A. S.
  • 101
  • 2
    why do you call ps2pdf if you are using xelatex? Oh you mean, you get it during the compilation? Make a small, complete real example that demonstrates the error and can be tested. Give also access to the picture if it is part of the problem. – Ulrike Fischer Apr 09 '21 at 22:12
  • That is correct. The code that I have kept above is indeed my own code with some portions redacted and file names changed. I will see if I can give more but I believe all the relevant parts of the code are there. – A. S. Apr 10 '21 at 04:46
  • At first it doesn't compile as it incomplete. And we don't have the picture so can't use it for a test. And don't only believe that the code contains all the relevant code but test it. You will perhaps have to show the log too. – Ulrike Fischer Apr 10 '21 at 07:29

0 Answers0