File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
src/Text/Pandoc/Filter/Plot Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
pandoc-plot uses [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html )
4
4
5
+ ## Release 1.9.2
6
+
7
+ * Fixed an issue where TeX output contained a figure even if the caption was empty (#37 ).
8
+
5
9
## Release 1.9.1
6
10
7
11
* Fixed an issue where extra parameters were not passed down to ` pandoc ` , depending on the output format (#38 ).
Original file line number Diff line number Diff line change 1
1
cabal-version : 2.2
2
2
name : pandoc-plot
3
- version : 1.9.1
3
+ version : 1.9.2
4
4
synopsis : A Pandoc filter to include figures generated from code blocks using your plotting toolkit of choice.
5
5
description : A Pandoc filter to include figures generated from code blocks.
6
6
Keep the document and code in the same location. Output is
Original file line number Diff line number Diff line change @@ -82,11 +82,15 @@ figure ::
82
82
PlotM Block
83
83
figure as fp caption' =
84
84
return . head . toList $
85
- -- We want the attributes both on the Figure element and the contained Image element
86
- -- so that pandoc-plot plays nice with pandoc-crossref and other filters
87
- figureWith as (simpleCaption (plain caption')) $
88
- plain $
89
- imageWith as (pack fp) mempty caption'
85
+ if null caption'
86
+ -- If there is no caption, a LaTeX figure may look strange. See #37
87
+ then plain $ imageWith as (pack fp) mempty caption'
88
+ else
89
+ -- We want the attributes both on the Figure element and the contained Image element
90
+ -- so that pandoc-plot plays nice with pandoc-crossref and other filters
91
+ figureWith as (simpleCaption (plain caption')) $
92
+ plain $
93
+ imageWith as (pack fp) mempty caption'
90
94
91
95
-- TODO: also add the case where SVG plots can be
92
96
-- embedded in HTML output
You can’t perform that action at this time.
0 commit comments