Open spixi opened 2 years ago
Looks good, though how about latexmk to handle bibtex etc?
Looks good, though how about latexmk to handle bibtex etc?
I have never used latexmk. It sounds like a good idea, but requires more preparation. I know that you sometimes have to call pdflatex multiple times when you use packages like hyperref (or packages which depend on hyperref, like beamer). I personally prefer biber, because it has more features like full Unicode support and the related=
key, but bibtex is also fine. Feel free to expand the script to grep the pdflatex output for messages like "Package biblatex Warning: Please (re)run Biber on the file" if you want.
Something like the following,
#!/bin/sh
if test "$PLUMA_CURRENT_DOCUMENT_TYPE" = "text/x-tex"; then
(
cd $PLUMA_CURRENT_DOCUMENT_PATH
latexmk
)
fi
a user could customize the build behavior through a .latexmkrc
file in their $PLUMA_CURRENT_DOCUMENT_PATH
directory or through a global rc file in their $HOME
directory. latexmk
automatically takes care running bibtex, pdflatex multiple times etc etc.
The external tools plugin adds support to run external commands. It already has some templates like a Build command, which runs make or a Remove trailing spaces command which removes whitespace characters from the document using sed.
I wrote that little script to enable pdfLaTeX integration. This template could be added as default.