From 53a00c212061f44ed49a727f13b3923fb3b4d04a Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 2 Feb 2023 16:39:13 +0100 Subject: initial commit --- docs/.gitignore | 5 +++ docs/gen/doc.m4 | 48 +++++++++++++++++++++++ docs/gen/style.css | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++ docs/makefile | 32 ++++++++++++++++ docs/readme.md | 5 +++ 5 files changed, 199 insertions(+) create mode 100644 docs/.gitignore create mode 100644 docs/gen/doc.m4 create mode 100644 docs/gen/style.css create mode 100644 docs/makefile create mode 100644 docs/readme.md (limited to 'docs') diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..14ffb91 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,5 @@ +*.html +*.toc +*.con +*.pdf +gen/paged.polyfill.js diff --git a/docs/gen/doc.m4 b/docs/gen/doc.m4 new file mode 100644 index 0000000..5719b54 --- /dev/null +++ b/docs/gen/doc.m4 @@ -0,0 +1,48 @@ +define(`docname', + ifelse(NAME, `pva', `Plan van aanpak', + NAME, `pve', `Pakket van eisen', + NAME, `research', `Research document', + NAME, `design', `Design document', + `UNKNOWN???'))dnl + + + + + + + + `' + + +
+ + docname()
+ Project Domotica
+ esyscmd(`LANG="en_US.utf8" date "+%B %d, %Y"') +
+ + Bjorn Martens (???)
+ Frenk van de Nieuwegiessen (???)
+ Joshua Regnier (2183008)
+ Loek Le Blansch (2180996)
+ Niels Stunnebrink (2184532) +
+
+

Table of contents

+ undivert(NAME`.toc') + undivert(NAME`.con') + + diff --git a/docs/gen/style.css b/docs/gen/style.css new file mode 100644 index 0000000..7179ded --- /dev/null +++ b/docs/gen/style.css @@ -0,0 +1,109 @@ +@media print { + @page { + size: A4; + margin: 1in; + + @bottom-center { + content: counter(page); + } + } + + html, body { + width: 100%; + margin: 0; + padding: 0; + overflow: visible; + + font-family: "TeX Gyre Schola"; + font-size: 11pt; + } + + a { + text-decoration: none; + color: unset; + font-style: italic; + } + + pre, code { + font-family: "JetBrainsMono Nerd Font"; + font-size: 9pt; + } + + figure { + text-align: center; + } + + figcaption, p { + text-align: justify; + text-justify: auto; + hyphens: auto; + } + + figcaption { + display: inline-block; + counter-increment: fig; + } + + figcaption::before { + content: "Figure " counter(fig) ": "; + } + + table { + border-collapse: collapse; + border-style: solid; + border-width: 0.7pt 0; + border-color: black; + margin: 1rem auto; + } + + th, td { + padding: 2pt 6pt; + } + + th { + border-bottom: 1pt solid black; + } + + .docintro { + display: flex; + flex-direction: row; + justify-content: space-between; + margin: 0; + } + + .docintro .left, + .docintro .right { + display: block; + } + + .docintro .right { + text-align: right; + } + + .pagebr { + break-before: page; + } + + nav ol { + counter-reset: item; + list-style-type: none; + } + + nav li { + position: relative; + counter-increment: item; + } + + nav li::before { + position: absolute; + transform: translateX(-100%) translateX(-5pt); + left: 0; + content: attr(heading-num-fix); + } + + img { + max-width: 13cm; + display: block; + margin: 0 auto; + } +} diff --git a/docs/makefile b/docs/makefile new file mode 100644 index 0000000..e4fcb15 --- /dev/null +++ b/docs/makefile @@ -0,0 +1,32 @@ +PANDOC = pandoc +M4 = m4 +RM = rm -f +CHROME = chromium --headless --run-all-compositor-stages-before-draw --virtual-time-budget=10000 --print-to-pdf-no-header +CURL = curl +PUP = pup + +SRCS = $(wildcard *.md) +HTML_T = $(SRCS:.md=.html) +PDF_T = $(SRCS:.md=.pdf) + +.PRECIOUS: %.toc %.con + +all: $(HTML_T) + +gen/paged.polyfill.js: + $(CURL) -Ls https://unpkg.com/pagedjs/dist/paged.polyfill.js > $@ + +%.con: %.md + $(PANDOC) $< --to=html > $@ + +%.toc: %.md + $(PANDOC) $< -s --toc --to=html 2> /dev/null | $(PUP) '#TOC' | sed -r 's/<(.?)ul>/<\1ol>/g' > $@ + +%.html: %.con %.toc gen/doc.m4 gen/paged.polyfill.js gen/style.css + $(M4) -Igen -DNAME=$(basename $<) gen/doc.m4 > $@ + +%.pdf: %.html + $(CHROME) --print-to-pdf=$@ $< 2> /dev/null + +clean: + $(RM) $(HTML_T) $(PDF_T) *.toc *.con gen/paged.polyfill.js diff --git a/docs/readme.md b/docs/readme.md new file mode 100644 index 0000000..720672c --- /dev/null +++ b/docs/readme.md @@ -0,0 +1,5 @@ +# docs + +this folder contains project documentation in markdown format. these documents +can be compiled to html using the makefile in this folder. + -- cgit v1.2.3