aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/.gitignore1
-rw-r--r--doc/base.tex7
-rw-r--r--doc/makefile5
-rwxr-xr-xdoc/versiontable.awk15
4 files changed, 23 insertions, 5 deletions
diff --git a/doc/.gitignore b/doc/.gitignore
index e5139ef..8e7ebcc 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -17,3 +17,4 @@
# ignore output files
*.pdf
+versionctl.tex
diff --git a/doc/base.tex b/doc/base.tex
index c3f36eb..74bb57a 100644
--- a/doc/base.tex
+++ b/doc/base.tex
@@ -21,15 +21,12 @@
\addbibresource{refs.bib}
\usepackage{fancyvrb}
\usepackage[nottoc]{tocbibind}
+\usepackage[en-US]{datetime2}
\input{pandoc.tex}
\setmainfont{TeX Gyre Schola}
\setmathfont{TeX Gyre Schola Math}
-\sisetup{
- group-separator = {.},
- output-decimal-marker = {,}
-}
\bigskipamount=7mm
\medskipamount=4mm
@@ -60,6 +57,8 @@
\begin{titlepage}
\maketitle
\thispagestyle{empty}
+\vfill
+\input{versionctl.tex}
\end{titlepage}
\tableofcontents
diff --git a/doc/makefile b/doc/makefile
index 3446eeb..ebf02f3 100644
--- a/doc/makefile
+++ b/doc/makefile
@@ -8,13 +8,16 @@ dui.pdf: ../assets/LSD_straightLines_Pic_1.png
dui.pdf: ../assets/hough_straightLines_Pic_0.png
dui.pdf: ../assets/hough_straightLines_Pic_1.png
+versionctl.tex:
+ git tag -l 'doc-*' --format='%(refname:short) %(objectname:short=7) %(contents:subject) %(*authordate:format:%s)' | ./versiontable.awk -F' ' > $@
+
%.png: %.bmp
convert $< $@
%.pdf: %.svg
rsvg-convert -f pdf -o $@ $<
-%.pdf: %.tex base.tex %.md.tex
+%.pdf: %.tex base.tex %.md.tex versionctl.tex
latexmk $< -shell-escape -halt-on-error -lualatex -f -g
%.md.tex: %.md
diff --git a/doc/versiontable.awk b/doc/versiontable.awk
new file mode 100755
index 0000000..96108fd
--- /dev/null
+++ b/doc/versiontable.awk
@@ -0,0 +1,15 @@
+#!/bin/awk -f
+BEGIN {
+ print "\\noindent\\begin{tabularx}{\\linewidth}{llXr}"
+ print "\\toprule"
+ print "Version & Commit & Notes & Date\\\\"
+ print "\\midrule"
+}
+{
+ sub("doc-", "", $1)
+ print $1" & \\texttt{"$2"} & "$3" & \\DTMdisplaydate"strftime("{%Y}{%m}{%d}{-1}", $4)"\\\\"
+}
+END {
+ print "\\bottomrule"
+ print "\\end{tabularx}"
+}