From 6c029621ed9399abebbfd4fc43af0dd751c621aa Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 21 Jul 2011 10:09:51 -0700 Subject: LaTeX reader & writer: Use \and to separate authors. Closes #279. --- src/Text/Pandoc/Readers/LaTeX.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc') 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' }) -- cgit v1.2.3