From 35ed9755704ee383e6ef58c5ef23e454dc742f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Fri, 23 Dec 2016 11:21:38 +0100 Subject: [PATCH 1/2] add lualatex to the script --- README.rst | 3 ++- pdflatex.sh | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index f5988d3..663c1a4 100644 --- a/README.rst +++ b/README.rst @@ -46,12 +46,13 @@ Note If the script is run as `pdflatex.sh`, then the `pdflatex` command is used (producing PDF output files). However, if the script is run as `latex.sh`, then the `latex` command is used (producing DVI output files), and if the -script is run as `xelatex.sh`, then the `xelatex` command is used (producing +script is run as `xelatex.sh` or 'lualatex.sh', then the `xelatex` resp. 'lualatex' command is used (producing PDF output files). Thus, if necessary, symbolic links may be created to use the script easily, e.g.:: $ ln -s ./pdflatex.sh ./latex.sh $ ln -s ./pdflatex.sh ./xelatex.sh + $ ln -s ./pdflatex.sh ./lualatex.sh **Arch Linux** users may use `tdi `_'s `AUR package `_ to obtain the script. diff --git a/pdflatex.sh b/pdflatex.sh index 1a7a43f..7545be4 100755 --- a/pdflatex.sh +++ b/pdflatex.sh @@ -21,7 +21,7 @@ # | -sc [LANG] FILE(.tex) # # DESCRIPTION -# A bash script to simplify TeX/LaTeX/XeLaTeX files compilation and more. +# A bash script to simplify TeX/LaTeX/XeLaTeX/LuaLaTeX files compilation and more. # Just run the script to get more information: './pdflatex.sh'. # # REPORTING BUGS @@ -34,7 +34,7 @@ # VERSION # ======= -VERSION=3.4.0 +VERSION=3.4.1 # PROGRAMS @@ -54,7 +54,7 @@ PDFLATEX_PROGRAM="pdflatex" PDFNUP_PROGRAM="pdfnup" PS4PDF_PROGRAM="ps4pdf" XELATEX_PROGRAM="xelatex" - +LUALATEX_PROGRAM="lualatex" # OPTIONS # ======= @@ -87,7 +87,7 @@ AUXILIARYEXTS_BIBTEX="$AUXILIARYEXTS_COMMON dvi gls ind pdf synctex.gz" AUXILIARYEXTS_INDEX="$AUXILIARYEXTS_COMMON bbl div gls pdf synctex.gz" AUXILIARYEXTS_GLOSSARIES="$AUXILIARYEXTS_COMMON bbl div ind pdf synctex.gz" -# Options to pass to the latex/pdflatex/xelatex compilers: +# Options to pass to the latex/pdflatex/xelatex/LuaLaTeX compilers: LATEX_OPTIONS="$LATEX_BATCHMODE_OPT" # Base name of the script: @@ -131,13 +131,13 @@ cat < - ${txtund}A BASH SCRIPT TO SIMPLIFY TeX/LaTeX/XeLaTeX FILES COMPILATION\ + ${txtund}A BASH SCRIPT TO SIMPLIFY TeX/LaTeX/XeLaTeX/LuaLaTeX FILES COMPILATION\ AND MORE${txtrst} NOTE: If the script is run as 'pdflatex.sh', then the 'pdflatex' command is used (producing PDF output files). However, if the script is run as 'latex.sh', then the 'latex' command is used (producing DVI output - files), and if the script is run as 'xelatex.sh', then the 'xelatex' + files), and if the script is run as 'xelatex.sh', then the 'xelatex' or 'LuaLaTeX' command is used (producing PDF output files). Thus, if necessary, symbolic links may be created to use the script easily. @@ -428,7 +428,7 @@ function spell_checker() { function run_pdflatex() { check_programs "$GREP" echo -ne "$TEXT..." - $LATEX_PROGRAM $LATEX_OPTIONS "$FILENAME" >&- 2>&- + $LATEX_PROGRAM $LATEX_OPTIONS "$FILENAME" local ERR=`$GREP -a -i error "$FILENAME".log | $GREP -a -v -i infwarerr` if [[ -z $ERR ]] ; then local ERR=`$GREP -a -i "^\!" "$FILENAME".log` @@ -537,7 +537,7 @@ if [[ -n $CHKTEX ]] ; then mquit $? fi -# Command to use: 'latex', 'pdflatex', or 'xelatex': +# Command to use: 'latex', 'pdflatex', 'xelatex' or 'LuaLaTeX': if [[ $THENAME == "latex.sh" ]] ; then LATEX_PROGRAM=$LATEX_PROGRAM elif [[ $THENAME == "xelatex.sh" ]] ; then From 9660a039807b4c44423b11e2c00031086e803982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Fri, 23 Dec 2016 11:33:21 +0100 Subject: [PATCH 2/2] add lualatex to --- pdflatex.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pdflatex.sh b/pdflatex.sh index 7545be4..66907b8 100755 --- a/pdflatex.sh +++ b/pdflatex.sh @@ -542,6 +542,8 @@ if [[ $THENAME == "latex.sh" ]] ; then LATEX_PROGRAM=$LATEX_PROGRAM elif [[ $THENAME == "xelatex.sh" ]] ; then LATEX_PROGRAM=$XELATEX_PROGRAM +elif [[ $THENAME == "lualatex.sh" ]] ; then + LATEX_PROGRAM=$LUALATEX_PROGRAM else LATEX_PROGRAM=$PDFLATEX_PROGRAM fi