Created
February 25, 2014 13:44
-
-
Save bougui505/9208962 to your computer and use it in GitHub Desktop.
Get header from tex file maintexfile and inlude tex file includefile and test the compilation with latexmk
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
#!/usr/bin/env sh | |
maintexfile=$1 | |
includefile=$2 | |
rootfilename=$(echo $includefile | cut -d. -f1) | |
(grep -B9999 'begin{document}' $maintexfile && echo " " && echo "\include{$rootfilename}" && echo "\\end{document}") > header.tex | |
latexmk -pdf -pvc header.tex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment