I wrote a perl script (teximporter) to facilitate the use of in-line foreign textual notation inclusion in LaTeX. Typically, it calculates a set of files (images, attach, ...) and a latex replacement string. Example:
\inline_abc[midi,width=\textwidth]{
X:1
T:Dó-Ré-Mi
K:Emaj
M:2/4
EF G2 | GG G2 | GA B2 | BB B2 | AG F2 | FF F2 | GF E>E|EE E2||
}
After
teximport ex.tex > _ti_ex.tex
pdflatex _ti_ex.tex
we got the expected result (a pdf image and a midi attach),
In order to hide command line activity (for IDEs), I decided to try arara. Here is my teximporter.yaml
!config
identifier: teximporter
name: teximporter
commands:
- teximporter -o "_ti_@{file}" "@{file}"
- pdflatex "_ti_@{file}"
arguments: []
But the final pdf file has the wrong name (_pi_ex.pdf
instead of ex.pdf
).
What is the best way to define a good arara
configuration for a preprocessor, if possible capable of running in Linux, Windows and Mac.
_ti_ex.pdf
is the appropriate name of thepdf
. You could add another line to rename thepdf
, which I have done in, for example, my answer to : tex.stackexchange.com/questions/31334/…. For reference, you might like to see: tex.stackexchange.com/questions/19182/…pdflatex
on a file nameda.tex
, you end up with a PDF file nameda.pdf
, so the current result is expected. Is_ti_ex.pdf
the file you were expecting, only with the "wrong" name? If so, it is just a matter of writing a "rename" command in the list of commands. Chris wrote a solution for that, but I can come up with another solution if you want more features to be added to your rule.:)
isWindows("...", "..."
and-jobname
-- this way I see 2 good ways to write a system independent rename.% arara: teximport
.