Projects About AlBasmala
build status

Automatically Generate PDFs upon Save

Article image
  

Here is my ~/.latexmkrc file: It previews PDFs using Emacs, uses LuaLaTeX for making PDFs, and to update the PDF viewer please change focus to the PDF file.

$pdf_previewer="emacsclient %S";
$pdflatex = 'lualatex -interaction=nonstopmode -synctex=1 %O %S';
$pdf_update_method = 4;
$pdf_update_command = "emacsclient %S &";

Then files that want to have this feature should end with:

* Local Variables :ignore:
# Ensure EmacsClient can connect to running emacs, enable automatic reverts for whenever PDFs change.
# Local Variables:
# eval: (server-start)
# eval: (global-auto-revert-mode)
# eval: (add-hook 'after-save-hook 'org-latex-export-to-latex nil t)
# eval: (compile "latexmk -pdf -pvc -pdflatex='lualatex -shell-escape -interaction nonstopmode'")
# End:

Generated by Emacs and Org-mode (•̀ᴗ•́)و
Creative Commons License
Life & Computing Science by Musa Al-hassy is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License