# runtexfile Copyright 2025 Herbert Voß all files are LPPL 1.3 ## Small script like latexmk to run a LaTeX document controlled from within the document itself. #The syntax of `runtexfile` runtexfile [options] filename eg runtexfile test runtexfile -V test possible options are (short,long): -h,--help -V,--verbose -v,--version .tex file The TeX or LaTeX document has to define the comamnds at the beginning of the document. Only empty lines are possible before the command lines: ``` %! HV runtexfile %! HV xindex %! HV runtexfile \documentclass{foo} ... ``` In this case the given filename from runtexfile is used. Other filenames can be used inside angles: ``` %! HV lualatex --shell-escape %! HV biber %! HV lualatex --shell-escape %! HV xindex %! HV xindex --config DIN2 -l DE -o test2.vwd %! HV xindex --config DIN2 -l DE -o test2.dbd %! HV lualatex --shell-escape %! HV lualatex --shell-escape \documentclass{...} ... ```