From bdfd9da091438dec0a7765571aa981d5997b75d9 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Tue, 10 Mar 2020 11:34:55 +0100 Subject: First commit, Filters --- README.md | 1 + filters/appendixes.lua | 11 +++++++++++ filters/date-metadata.lua | 4 ++++ 3 files changed, 16 insertions(+) create mode 100644 README.md create mode 100644 filters/appendixes.lua create mode 100644 filters/date-metadata.lua 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 -- cgit v1.2.3