summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2020-03-10 11:34:55 +0100
committerEkaitz Zarraga <ekaitz@elenq.tech>2020-03-10 11:34:55 +0100
commitbdfd9da091438dec0a7765571aa981d5997b75d9 (patch)
treee907677942915b7a3eedabaf2dbad172a30c227c
First commit, Filters
-rw-r--r--README.md1
-rw-r--r--filters/appendixes.lua11
-rw-r--r--filters/date-metadata.lua4
3 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..06e41b8
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# Book creation tooling
diff --git a/filters/appendixes.lua b/filters/appendixes.lua
new file mode 100644
index 0000000..a06736f
--- /dev/null
+++ b/filters/appendixes.lua
@@ -0,0 +1,11 @@
+function Str(elem)
+ appendix = '\\appendix\\footnotesize'
+ if elem.text == '{{appendixes}}' then
+ if FORMAT:match 'tex$' then
+ return pandoc.RawInline('latex', appendix, 'RawInline')
+ end
+ return pandoc.Null('Null')
+ else
+ return elem
+ end
+end
diff --git a/filters/date-metadata.lua b/filters/date-metadata.lua
new file mode 100644
index 0000000..52eec90
--- /dev/null
+++ b/filters/date-metadata.lua
@@ -0,0 +1,4 @@
+function Meta(m)
+ m.date = os.date("%B %e, %Y")
+ return m
+end