3

This question already has an answer here:

The conversion of dvi to pdf fails when using the \arrow command. For instance, the file

\documentclass{article}
\usepackage{chemfig}

\begin{document}
\schemestart
A\arrow B
\schemestop
\end{document}

returns:

Error: /undefined in XC@. Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostring

val-- --nostringval-- false 1 %stopped_push 2045 1 3 %oparray_pop 2044 1 3 %oparray_pop 2025 1 3 %oparray_pop 1884 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:961/1684(ro)(G)-- --dict:1/20(G)-- --dict:88/200(L)-- --dict:178/300(L)-- --dict:58/200(L)-- Current allocation mode is local Current file position is 33303 GPL Ghostscript 9.26: Unrecoverable error, exit code 1

Thank you for helping !

marked as duplicate by user36296, egreg, Tiuri, Milo, Phelype Oleinik Jan 28 at 13:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I have tried with Papeeria that it use TeXlive 2015 and your code works correctly. What OS you use and what is your LaTeX distribuition? Maybe your distribution could be obsolete. – Sebastiano Jan 27 at 21:51
  • Thank you for your answer but my distribution is not obsolete. – GézàLaTeX Jan 28 at 8:44
  • 1
    The compilation runs well with TeX Live 2017. With TL 2018 chemfig is version 1.33; was 1.2e with TL 2017. The differences are huge. – egreg Jan 28 at 11:21
  • 1
    @GézàLaTeX Excuse me for my comment. I thought that the problem was the distribution. – Sebastiano Jan 28 at 11:41
  • 1
    chemfig depends on PGF/TikZ. PGF v3.1 has a bug in its dvips driver which will be fixed in the next release, acc. to this topic: tex.stackexchange.com/q/470077 – AlexG Jan 28 at 12:46
3

For some reason, the dvi file produced with TL2018 contains 'color push XC@.', which is the source of the problem. I'm not sure what's the cause, but if you add

\usepackage[rgb]{xcolor}

to force a color model and avoid cmyk, the problem vanishes.

\documentclass{article}
\usepackage[rgb]{xcolor}
\usepackage{chemfig}

\begin{document}
\schemestart
A\arrow B
\schemestop
\end{document}

enter image description here

  • 2
    Forcing cmyk works as well. – egreg Jan 28 at 12:24
  • 1
    It is an issue with the recent PGF update and its dvips driver. – AlexG Jan 28 at 12:54
  • @AlexG I suspected so. – egreg Jan 28 at 13:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.