packages feed

pandoc-plot 1.9.0 → 1.9.1

raw patch · 4 files changed

+13/−4 lines, 4 filesdep ~optparse-applicativePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: optparse-applicative

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -2,6 +2,10 @@  pandoc-plot uses [Semantic Versioning](http://semver.org/spec/v2.0.0.html) +## Release 1.9.1++* Fixed an issue where extra parameters were not passed down to `pandoc`, depending on the output format (#38).+ ## Release 1.9.0  * Added support for [Mermaid](https://mermaid.js.org/), thanks to a contribution by Sanchayan Maity (#74).
pandoc-plot.cabal view
@@ -1,6 +1,6 @@ cabal-version:  2.2 name:           pandoc-plot-version:        1.9.0+version:        1.9.1 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/Embed.hs view
@@ -86,7 +86,7 @@     -- so that pandoc-plot plays nice with pandoc-crossref and other filters     figureWith as (simpleCaption (plain caption')) $       plain $-        imageWith mempty (pack fp) mempty caption'+        imageWith as (pack fp) mempty caption'  -- TODO: also add the case where SVG plots can be --       embedded in HTML output@@ -111,19 +111,22 @@ --     |]  latexInput :: Attr -> FilePath -> Inlines -> PlotM Block-latexInput _ fp caption' = do+latexInput (_, _, attrs) fp caption' = do   renderedCaption' <- writeLatex caption'   let renderedCaption =         if renderedCaption' /= ""           then [st|\caption{#{renderedCaption'}}|]           else ""+  -- We need to propagate extra attributes, for example, to control+  -- figure sizes. See #38+  let renderedExtraAttributes = mconcat $ [key <> "=" <> value | (key, value) <- attrs]   return $     RawBlock       "latex"       [st|     \begin{figure}         \centering-        \input{#{pack $ normalizePath $ fp}}+        \includegraphics[#{renderedExtraAttributes}]{#{pack $ normalizePath $ fp}}         #{renderedCaption}     \end{figure}         |]
src/Text/Pandoc/Filter/Plot/Parse.hs view
@@ -117,6 +117,8 @@               extraAttrs = Map.toList extraAttrs'               blockAttrs = (id', filter (/= cls toolkit) classes, filteredAttrs) +          debug $ "Propagating attributes unrelated to pandoc-plot: " <> tshow blockAttrs+           let blockDependencies = parseFileDependencies $ fromMaybe mempty $ Map.lookup (tshow DependenciesK) attrs'               dependencies = defaultDependencies conf <> blockDependencies