Getting started¶
You have a directory that you want to be processed using Évariste.
Minimal configuration file¶
Create a evariste.setup
file containing the following text:
[setup]
plugins = vcs.fs
Note that if your directory is a git repository, you can use vcs.git
instead of vcs.fs
. That way, only files handled by git will be processed (more information about vcs plugins and setup files).
That’s it! You can now run evariste
on this file:
evariste evariste.setup
And nothing happens… You need to give Évariste to pieces of information:
how files are to be compiled;
what should be the output.
Compile file¶
To actually compile files, you need to enable one or several action plugins in the enable_plugin
option of the configuration file (see first section).
Let’s use the action.command and action.autocommand plugins. Our setup file now looks like this:
[setup]
plugins =
vcs.git
action.command action.autocommand
[action.autocommand.latex]
extensions = tex
targets = {basename}.pdf
command =
latex {basename}
dvipdf {basename}
The action.command
plugin is not used yet. The action.autocommand
is used, and the action.autocommand.latex
means: Every file with extension .tex
will be compiled (in its directory) using command pdflatex {basename}
(where {basename}
is replaced with the base name of the file, that is, without directory or extension; more info in String formatting), and will produce a {basename}.pdf
file.
Now, that particular foo.tex
file must be compiled using lualatex
. Let’s use the action.command
plugin, and write a small configuration file for it. This file can be named either foo.tex.evsconfig
or .foo.tex.evsconfig
, and contains:
[action]
plugin = command
[action.command]
targets = {basename}.pdf
command = lualatex {basename}
This means:
for this file, and this file only, the
action.command
will be used;it will be compiled using the
lualatex foo
command.
Let’s run evariste
again, this time with the --verbose
option:
evariste evariste.setup --verbose
You can see that your latex files are correctly compiled.
More information, as well as the list of action plugins, can be found in Action plugins.
Output¶
Right now, nothing is displayed at the end of the compilation. Let’s improve thit.
Text renderer¶
Let’s enable the renderer_text plugin. The [setup]
section of your setup file now looks like this:
[setup]
plugins =
vcs.git
action.command action.autocommand
renderer.text
And a tree is displayed at the end of the evariste evariste.setup
call: it lists all the files that were compiled, with their status (success or failed compilation).
HTML renderer¶
Now you want to publish your directory as an HTML page like this one. To do so, we simply enable the renderer_html plugin.
[setup]
plugins =
vcs.git
action.command action.autocommand
renderer.text renderer.html
Let’s run evariste evariste.setup
again, and voilà!, we get a index.html
file listing the files of our repository as a tree, linking to both as source (latex) and compiled (pdf) files.
This plugin can be configured (renderer.html — HTML renderer), but you might prefer the HTMLplus renderer, which add a bit of CSS and javascript to make the output nicer.
Conclusion¶
Évariste is very configurable. There is a lot more to discover: more options, configure and ignore files, several action plugins or renderer plugins, or more.
Enjoy!