shiblon / latex-makefile

A Makefile for LaTeX - drop it in, type make, and magic happens.
Other
185 stars 30 forks source link

rail support #120

Open shiblon opened 8 years ago

shiblon commented 8 years ago

Originally reported on Google Code with ID 107

Rail is an utility to create syntax diagrams for latex (see: http://tug.ctan.org/tex-archive/support/rail
) The idea is to include the code of these diagrams using \begin{rail} ... \end{rail}
and then as the bibtex way we need to run "rail <filename without extension>" after
the latex command for the generation of the rao file. I perform this with the following
makefile excerpt:

default: rail

RAIL            ?= rail
RAIL_DEFAULT_OPTIONS    := 
files.rai       := $(wildcard *.rai)
RAIL_INPUT      := $(files.rai:.rai=)

.PHONY: rail
rail:
    $(RAIL) $(RAIL_DEFAULT_OPTIONS) $(RAIL_INPUT)

Now could be nice if we can integrate this on the latex-makefile in order to have a
proper clean (for rai and rao files) and default goals but I'm not expert with advanced
Makefile stuff. Reading the help I found I can include that code on the ini file however
I'm cannot manage it without running the make twice and the rail is always executed.
Maybe some hints could be useful on the documentation to add rail or another tool inside
latex-makefile without creating an issue.  

Reported by jrbalderrama on 2010-12-28 15:19:56

shiblon commented 8 years ago
This is going to be non-trivial, because the .rai file is generated by latex, and then
rail has to be run on it to create the .rao file, and then latex has to be run *again*.
 Trying to define this in make dependency chain syntax makes me want to cry.

I will look into it, but it isn't a super high priority for me right now, since there
are other basic functionality bugs that need fixing and I have no help.

Reported by shiblon on 2010-12-31 19:41:28