Created
July 31, 2020 15:17
-
-
Save kartikeytewari/fd6643d69f4c6b826a4e7806729b319d to your computer and use it in GitHub Desktop.
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
function build_latex() | |
{ | |
for arg in "$@" | |
do | |
case $arg in | |
# for building latex without bibliography | |
-bs|--build_small) | |
pdflatex ${1}.tex | |
;; | |
# for building latex with bibliography | |
-bl|--build_large) | |
pdflatex ${1}.tex | |
bibtex ${1}.aux | |
pdflatex ${1}.tex | |
pdflatex ${1}.tex | |
;; | |
# for opening in google chrome | |
-o|--open) | |
chrome ${1}.pdf | |
shift | |
;; | |
# for printing manual | |
-h|--help) | |
echo "build_latex function is used for building latex files" | |
echo "along with bibliography (if used)" | |
echo "flags:" | |
echo "" | |
echo "-bs | --build_small" | |
echo " just builds the latex file" | |
echo "" | |
echo "-bl | --build_large" | |
echo " builds the latex file along with bibliography" | |
echo " if .bib file is not found then it is ignored" | |
echo "" | |
echo "-o | --open" | |
echo " This opens the built pdf in chrome" | |
echo "" | |
echo "-h | --help" | |
echo " Prints this manual page" | |
echo "" | |
echo "Under development. MIT LIcense 2020" | |
echo "for feedback/suggestions contact developer at: [email protected]" | |
esac | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Initial Commit