Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.57 KB | None | 0 0
  1. #!/bin/sh
  2. # compile a given Pandoc-flavored Markdown document into a PDF
  3.  
  4. # exit if no document (1st) argument is provided
  5. [ -z "$1" ] && exit
  6. # if no output (2nd) argument is provided, use a default output name
  7. [ -z "$2" ] && OUT="out.pdf" || OUT=$2
  8.  
  9. # TODO: Tweak this to use settings defined in a separate file
  10. # compile
  11. pandoc "$DOC" -V geometry:a4paper -V geometry:margin=1cm -V mainfont="Dejavu Serif" -V monofont="DejaVu Sans Mono" -H no_page_num.tex -o "$OUT"
  12.  
  13. # launch with zathura if zathura isn't already open
  14. [ "$(pidof zathura)" = "" ] && zathura "./$OUT" &
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement