Variable: org-latex-pdf-process

org-latex-pdf-process is a customizable variable defined in ox-latex.el.gz.

Value

("%latex -interaction nonstopmode -output-directory %o %f"
 "%latex -interaction nonstopmode -output-directory %o %f"
 "%latex -interaction nonstopmode -output-directory %o %f")

Documentation

Commands to process a LaTeX file to a PDF file.

The command output will be parsed to extract compilation errors and warnings according to org-latex-known-warnings.

This is a list of strings, each of them will be given to the shell as a command. %f in the command will be replaced by the relative file name, %F by the absolute file name, %b by the file base name (i.e. without directory and extension parts), %o by the base directory of the file, %O by the absolute file name of the output file, %latex is the LaTeX compiler (see org-latex-compiler), and %bib is the BibTeX-like compiler (see org-latex-bib-compiler).

The reason why this is a list is that it usually takes several runs of pdflatex, maybe mixed with a call to bibtex. Org does not have a clever mechanism to detect which of these commands have to be run to get to a stable result, and it also does not do any error checking.

Consider a smart LaTeX compiler such as texi2dvi or latexmk, which calls the "correct" combinations of auxiliary programs.

Alternatively, this may be a Lisp function that does the processing, so you could use this to apply the machinery of AUCTeX or the Emacs LaTeX mode. This function should accept the file name as its single argument.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-latex.el.gz
(defcustom org-latex-pdf-process
  (if (executable-find "latexmk")
      '("latexmk -f -pdf -%latex -interaction=nonstopmode -output-directory=%o %f")
    '("%latex -interaction nonstopmode -output-directory %o %f"
      "%latex -interaction nonstopmode -output-directory %o %f"
      "%latex -interaction nonstopmode -output-directory %o %f"))
  "Commands to process a LaTeX file to a PDF file.

The command output will be parsed to extract compilation errors and
warnings according to `org-latex-known-warnings'.

This is a list of strings, each of them will be given to the
shell as a command.  %f in the command will be replaced by the
relative file name, %F by the absolute file name, %b by the file
base name (i.e. without directory and extension parts), %o by the
base directory of the file, %O by the absolute file name of the
output file, %latex is the LaTeX compiler (see
`org-latex-compiler'), and %bib is the BibTeX-like compiler (see
`org-latex-bib-compiler').

The reason why this is a list is that it usually takes several
runs of `pdflatex', maybe mixed with a call to `bibtex'.  Org
does not have a clever mechanism to detect which of these
commands have to be run to get to a stable result, and it also
does not do any error checking.

Consider a smart LaTeX compiler such as `texi2dvi' or `latexmk',
which calls the \"correct\" combinations of auxiliary programs.

Alternatively, this may be a Lisp function that does the
processing, so you could use this to apply the machinery of
AUCTeX or the Emacs LaTeX mode.  This function should accept the
file name as its single argument."
  :group 'org-export-latex
  :type '(choice
	  (repeat :tag "Shell command sequence"
		  (string :tag "Shell command"))
	  (const :tag "2 runs of latex"
		 ("%latex -interaction nonstopmode -output-directory %o %f"
		  "%latex -interaction nonstopmode -output-directory %o %f"))
	  (const :tag "3 runs of latex"
		 ("%latex -interaction nonstopmode -output-directory %o %f"
		  "%latex -interaction nonstopmode -output-directory %o %f"
		  "%latex -interaction nonstopmode -output-directory %o %f"))
	  (const :tag "latex,bibtex,latex,latex"
		 ("%latex -interaction nonstopmode -output-directory %o %f"
		  "%bib %b"
		  "%latex -interaction nonstopmode -output-directory %o %f"
		  "%latex -interaction nonstopmode -output-directory %o %f"))
	  (const :tag "texi2dvi"
		 ("cd %o; LATEX=\"%latex\" texi2dvi -p -b -V %b.tex"))
	  (const :tag "latexmk"
		 ("latexmk -f -pdf -%latex -interaction=nonstopmode -output-directory=%o %f"))
	  (function)))