aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs6
-rw-r--r--tests/latex-reader.latex2
-rw-r--r--tests/writer.latex2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index a4157da2f..349074a82 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -407,8 +407,10 @@ title = try $ do
authors :: GenParser Char ParserState Block
authors = try $ do
string "\\author{"
- raw <- many1 (notFollowedBy (char '}') >> inline)
- let authors' = map normalizeSpaces $ splitBy (== LineBreak) raw
+ let andsep = try $ string "\\and" >> notFollowedBy letter >>
+ spaces >> return '&'
+ raw <- sepBy (many $ notFollowedBy (char '}' <|> andsep) >> inline) andsep
+ let authors' = map normalizeSpaces raw
char '}'
spaces
updateState (\s -> s { stateAuthors = authors' })
diff --git a/tests/latex-reader.latex b/tests/latex-reader.latex
index 135ee57bb..119ad0881 100644
--- a/tests/latex-reader.latex
+++ b/tests/latex-reader.latex
@@ -17,7 +17,7 @@
\setcounter{secnumdepth}{0}
\VerbatimFootnotes % allows verbatim text in footnotes
\title{Pandoc Test Suite}
-\author{John MacFarlane\\Anonymous}
+\author{John MacFarlane \and Anonymous}
\date{July 17, 2006}
\begin{document}
\maketitle
diff --git a/tests/writer.latex b/tests/writer.latex
index 15a45a521..8cf7d4887 100644
--- a/tests/writer.latex
+++ b/tests/writer.latex
@@ -32,7 +32,7 @@
\VerbatimFootnotes % allows verbatim text in footnotes
\title{Pandoc Test Suite}
-\author{John MacFarlane\\Anonymous}
+\author{John MacFarlane \and Anonymous}
\date{July 17, 2006}
\begin{document}