Skip to content

Commit

Permalink
tweak(org): prefer using latexmk or tectonic when found
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Apr 4, 2023
1 parent 9d31c01 commit 4e1267d
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions modules/me-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,19 @@
(+nmap! :keymaps 'org-mode-map
"RET" #'org-open-at-point)

;; Tectonic can be interesting, however, it don't work right now
;; with some of my documents (natbib + sagej...)
(when (and (executable-find "tectonic") nil)
(setq org-latex-pdf-process
'("tectonic -Z shell-escape -Z continue-on-errors --outdir=%o %f"))) ;; --synctex
(cond
((executable-find "latexmk")
(setq
org-latex-pdf-process
'("latexmk -c -bibtex-cond1 %f" ; ensure cleaning ".bbl" files
"latexmk -f -pdf -%latex -shell-escape -interaction=nonstopmode -output-directory=%o %f")))

;; Tectonic can be interesting. However, it don't work right now
;; with some of my documents (natbib + sagej...)
((executable-find "tectonic")
(setq
org-latex-pdf-process
'("tectonic -X compile --outdir=%o -Z shell-escape -Z continue-on-errors %f"))))

(setq org-export-async-debug minemacs-debug) ;; Can be useful!

Expand Down

0 comments on commit 4e1267d

Please sign in to comment.