Created
March 17, 2015 02:56
-
-
Save BGMcoder/1485b0a04b614eb0f8d5 to your computer and use it in GitHub Desktop.
Simple Compile Script for tex files via AutoHotkey
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
;Simple Compile Script for tex files. | |
;Monday, March 16, 2015 | |
;by Brother Gabriel-Marie | |
;Just a simple script to compile a tex file to pdf; | |
;easily modifiable to accomodate multiple scripts in multiple directories. | |
#SingleInstance,Force | |
#noenv | |
fileencoding, UTF-8 | |
;please leave off the file extension | |
texname = yourPDFnamehere | |
;set to false to run in batch mode without any console; set to true if you need to debug | |
hideconsole := false | |
;set cleanup to false to not automatically delete the .aux files and .log files, etc. | |
cleanup := true | |
;------------------------------------------------------------------- | |
;makes sure our pdf is not already open in Adobe Reader | |
winclose, %texname%.pdf - Adobe Reader | |
;compile the text file to pdf | |
if(texname){ | |
if(hideconsole){ | |
runwait, lualatex --interaction=batchmode %texname%.tex ,,"hide" | |
}else{ | |
runwait, lualatex %texname%.tex | |
} | |
;open the pdf file | |
run, %texname%.pdf | |
} | |
if(cleanup){ | |
;clean up some files we don't need | |
filedelete *.aux | |
filedelete *.gaux | |
filedelete *.log | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment