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?