diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 11 | ||||
| -rw-r--r-- | src/Text/Pandoc/Readers/LaTeX/Parsing.hs | 2 | 
2 files changed, 7 insertions, 6 deletions
| diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 4805bcdde..c42a21465 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -1690,7 +1690,7 @@ newtheorem = do    sp    series <- option Nothing $ Just . untokenize <$> bracketedToks    sp -  showName <- untokenize <$> braced +  showName <- tok    sp    syncTo <- option Nothing $ Just . untokenize <$> bracketedToks    sty <- sLastTheoremStyle <$> getState @@ -1769,8 +1769,9 @@ theoremEnvironment name = do                   Just ident ->                     updateState $ \s ->                       s{ sLabels = M.insert ident -                         [Str (theoremName tspec), Str "\160", -                          Str (renderDottedNum num)] (sLabels s) } +                         (B.toList $ +                           theoremName tspec <> "\160" <> +                           str (renderDottedNum num)) (sLabels s) }                   Nothing -> return ()                 return $ space <> B.text (renderDottedNum num)              else return mempty @@ -1778,8 +1779,8 @@ theoremEnvironment name = do                           PlainStyle      -> B.strong                           DefinitionStyle -> B.strong                           RemarkStyle     -> B.emph -       let title = titleEmph (B.text (theoremName tspec) <> number) -                                      <> optTitle <> "." <> space +       let title = titleEmph (theoremName tspec <> number) +                      <> optTitle <> "." <> space         return $ divWith (fromMaybe "" mblabel, [name], []) $ addTitle title                $ case theoremStyle tspec of                    PlainStyle -> walk italicize bs diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs index c349fe3b1..6d6d4f3ec 100644 --- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs +++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs @@ -122,7 +122,7 @@ data TheoremStyle =  data TheoremSpec =    TheoremSpec -    { theoremName    :: Text +    { theoremName    :: Inlines      , theoremStyle   :: TheoremStyle      , theoremSeries  :: Maybe Text      , theoremSyncTo  :: Maybe Text | 
