| 1 |
# runtexfile |
| 2 |
|
| 3 |
Copyright 2025 Herbert Voß <[email protected]> |
| 4 |
all files are LPPL 1.3 |
| 5 |
|
| 6 |
## Small script like latexmk to run a LaTeX document controlled from within the document itself. |
| 7 |
|
| 8 |
#The syntax of `runtexfile` |
| 9 |
|
| 10 |
runtexfile [options] filename |
| 11 |
|
| 12 |
eg |
| 13 |
|
| 14 |
runtexfile test |
| 15 |
runtexfile -V test |
| 16 |
|
| 17 |
possible options are (short,long): |
| 18 |
|
| 19 |
-h,--help |
| 20 |
-V,--verbose |
| 21 |
-v,--version |
| 22 |
<file> .tex file |
| 23 |
|
| 24 |
The TeX or LaTeX document has to define the comamnds at the |
| 25 |
beginning of the document. Only empty lines are possible |
| 26 |
before the command lines: |
| 27 |
|
| 28 |
``` |
| 29 |
%! HV runtexfile |
| 30 |
%! HV xindex |
| 31 |
%! HV runtexfile |
| 32 |
|
| 33 |
\documentclass{foo} |
| 34 |
... |
| 35 |
``` |
| 36 |
|
| 37 |
In this case the given filename from runtexfile is used. |
| 38 |
Other filenames can be used inside angles: |
| 39 |
|
| 40 |
``` |
| 41 |
%! HV lualatex --shell-escape |
| 42 |
%! HV biber |
| 43 |
%! HV lualatex --shell-escape |
| 44 |
%! HV xindex |
| 45 |
%! HV xindex --config DIN2 -l DE -o test2.vwd <test2.vwx> |
| 46 |
%! HV xindex --config DIN2 -l DE -o test2.dbd <test2.dbx> |
| 47 |
%! HV lualatex --shell-escape |
| 48 |
%! HV lualatex --shell-escape |
| 49 |
|
| 50 |
\documentclass{...} |
| 51 |
... |
| 52 |
``` |
| 53 |
|
| 54 |
For online compilers one often do not know the main filename. In such a |
| 55 |
case you can use a placeholder for main file (see example 3): |
| 56 |
|
| 57 |
``` |
| 58 |
%! HV lualatex |
| 59 |
%! HV asy <!!file!!-*.asy> |
| 60 |
%! HV lualatex |
| 61 |
|
| 62 |
\documentclass{...} |
| 63 |
... |
| 64 |
``` |