| 1 |
.TH SPIX 1 |
| 2 |
.SH NAME |
| 3 |
spix \- Compile a .tex file, executing commands that are set inside the file itself. |
| 4 |
.SH SYNOPSIS |
| 5 |
.B spix |
| 6 |
[\fB\--version\fR] |
| 7 |
[\fB\-h\fR] |
| 8 |
[\fB\-n\fR] |
| 9 |
.IR file |
| 10 |
.SH DESCRIPTION |
| 11 |
.B spix |
| 12 |
parses a .tex file to find lines starting with \fI%$\fR (before the preambule). |
| 13 |
Those lines are shell commands that are executed by \fBspix\fR. |
| 14 |
.PP |
| 15 |
Commands are executed as-is, excepted that: |
| 16 |
.RS |
| 17 |
.PP |
| 18 |
- command are run from the directory of the file given in argument; |
| 19 |
.PP |
| 20 |
- shell variables \fI$texname\fR and \fI$basename\fR are set to the name of the tex file (respectively with and without the .tex extension). |
| 21 |
.RE |
| 22 |
.SH OPTIONS |
| 23 |
.TP |
| 24 |
.BR \-n ", " \-\-dry\-run |
| 25 |
Print the commands that would be executed, but do not execute them. |
| 26 |
.TP |
| 27 |
.BR \-h ", " \-\-help |
| 28 |
Print help, and exit. |
| 29 |
.TP |
| 30 |
.BR \-\-version |
| 31 |
Print version, and exit. |
| 32 |
.SH EXAMPLES |
| 33 |
Let \fIfoo.tex\fR be the following file. |
| 34 |
.PP |
| 35 |
.nf |
| 36 |
.RS |
| 37 |
% Compile this file twice with lualatex. |
| 38 |
%$ lualatex foo.tex |
| 39 |
%$ lualatex foo.tex |
| 40 |
|
| 41 |
\\documentclass{article} |
| 42 |
\\begin{document} |
| 43 |
Hello, world! |
| 44 |
\\end{document} |
| 45 |
.RE |
| 46 |
.fi |
| 47 |
.PP |
| 48 |
When running \fBspix\fR on this file, it is compiled twice using \fBlualatex(1)\fR (as written in lines 2 and 3 of the file). |