pandoc-plot 1.5.3 → 1.5.4
raw patch · 3 files changed
+11/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
CHANGELOG.md view
@@ -2,9 +2,13 @@ pandoc-plot uses [Semantic Versioning](http://semver.org/spec/v2.0.0.html) +## Release 1.5.4++* Fixed an issue where graphviz plots in vector format were cropped when a DPI was specified (#40).+ ## Release 1.5.3 -* Fixed an issue where the `tight_bbox` option for Matplotlib plots was ignored (#48)+* Fixed an issue where the `tight_bbox` option for Matplotlib plots was ignored (#48). ## Release 1.5.2
pandoc-plot.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: pandoc-plot-version: 1.5.3+version: 1.5.4 synopsis: A Pandoc filter to include figures generated from code blocks using your plotting toolkit of choice. description: A Pandoc filter to include figures generated from code blocks. Keep the document and code in the same location. Output is
src/Text/Pandoc/Filter/Plot/Renderers/Graphviz.hs view
@@ -43,8 +43,11 @@ graphvizCommand :: Text -> OutputSpec -> Text graphvizCommand cmdargs OutputSpec {..} = let fmt = fmap toLower . show . saveFormat $ oFigureSpec- dpi' = dpi oFigureSpec- in [st|#{pathToExe oExecutable} #{cmdargs} -T#{fmt} -Gdpi=#{dpi'} -o "#{oFigurePath}" "#{oScriptPath}"|]+ -- Specifying a DPI when the output format is SVG crops the final figure+ -- See issue #40+ -- TODO: does this also affect other vector formats like EPS?+ dpi' = if saveFormat oFigureSpec == SVG then mempty else [st|-Gdpi=#{dpi oFigureSpec}|]+ in [st|#{pathToExe oExecutable} #{cmdargs} -T#{fmt} #{dpi'} -o "#{oFigurePath}" "#{oScriptPath}"|] -- Graphviz export is entirely based on command-line arguments -- so there is no need to modify the script itself.