diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2020-05-30 18:58:41 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2020-05-30 18:58:41 -0400 |
| commit | d76f12fc4a7bd887fd7478d4dde844889614d578 (patch) | |
| tree | c618f0d5c4d2530d6c3b1e6f5e2d3ca3c41b6d67 /.local/bin/compiler | |
| parent | f552d9850b393acd366efc34e80e7ccb4ad93b55 (diff) | |
| download | eibhear-d76f12fc4a7bd887fd7478d4dde844889614d578.tar.gz eibhear-d76f12fc4a7bd887fd7478d4dde844889614d578.tar.zst eibhear-d76f12fc4a7bd887fd7478d4dde844889614d578.zip | |
compiler notes and alt md compilers
Diffstat (limited to '.local/bin/compiler')
| -rwxr-xr-x | .local/bin/compiler | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/.local/bin/compiler b/.local/bin/compiler index 75ed347..7b61395 100755 --- a/.local/bin/compiler +++ b/.local/bin/compiler @@ -5,6 +5,9 @@ # # Compiles .tex. groff (.mom, .ms), .rmd, .md. Opens .sent files as sent # presentations. Runs scripts based on extention or shebang +# +# Note that .tex files which you wish to compile with XeLaTeX should have the +# string "xelatex" somewhere in a comment/command in the first 5 lines. file=$(readlink -f "$1") dir=$(dirname "$file") @@ -28,7 +31,13 @@ case "$file" in *\.[0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf > "$base".pdf ;; *\.[rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;; *\.tex) textype "$file" ;; - *\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;; + *\.md) if command -v lowdown >/dev/null; then + lowdown -d nointem -e super "$file" -Tms | groff -mpdfmark -ms -kept > "$base".pdf + elif command -v groffdown >/dev/null; then + groffdown -i "$file" | groff > "$base.pdf" + else + pandoc "$file" --pdf-engine=xelatex -o "$base".pdf + fi ; ;; *config.h) sudo make install ;; *\.c) cc "$file" -o "$base" && "$base" ;; *\.py) python "$file" ;; |
