diff options
-rw-r--r-- | .gitignore | 16 | ||||
-rwxr-xr-x | md2latex | 13 | ||||
-rw-r--r-- | opdracht-1/makefile | 2 | ||||
-rw-r--r-- | opdracht-2/makefile | 2 | ||||
-rw-r--r-- | opdracht-2/opdracht-2.m4 | 11 | ||||
-rw-r--r-- | pdf.mk | 10 |
6 files changed, 45 insertions, 9 deletions
@@ -2,3 +2,19 @@ opdracht-*/*.md opdracht-*/.tmp.sql opdracht-*/opdracht.pdf opdracht-*/opdracht-*.md + +# latex files +**/*.aux +**/*.bbl +**/*.bcf +**/*.blg +**/*.fdb_latexmk +**/*.fls +**/*.html +**/*.log +**/*.out +**/*.pdf +**/*.run.xml +**/*.synctex.gz +**/*.tex +**/*.toc diff --git a/md2latex b/md2latex new file mode 100755 index 0000000..4d2bdd2 --- /dev/null +++ b/md2latex @@ -0,0 +1,13 @@ +#!/bin/sh +TARGET="$1" + +sed '/^# /d' "$1.md" | pandoc -f markdown -o "$1.html" +cat ../preamble.tex > "$1.tex" + +echo '\begin{document}' >> "$1.tex" +printf '\\textbf{Databases} %s \\hfill Loek Le Blansch (2180996)\n' "`echo "$1" | sed 's/-/ /g'`" >> "$1.tex" +pandoc "$1.html" -t latex | sed 's/svg/pdf/g' >> "$1.tex" +echo '\end{document}' >> "$1.tex" + +latexmk -quiet "$1.tex" +latexmk -quiet -c "$1.tex" diff --git a/opdracht-1/makefile b/opdracht-1/makefile index b91dfe8..51cdd08 100644 --- a/opdracht-1/makefile +++ b/opdracht-1/makefile @@ -1,3 +1,5 @@ TARGET := opdracht-1 +MD2LATEX = ../md2latex include ../common.mk +include ../pdf.mk diff --git a/opdracht-2/makefile b/opdracht-2/makefile index 19a0072..37ed035 100644 --- a/opdracht-2/makefile +++ b/opdracht-2/makefile @@ -1,5 +1,6 @@ TARGET = opdracht-2 RESET_SQL += ../opdracht-1/.tmp.sql +MD2LATEX = ../md2latex all: $(TARGET).md @@ -7,3 +8,4 @@ all: $(TARGET).md make -C ../opdracht-1 include ../common.mk +include ../pdf.mk diff --git a/opdracht-2/opdracht-2.m4 b/opdracht-2/opdracht-2.m4 index bf43314..8ee1226 100644 --- a/opdracht-2/opdracht-2.m4 +++ b/opdracht-2/opdracht-2.m4 @@ -8,15 +8,8 @@ q_with_test(2) ## Opdracht 3 -<div align="center"> - <img src="img_erd.svg"/><br/> - <i>ERD</i> -</div> - -<div align="center"> - <img src="img_strokendiagram.svg"/><br/> - <i>Strokendiagram</i> -</div> +![](img_erd.svg) +![](img_strokendiagram.svg) q_with_output(4) q_with_output(5) @@ -0,0 +1,10 @@ +INKSCAPE = inkscape + +FIGS_SVG = $(wildcard *.svg) +FIGS_PDF = $(patsubst %.svg,%.pdf, $(FIGS_SVG)) + +%.pdf: %.svg + $(INKSCAPE) -D $< -o $@ + +$(TARGET).pdf: $(TARGET).md $(FIGS_PDF) + $(MD2LATEX) $(TARGET) |