LaTeX reader: Allow skipping of unknown block commands in \author section.

Closes #505, which was a problem with `\vspace{10pt}` inside `\author`.
This commit is contained in:
John MacFarlane 2012-05-11 20:50:00 -07:00
parent c844634757
commit 206f261194

View file

@ -298,7 +298,9 @@ authors :: LP ()
authors = try $ do
char '{'
let oneAuthor = mconcat <$>
many1 (notFollowedBy' (controlSeq "and") >> inline)
many1 (notFollowedBy' (controlSeq "and") >>
(inline <|> mempty <$ blockCommand))
-- skip e.g. \vspace{10pt}
auths <- sepBy oneAuthor (controlSeq "and")
char '}'
updateState (\s -> s { stateAuthors = map (normalizeSpaces . toList) auths })