Put version in lower-left corner of man pages.

This commit is contained in:
John MacFarlane 2014-08-30 16:11:45 -07:00
parent 58b32107ad
commit fcd35cc955
3 changed files with 5 additions and 3 deletions

View file

@ -47,8 +47,10 @@ makeManPage verbose page meta blocks = do
writeManPage :: FilePath -> String -> Pandoc -> IO ()
writeManPage page templ doc = do
let version = pandocVersion
let opts = def{ writerStandalone = True
, writerTemplate = templ }
, writerTemplate = templ
, writerVariables = [("version",version)] }
let manPage = writeMan opts $
bottomUp (concatMap removeLinks) $
bottomUp capitalizeHeaders doc

View file

@ -1,7 +1,7 @@
$if(has-tables)$
.\"t
$endif$
.TH PANDOC 1 "$date$" "$title$"
.TH PANDOC 1 "$date$" "$version$"
.SH NAME
pandoc - general markup converter
$body$

View file

@ -1,7 +1,7 @@
$if(has-tables)$
.\"t
$endif$
.TH PANDOC_MARKDOWN 5 "$date$" "$title$"
.TH PANDOC_MARKDOWN 5 "$date$" "$version$"
.SH NAME
pandoc_markdown - markdown syntax for pandoc(1)
.SH DESCRIPTION