When org-latex-precompile is true, it precompiles the format file in /tmp. The advantage of doing this is the ability to reuse precompilation dump files across documents in different directories.
However this means precompilation fails when the document uses a LaTeX class file from the current directory, for example. (The class file is not in /tmp.) The logic for where precompilation for exports occurs needs to be tuned.
Note: org-latex-preview-precompile works similarly, except when there is an \include or \input command in the preamble. Then it precompiles in default-directory instead. When using a class file in default-directory, we can force the precompilation to the same directory by adding a bogus \input or \include command in the preamble. This workaround fails for export precompilation.
When
org-latex-precompile
is true, it precompiles the format file in/tmp
. The advantage of doing this is the ability to reuse precompilation dump files across documents in different directories.However this means precompilation fails when the document uses a LaTeX class file from the current directory, for example. (The class file is not in
/tmp
.) The logic for where precompilation for exports occurs needs to be tuned.Note:
org-latex-preview-precompile
works similarly, except when there is an\include
or\input
command in the preamble. Then it precompiles indefault-directory
instead. When using a class file indefault-directory
, we can force the precompilation to the same directory by adding a bogus\input
or\include
command in the preamble. This workaround fails for export precompilation.