diff --git a/.latexmkrc b/.latexmkrc new file mode 100644 index 0000000..388a787 --- /dev/null +++ b/.latexmkrc @@ -0,0 +1,19 @@ +### .latexmkrc file. +### For use with latexmk shell script. +### Instructions for use: +### Put a copy of this file in the directory that contains the current job. +### Comment out the parts that are not applicable for the current job. + + +## shell escape +$latex = "latex --shell-escape"; +$pdflatex = "pdflatex --shell-escape"; + + +## makeglossaries (for the glossaries package) +add_cus_dep('glo', 'gls', 0, 'makeglossaries'); +add_cus_dep('acn', 'acr', 0, 'makeglossaries'); +sub makeglossaries { + system("makeglossaries $_[0]"); +} + diff --git a/chertex.sh b/chertex.sh index 5b3a55f..82b9d77 100755 --- a/chertex.sh +++ b/chertex.sh @@ -16,15 +16,15 @@ echo "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" echo "MMX -- taha.ahmed@mkem.uu.se -- CHEPEC doctoral degree project" echo "---------------------------------------------------------------" -## If the file ltxmkshellescape.rc exists in the current directory, -## set the flag useshellescape=TRUE -useshellescape=false -echo "--- Looking for ltxmkshellescape.rc" -if [ -e ltxmkshellescape.rc ]; then - useshellescape=true - echo "+++ Shell escape activated" +## If the file .latexmkrc exists in the current directory, +## set the flag ltxmkrc=TRUE +ltxmkrc=false +echo "--- Looking for .latexmkrc" +if [ -e .latexmkrc ]; then + ltxmkrc=true + echo "+++ LaTeXMK RC file invoked" else - echo "--- This job does not request shell escape" + echo "--- This job did not request LaTeXMK RC file" fi @@ -80,10 +80,10 @@ if [ $# -eq 1 ]; then fi # Run pdflatex, bibtex, and company - if $useshellescape; then - echo " Calling LaTeXMK with shell escape" + if $ltxmkrc; then + echo " Calling LaTeXMK with RC file" simpledelay.sh 2 - latexmk -r ltxmkshellescape.rc -pdf -bibtex $jobname + latexmk -r .latexmkrc -pdf -bibtex $jobname else echo " Calling LaTeXMK" simpledelay.sh 2 diff --git a/ltxmkshellescape.rc b/ltxmkshellescape.rc deleted file mode 100644 index 42007d4..0000000 --- a/ltxmkshellescape.rc +++ /dev/null @@ -1,2 +0,0 @@ -$latex = "latex --shell-escape"; -$pdflatex = "pdflatex --shell-escape";