0

Suppose I create a latex document in ~/junk/text.tex with the following conent:

\documentclass{article}
\begin{document}
$x$
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

I then run C-c C-p C-b and preview-latex works as expected. The folder _region_.prv and the files _region_.log, prv_test.fmt, prv_test.log and _region_.tex get created (and the folder auto as well). When I delete the folder and those files, preview-latex won't work anymore. I get the error

Running `Preview-LaTeX' on `~/junk/_region_' with ``lualatex  -interaction=nonstopmode -file-line-error \&prv_test "/AUCTEXINPUT{" _region_.tex "}"''
This is LuaTeX, Version 1.07.0 (TeX Live 2018/Arch Linux) 
 restricted system commands enabled.

kpathsea: Running mktexfmt prv_test.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt:   /etc/texmf/web2c/fmtutil.cnf
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt:   /home/berber/.texlive/texmf-config/web2c/fmtutil.cnf
mktexfmt [INFO]: writing formats under /home/berber/.texlive/texmf-var/web2c
mktexfmt [INFO]: did not find entry for byfmt=prv_test, skipped
mktexfmt [INFO]: Disabled formats: 6
mktexfmt [INFO]: Not selected formats: 36
mktexfmt [INFO]: Total formats: 42
mktexfmt [INFO]: exiting with status 0
Sorry, I can't find the format `prv_test.fmt'; will try `prv_test.fmt'.

kpathsea: Running mktexfmt prv_test.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt:   /etc/texmf/web2c/fmtutil.cnf
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt:   /home/berber/.texlive/texmf-config/web2c/fmtutil.cnf
mktexfmt [INFO]: writing formats under /home/berber/.texlive/texmf-var/web2c
mktexfmt [INFO]: did not find entry for byfmt=prv_test, skipped
mktexfmt [INFO]: Disabled formats: 6
mktexfmt [INFO]: Not selected formats: 36
mktexfmt [INFO]: Total formats: 42
mktexfmt [INFO]: exiting with status 0
I can't find the format file `prv_test.fmt'!

TeX Output exited as expected with code 1 at Mon Jun  3 16:17:28
LaTeX: LaTeX found no preview images

How can I make preview-latex work again?

  • Try renaming the file and/or the containing folder, kill the buffer and reopen the file. It seems something gets cached and screws up subsequent attempts to preview, because it expects the cached image to still be in the region.prv directory. – NickD Jun 5 '19 at 14:54
  • ... and report it as a bug. – NickD Jun 5 '19 at 15:07

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.