summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-03-25 12:09:59 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-03-25 12:10:43 -0700
commit7bc4dc37b26fe849f2df525c32f7149c10920480 (patch)
treed77c95ad7ee9861869dff134eeb3d22f1dc7b31c
parenta2e5de1d1180c196f6b4bdfdfcadc80911e2b7c6 (diff)
Added PDF metadata (title,author) in LaTeX standalone + PDF output.
Closes #459.
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs2
m---------templates10
-rw-r--r--tests/lhs-test.latex6
-rw-r--r--tests/lhs-test.latex+lhs6
-rw-r--r--tests/writer.latex6
5 files changed, 25 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 0a6f8669c..9536a3c87 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -134,6 +134,8 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do
[ ("toc", if writerTableOfContents options then "yes" else "")
, ("body", main)
, ("title", titletext)
+ , ("title-meta", stringify title)
+ , ("author-meta", intercalate "; " $ map stringify authors)
, ("date", dateText)
, ("documentclass", if writerBeamer options
then "beamer"
diff --git a/templates b/templates
-Subproject 342435f162338e7f771599f722a26b2c871fce0
+Subproject 401f84bb044f35bfd5f906c887861c5f980f146
diff --git a/tests/lhs-test.latex b/tests/lhs-test.latex
index 2f178a67e..7fca818bd 100644
--- a/tests/lhs-test.latex
+++ b/tests/lhs-test.latex
@@ -39,10 +39,16 @@
\usepackage[setpagesize=false, % page size defined by xetex
unicode=false, % unicode breaks when used with xetex
xetex,
+ bookmarks=true,
+ pdfauthor={},
+ pdftitle={},
colorlinks=true,
linkcolor=blue]{hyperref}
\else
\usepackage[unicode=true,
+ bookmarks=true,
+ pdfauthor={},
+ pdftitle={},
colorlinks=true,
linkcolor=blue]{hyperref}
\fi
diff --git a/tests/lhs-test.latex+lhs b/tests/lhs-test.latex+lhs
index fc0d7adca..76ee4d7ce 100644
--- a/tests/lhs-test.latex+lhs
+++ b/tests/lhs-test.latex+lhs
@@ -21,10 +21,16 @@
\usepackage[setpagesize=false, % page size defined by xetex
unicode=false, % unicode breaks when used with xetex
xetex,
+ bookmarks=true,
+ pdfauthor={},
+ pdftitle={},
colorlinks=true,
linkcolor=blue]{hyperref}
\else
\usepackage[unicode=true,
+ bookmarks=true,
+ pdfauthor={},
+ pdftitle={},
colorlinks=true,
linkcolor=blue]{hyperref}
\fi
diff --git a/tests/writer.latex b/tests/writer.latex
index ba2a40e65..c56611047 100644
--- a/tests/writer.latex
+++ b/tests/writer.latex
@@ -38,10 +38,16 @@
\usepackage[setpagesize=false, % page size defined by xetex
unicode=false, % unicode breaks when used with xetex
xetex,
+ bookmarks=true,
+ pdfauthor={John MacFarlane; Anonymous},
+ pdftitle={Pandoc Test Suite},
colorlinks=true,
linkcolor=blue]{hyperref}
\else
\usepackage[unicode=true,
+ bookmarks=true,
+ pdfauthor={John MacFarlane; Anonymous},
+ pdftitle={Pandoc Test Suite},
colorlinks=true,
linkcolor=blue]{hyperref}
\fi