summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 8 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 530980f..f202323 100644
--- a/Makefile
+++ b/Makefile
@@ -3,9 +3,10 @@ SOURCE=.
SRC =$(wildcard *.rst)
SVG =$(wildcard content/*.svg)
+DOT =$(wildcard *.dot)
PDFS = $(SRC:.rst=.pdf)
-INCLUDED_PDF = $(SVG:.svg=.pdf)
+INCLUDED_TEX = $(DOT:.dot=.tex)
all: $(PDFS)
@@ -30,16 +31,16 @@ tmp:
content/%.pdf: content/%.svg
inkscape -D -z --export-pdf=$@ $<
-%.pdf: %.dot
- dot -Tpdf $< | ps2pdf - $@
+%.tex: %.dot
+ dot2tex --autosize --figonly -o $@ $<
# Generate the latex file from rst
-tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
- rst2latex --no-section-subtitles --no-section-numbering --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=article --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
+tmp/%.tex: %.rst $(INCLUDED_TEX) $(SOURCES)| tmp
+ $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --no-section-numbering --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=article --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
+ sed -i -e 's/{c}{\\hfill ... continued on next page/{r}{... suite sur la page suivante/;s|^%$$||' $@
+ sed -i -e 's/\endfirsthead/\endfirsthead\\tableHeaderStyle/g' $@
sed -i -e 's/longtable\*/mytable/g' $@
sed -i -e 's/p{[0-9]\.[0-9]*\\DUtablewidth}/X/g' $@
- sed -i -e 's/admonition-/admonition/g' $@
# Generate each pdf with latex
tmp/%.pdf: tmp/%.tex $(BIBS) | tmp