diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-02-12 17:43:10 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-02-12 17:43:55 -0800 |
commit | 3a79f37d8814d3870f7243a23b54f899a1e67065 (patch) | |
tree | c38cd650305ec9d999e80495f7e7abc265c1b310 /src/Text/Pandoc/Readers/LaTeX | |
parent | 1433aaa4c35af84fbe00ecf971acd1414da6dea8 (diff) | |
download | pandoc-3a79f37d8814d3870f7243a23b54f899a1e67065.tar.gz |
LaTeX reader: improve caption and label parsing.
- Don't emit empty Span elements for labels.
- Put tables with labels in a surrounding Div.
Diffstat (limited to 'src/Text/Pandoc/Readers/LaTeX')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX/Parsing.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs index 4aa9976c9..cfd4f1dba 100644 --- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs +++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs @@ -115,12 +115,13 @@ data LaTeXState = LaTeXState{ sOptions :: ReaderOptions , sLogMessages :: [LogMessage] , sIdentifiers :: Set.Set Text , sVerbatimMode :: Bool - , sCaption :: (Maybe Inlines, Maybe Text) + , sCaption :: Maybe Inlines , sInListItem :: Bool , sInTableCell :: Bool , sLastHeaderNum :: DottedNum , sLastFigureNum :: DottedNum , sLastTableNum :: DottedNum + , sLastLabel :: Maybe Text , sLabels :: M.Map Text [Inline] , sHasChapters :: Bool , sToggles :: M.Map Text Bool @@ -137,12 +138,13 @@ defaultLaTeXState = LaTeXState{ sOptions = def , sLogMessages = [] , sIdentifiers = Set.empty , sVerbatimMode = False - , sCaption = (Nothing, Nothing) + , sCaption = Nothing , sInListItem = False , sInTableCell = False , sLastHeaderNum = DottedNum [] , sLastFigureNum = DottedNum [] , sLastTableNum = DottedNum [] + , sLastLabel = Nothing , sLabels = M.empty , sHasChapters = False , sToggles = M.empty |