tecosaur / org-latex-preview-todos

A tracker for the Org LaTeX Preview effort on https://git.tecosaur.net/tec/org-mode
4 stars 0 forks source link

Precompilation directory for org-latex-precompile #17

Open karthink opened 6 months ago

karthink commented 6 months ago

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.