I'm using Ubuntu 19.04 and Emacs 26.1. Whenever I try to use inline preview (with any region, section, or environment that has inline math), I get the following error:

TeX Output exited as expected with code 1 at Mon May 13 20:01:20
Running `Preview-PDF2DSC' with ``pdf2dsc _region_.pdf _region_.prv/tmpQWkzKT/preview.dsc''

Preview-PDF2DSC killed at Mon May 13 20:01:20
LaTeX: Wrong type argument: number-or-marker-p, nil

and the preview job quits. When I enable debugging, with M-x toggle-debug-on-error, I get the following output:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  signal(wrong-type-argument (number-or-marker-p nil))
  preview-reraise-error(#<process Preview-LaTeX>)
  preview-TeX-inline-sentinel(#<process Preview-LaTeX> "Preview-LaTeX")
  TeX-command-sentinel(#<process Preview-LaTeX> "exited abnormally with code 1\n")

I've tried the answer posted in this link but my preview-gs-command variable is already set to usr/bin/gs, which I think is sufficient.

Please let me know where I can find a fix to this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.