aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-07-21 10:09:51 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2011-07-21 10:09:51 -0700
commit6c029621ed9399abebbfd4fc43af0dd751c621aa (patch)
tree7b65ce2819579607d672751b07b7f65f1d72da3c /src/Text/Pandoc
parentbd18a80ebe7fbd8795aa30b7a3617891ae827ea8 (diff)
downloadpandoc-6c029621ed9399abebbfd4fc43af0dd751c621aa.tar.gz
LaTeX reader & writer: Use \and to separate authors.
Closes #279.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs6
1 files changed, 4 insertions, 2 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' })