Last active
May 6, 2018 12:39
-
-
Save Romern/05d95cfd723d903b82415d2ad4d39d8e to your computer and use it in GitHub Desktop.
LaTeX Error Search: Finds typod commands in your tex file using the \show command
This file contains hidden or 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
FILE=$1 | |
if [ -z $1 ]; then | |
echo "ERROR: First input parameter must be the file!" | |
exit | |
fi | |
COMMANDS="$(grep -E -o '\\[a-zA-Z]+' $1 | sed 's/\\/\\show\\/g')" | |
HEADER="$(sed '/\\begin{document}/q' $1)" | |
echo $HEADER >> temp.tex | |
echo $COMMANDS >> temp.tex | |
echo '\end{document}' >> temp.tex | |
latexmk -interaction=nonstopmode temp.tex &> /dev/null | |
grep '=undefined' temp.log | |
rm temp.* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment