Skip to content

Commit

Permalink
Put version in lower-left corner of man pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Aug 30, 2014
1 parent 58b3210 commit fcd35cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion man/make-pandoc-man-pages.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion man/man1/pandoc.1.template
Original file line number Diff line number Diff line change
@@ -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$
Expand Down
2 changes: 1 addition & 1 deletion man/man5/pandoc_markdown.5.template
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit fcd35cc

Please sign in to comment.