LaTeX reader: treat \paragraph and \subparagraph as level 4, 5 headers.
Resolves Issue #207.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1838 788f1e2b-df1e-0410-8736-df70ead52e1b
commit07f25fb13c2248f4a1cc0e34fa35b6c250e62a61
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
dateFri 12 Feb 2010, 03:03 (17 years ago)
parent53ede0d
src/Text/Pandoc/Readers/LaTeX.hs+2−2
@@ -169,12 +169,12 @@ header :: GenParser Char ParserState Block
169169header = try $ do
170170 char '\\'
171171 subs <- many (try (string "sub"))
172− string "section"
172+ base <- try (string "section" >> return 1) <|> (string "paragraph" >> return 4)
173173 optional (char '*')
174174 char '{'
175175 title' <- manyTill inline (char '}')
176176 spaces
177− return $ Header (length subs + 1) (normalizeSpaces title')
177+ return $ Header (length subs + base) (normalizeSpaces title')
178178
179179--
180180-- hrule block