git.iko.soy/typeable/pandoc
on master help sign in
Improve pandoc man page generation.

Use before and after includes rather than special template.

commit7ba55d74057c58b1108afb2404ffa6f2937ebb96 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 22 Dec 2019, 20:58 (7 years ago) parent2cf89ad
5 files changed+13−14
Makefile+6−3 man/pandoc.1.after+3 man/pandoc.1.before+2 man/pandoc.1.template−10 pandoc.cabal+2−1
Makefile+6−3
@@ -98,10 +98,13 @@ pandoc-windows-x86_64.msi:
9898 JOBID=$(shell curl https://ci.appveyor.com/api/projects/jgm/pandoc | jq '.build.jobs[]| select(.name|test("x86_64")) | .jobId') && \
9999 wget "https://ci.appveyor.com/api/buildjobs/$$JOBID/artifacts/windows%2F$@" -O $@
100100
101−man/pandoc.1: MANUAL.txt man/pandoc.1.template
102− pandoc $< -f markdown-smart -t man -s --template man/pandoc.1.template \
101+man/pandoc.1: MANUAL.txt man/pandoc.1.before man/pandoc.1.after
102+ pandoc $< -f markdown-smart -t man -s \
103103 --lua-filter man/manfilter.lua \
104− --variable version="pandoc $(version)" \
104+ --include-before-body man/pandoc.1.before \
105+ --include-after-body man/pandoc.1.after \
106+ --metadata author="" \
107+ --variable footer="pandoc $(version)" \
105108 -o $@
106109
107110doc/lua-filters.md: tools/ldoc.ltp data/pandoc.lua tools/update-lua-docs.lua
man/pandoc.1.afternew file+3
@@ -0,0 +1,3 @@
1+.PP
2+The Pandoc source code and all documentation may be downloaded
3+from <http://pandoc.org>.
man/pandoc.1.beforenew file+2
@@ -0,0 +1,2 @@
1+.SH NAME
2+pandoc - general markup converter
man/pandoc.1.templatedeleted−10
@@ -1,10 +0,0 @@
1−$if(has-tables)$
2−.\"t
3−$endif$
4−.TH PANDOC 1 "$date$" "$version$"
5−.SH NAME
6−pandoc - general markup converter
7−$body$
8−.PP
9−The Pandoc source code and all documentation may be downloaded
10−from <http://pandoc.org>.
pandoc.cabal+2−1
@@ -188,7 +188,8 @@ extra-source-files:
188188 stack.yaml
189189 -- files needed to build man page
190190 man/manfilter.lua
191− man/pandoc.1.template
191+ man/pandoc.1.before
192+ man/pandoc.1.after
192193 -- trypandoc
193194 trypandoc/Makefile
194195 trypandoc/index.html