summaryrefslogtreecommitdiff
path: root/support/spix/README.md
blob: b58d858e7dcca4c4011299adc3a1725a77eec2ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# SpiX 🦜 Yet another TeX compilation tool: simple, human readable, no option, no magic

SpiX is [yet another compilation tool](https://www.ctan.org/topic/compilation) for ``.tex`` files. It aims at being simple and human readable. Every piece of configuration is written in the ``.tex`` file itself, in a clear format (a list of console commands).

## Why SpiX?

With SpiX, the compilation process of a ``.tex`` file (Is it compiled using latex? pdflatex? xelatex? lualatex? Should I process its bibliography? with bibtex or biber? Is there an index?) is written in the ``.tex`` file itself, in a human-readable format (a shell script). That way:

- when you want to compile two years later, you don't have to guess the compilation process;
- you can send the ``.tex`` file to someone, and that's it: no need to send detailed instructions or a Makefile along with it (everything is in the ``.tex`` file);
- the compilation process is human readable: it can be understood by anyone who is able to read a very basic shell script. In particular, one can read it even if she does not know SpiX.

### The ``.tex`` file

Write the compilation process of your ``.tex`` file as a shell script, before the preamble, as lines starting with ``%$``:

    % Compile this file twice with lualatex.
    %$ lualatex foo.tex
    %$ lualatex foo.tex
 
    \documentclass{article}
    \begin{document}
    Hello, world!
    \end{document}

You can also replace the file name with ``$1``. That way, you don't have to worry about the file name when writing your commands.

    % Compile this file twice with lualatex.
    %$ lualatex $1
    %$ lualatex $1

### Compilation

To compile the ``.tex`` file, run SpiX:

    spix foo.tex

Spix will parse the ``.tex`` file, looking for shell snippets (lines before the preamble starting with ``%$``), and run them.

That's all!

## Documentation

The complete documentation is available on [readthedocs](http://spix.readthedocs.io).

To compile it from source, download and run:

    cd doc && make html

## What's new?

See [changelog](https://framagit.org/spalax/spix/blob/master/CHANGELOG.md).

## Download and install

SpiX can be installed using pip:

    pip install spix

Other installation methods can be found in the [documentation](https://spix.readthedocs.io/en/stable/install.html).

## License

*Copyright 2020 Louis Paternault*

SpiX is licensed under the [Gnu GPL 3 license](https://www.gnu.org/licenses/gpl-3.0.html), or any later version.