Created
June 3, 2021 04:06
-
-
Save OliverBrotchie/647be03e9021b73e490174276f26ebed to your computer and use it in GitHub Desktop.
Autocompile and display a Groff document
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/bin/sh | |
# Automatically compiles and views a pdf from Groff. [Requires Zathura, entr] | |
if [ $# -eq 0 ] || [ "$1" == "-h" ] ; then | |
echo "Usage: \$0 \$1" | |
echo " \$0 The name of the ms document you wish to autocompile." | |
echo " \$1 The name of the output." | |
exit | |
fi | |
[ -f $2 ] || touch $2 | |
echo "Autocompiling and displaying $1!" | |
echo "$1" | entr sh -c 'refer references.bib "$1" | groff -ms "$1" -Tpdf > "$2"' . "$1" "$2" & | |
zathura $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This command works fine but I get the following errors from Zathura (mupdf):
Can anyone help?