I am trying to compile a latex file (opened buffer) with the following command in order to suppress its compilation logs:
`pdflatex -shell-escape -interaction=batchmode current_buffer.tex`
----------
I keep seeing following message in the minibuffer when a tex file is compiled:
```LaTeX: problems after [0] pages```
I couldn't figure out why this error shows up even the tex file compiled successfully. Would it be possible to suppress this message?
------
Following [solution][1] is used as base to compile current buffer that is a `LaTeX` file with merge of the solution here:
https://emacs.stackexchange.com/questions/72030/how-can-i-prevent-pdflatex-logs-to-created/72102?noredirect=1#comment117106_72102```lisp
(require 'package)
(setq user-init-file (or load-file-name (buffer-file-name)))
(setq user-emacs-directory (file-name-directory user-init-file))
(add-to-list 'package-archives
'("melpa" . "
https://melpa.org/packages/") t)
(package-initialize)
(setq frame-background-mode 'dark)
(require 'tex)
(add-to-list 'TeX-expand-list
'("%(mode)"
(lambda nil
(if TeX-interactive-mode ""
" -interaction=batchmode"))))
(setq TeX-command-extra-options " -shell-escape")
(defun my-run-latex ()
"Save all buffers and run LaTeX on the current master."
(interactive)
(let* ((inhibit-message t)
(TeX-command-force "LaTeX")
(TeX-clean-confirm t)
(TeX-save-query nil)
(master (TeX-master-file))
(process (and (stringp master) (TeX-process master))))
(TeX-save-document master)
(when (and (processp process)
(eq (process-status process) 'run))
(delete-process process))
(TeX-command-master)))
(setq LaTeX-item-indent 0)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(add-hook 'LaTeX-mode-hook 'hl-todo-mode)
(add-hook 'TeX-update-style-hook 'hl-todo-mode)
(add-hook 'LaTeX-mode-hook 'writegood-mode)
(add-hook 'LaTeX-mode-hook (lambda ()
(TeX-global-PDF-mode t)))
```
Minimal `tex` file to open emacs with:
```tex
\documentclass[border=0.2cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.symbols}
\begin{document}
\begin{tikzpicture}
\node at (0,0) [forbidden sign,line width=2ex,draw=red,fill=white] {Smoking};
\node [opacity=.5] at (2,0) [forbidden sign,line width=2ex,draw=red,fill=white] {Smoking};
\end{tikzpicture}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
```
---------
- compile log:
```text
Running `LaTeX' on `emacs' with ``pdflatex -shell-escape -interaction=batchmode emacs.tex''
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022) (preloaded format=pdflatex)
\write18 enabled.
entering extended mode
/Users/alper/venv/bin/pygmentize
TeX Output finished at Fri Jul 1 12:11:47
```
Question related to `LaTeX: problems after [0] pages` is asked here [Emacs gives me "Latex: problems after \[0\] pages"][2]: I have applied the following configuration, which did not helped.
> ```tex
> (add-to-list
> 'TeX-expand-list
> (list "%(extraopts)"
> (lambda nil TeX-command-extra-options)))
> ```
[1]:
https://emacs.stackexchange.com/a/65076/18414 [2]:
https://tex.stackexchange.com/a/232278/127048