Skip to content

Commit

Permalink
LaTeX reader: handle figure* environment as a figure.
Browse files Browse the repository at this point in the history
Closes #10472.
  • Loading branch information
jgm committed Dec 18, 2024
1 parent d5c9fe7 commit 669c2b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Text/Pandoc/Readers/LaTeX.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,7 @@ environments = M.union (tableEnvironments block inline) $
, ("minipage", divWith ("",["minipage"],[]) <$>
env "minipage" (skipopts *> spaces *> optional braced *> spaces *> blocks))
, ("figure", env "figure" $ skipopts *> figure')
, ("figure*", env "figure*" $ skipopts *> figure')
, ("subfigure", env "subfigure" $ skipopts *> tok *> figure')
, ("center", divWith ("", ["center"], []) <$> env "center" blocks)
, ("quote", blockQuote <$> env "quote" blocks)
Expand Down
11 changes: 8 additions & 3 deletions test/command/6034.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
\end{overpic}
\end{figure*}
^D
[ RawBlock
(Format "latex")
"\\begin{figure*}\n \\centering\n \\begin{overpic}{test_pic}\n \\put (70,80) {Caption}\n \\end{overpic}\n\\end{figure*}"
[ Figure
( "" , [] , [] )
(Caption Nothing [])
[ RawBlock (Format "latex") "\\centering"
, RawBlock
(Format "latex")
"\\begin{overpic}{test_pic}\n \\put (70,80) {Caption}\n \\end{overpic}"
]
]
```

0 comments on commit 669c2b8

Please sign in to comment.