-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A Pandoc filter to include figures generated from code blocks using your plotting toolkit of choice. -- -- A Pandoc filter to include figures generated from code blocks. Keep -- the document and code in the same location. Output is captured and -- included as a figure. @package pandoc-plot @version 1.2.1 -- | This module re-exports internal pandoc-plot functionality. The -- external use of content from this module is discouraged. module Text.Pandoc.Filter.Plot.Internal -- | Get the renderer associated with a toolkit. If the renderer has not -- been used before, initialize it and store where it is. It will be -- re-used. renderer :: Toolkit -> PlotM (Maybe Renderer) -- | The function that maps from configuration to the preamble. preambleSelector :: Toolkit -> Configuration -> Script -- | Parse code block headers for extra attributes that are specific to -- this renderer. By default, no extra attributes are parsed. parseExtraAttrs :: Toolkit -> Map Text Text -> Map Text Text -- | Find an executable. executable :: Toolkit -> PlotM (Maybe Executable) -- | List of toolkits available on this machine. The executables to look -- for are taken from the configuration. availableToolkits :: Configuration -> IO [Toolkit] -- | Monadic version of availableToolkits. -- -- Note that logging is disabled availableToolkitsM :: PlotM [Toolkit] -- | List of toolkits not available on this machine. The executables to -- look for are taken from the configur unavailableToolkits :: Configuration -> IO [Toolkit] -- | Monadic version of unavailableToolkits unavailableToolkitsM :: PlotM [Toolkit] -- | Save formats supported by this renderer. supportedSaveFormats :: Toolkit -> [SaveFormat] -- | Internal description of all information needed to output a figure. data OutputSpec OutputSpec :: FigureSpec -> FilePath -> FilePath -> FilePath -> OutputSpec -- | Figure spec [oFigureSpec] :: OutputSpec -> FigureSpec -- | Path to the script to render [oScriptPath] :: OutputSpec -> FilePath -- | Figure output path [oFigurePath] :: OutputSpec -> FilePath -- | Current working directory (used for PlantUML) [oCWD] :: OutputSpec -> FilePath -- | Executable program and directory where it can be found. data Executable Executable :: FilePath -> Text -> Executable data Renderer Renderer :: Toolkit -> Executable -> (FigureSpec -> FilePath -> Script) -> (OutputSpec -> Text) -> [SaveFormat] -> [Script -> CheckResult] -> Text -> (Text -> Text) -> String -> Renderer [rendererToolkit] :: Renderer -> Toolkit [rendererExe] :: Renderer -> Executable [rendererCapture] :: Renderer -> FigureSpec -> FilePath -> Script [rendererCommand] :: Renderer -> OutputSpec -> Text [rendererSupportedSaveFormats] :: Renderer -> [SaveFormat] [rendererChecks] :: Renderer -> [Script -> CheckResult] [rendererLanguage] :: Renderer -> Text [rendererComment] :: Renderer -> Text -> Text [rendererScriptExtension] :: Renderer -> String -- | Possible result of running a script data ScriptResult ScriptSuccess :: ScriptResult ScriptChecksFailed :: Text -> ScriptResult ScriptFailure :: Text -> Int -> Script -> ScriptResult runTempScript :: FigureSpec -> PlotM ScriptResult runScriptIfNecessary :: FigureSpec -> PlotM ScriptResult -- | Determine the path a figure should have. The path for this file is -- unique to the content of the figure, so that figurePath can -- be used to determine whether a figure should be rendered again or not. figurePath :: FigureSpec -> PlotM FilePath -- | Determine the path to the source code that generated the figure. To -- ensure that the source code path is distinguished from HTML figures, -- we use the extension .src.html. sourceCodePath :: FigureSpec -> PlotM FilePath -- | Determine which toolkit should be used to render the plot from a code -- block, if any. plotToolkit :: Block -> Maybe Toolkit -- | Determine inclusion specifications from Block attributes. If -- an environment is detected, but the save format is incompatible, an -- error will be thrown. parseFigureSpec :: Block -> PlotM ParseFigureResult data ParseFigureResult NotAFigure :: ParseFigureResult Figure :: FigureSpec -> ParseFigureResult MissingToolkit :: Toolkit -> ParseFigureResult -- | Reader a caption, based on input document format captionReader :: Format -> Text -> Maybe [Inline] -- | Read configuration from a YAML file. The keys are exactly the same as -- for code blocks. -- -- If a key is not present, its value will be set to the default value. -- Parsing errors result in thrown exceptions. configuration :: FilePath -> IO Configuration -- | Extact path to configuration from the metadata in a Pandoc document. -- The path to the configuration file should be under the -- plot-configuration key. In case there is no such metadata, -- return the default configuration. -- -- For example, at the top of a markdown file: -- --
--   ---
--   title: My document
--   author: John Doe
--   plot-configuration: pathto/file.yml
--   ---
--   
-- -- The same can be specified via the command line using Pandoc's -- -M flag: -- --
--   pandoc --filter pandoc-plot -M plot-configuration="path/to/file.yml" ...
--   
configurationPathMeta :: Pandoc -> Maybe FilePath -- | Default configuration values. defaultConfiguration :: Configuration -- | Clean all output related to pandoc-plot. This includes output -- directories specified in the configuration and in the document/block, -- as well as log files. Note that *all* files in pandoc-plot output -- directories will be removed. -- -- The cleaned directories are returned. cleanOutputDirs :: Walkable Block b => Configuration -> b -> IO [FilePath] -- | Analyze a document to determine where would the pandoc-plot output -- directories be. outputDirs :: Walkable Block b => b -> PlotM [FilePath] -- | Read a document, guessing what extensions and reader options are -- appropriate. If the file cannot be read for any reason, an error is -- thrown. readDoc :: FilePath -> IO Pandoc -- | The Configuration type holds the default values to use when -- running pandoc-plot. These values can be overridden in code blocks. -- -- You can create an instance of the Configuration type from -- file using the configuration function. -- -- You can store the path to a configuration file in metadata under the -- key plot-configuration. For example, in Markdown: -- --
--   ---
--   title: My document
--   author: John Doe
--   plot-configuration: pathtofile.yml
--   ---
--   
-- -- The same can be specified via the command line using Pandoc's -- -M flag: -- --
--   pandoc --filter pandoc-plot -M plot-configuration="path/to/file.yml" ...
--   
-- -- In this case, use configurationPathMeta to extact the path -- from Pandoc documents. data Configuration Configuration :: !FilePath -> !Bool -> !Int -> !SaveFormat -> ![FilePath] -> !Format -> !Text -> !Bool -> !Verbosity -> !LogSink -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Bool -> !Bool -> Configuration -- | The default directory where figures will be saved. [defaultDirectory] :: Configuration -> !FilePath -- | The default behavior of whether or not to include links to source code -- and high-res [defaultWithSource] :: Configuration -> !Bool -- | The default dots-per-inch value for generated figures. Renderers might -- ignore this. [defaultDPI] :: Configuration -> !Int -- | The default save format of generated figures. [defaultSaveFormat] :: Configuration -> !SaveFormat -- | List of files/directories on which all figures depend. [defaultDependencies] :: Configuration -> ![FilePath] -- | Caption format, in the same notation as Pandoc format, e.g. -- "markdown+tex_math_dollars" [captionFormat] :: Configuration -> !Format -- | The text label to which the source code is linked. Change this if you -- are writing non-english documents. [sourceCodeLabel] :: Configuration -> !Text -- | Whether to halt pandoc-plot when an error is encountered or not. [strictMode] :: Configuration -> !Bool -- | Level of logging verbosity. [logVerbosity] :: Configuration -> !Verbosity -- | Method of logging, i.e. printing to stderr or file. [logSink] :: Configuration -> !LogSink -- | The default preamble script for the matplotlib toolkit. [matplotlibPreamble] :: Configuration -> !Script -- | The default preamble script for the Plotly/Python toolkit. [plotlyPythonPreamble] :: Configuration -> !Script -- | The default preamble script for the Plotly/R toolkit. [plotlyRPreamble] :: Configuration -> !Script -- | The default preamble script for the MATLAB toolkit. [matlabPreamble] :: Configuration -> !Script -- | The default preamble script for the Mathematica toolkit. [mathematicaPreamble] :: Configuration -> !Script -- | The default preamble script for the GNU Octave toolkit. [octavePreamble] :: Configuration -> !Script -- | The default preamble script for the GGPlot2 toolkit. [ggplot2Preamble] :: Configuration -> !Script -- | The default preamble script for the gnuplot toolkit. [gnuplotPreamble] :: Configuration -> !Script -- | The default preamble script for the Graphviz toolkit. [graphvizPreamble] :: Configuration -> !Script -- | The default preamble script for the Python/Bokeh toolkit. [bokehPreamble] :: Configuration -> !Script -- | The default preamble script for the Julia/Plots.jl toolkit. [plotsjlPreamble] :: Configuration -> !Script -- | The default preamble script for the PlantUML toolkit. [plantumlPreamble] :: Configuration -> !Script -- | The executable to use to generate figures using the matplotlib -- toolkit. [matplotlibExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the MATLAB toolkit. [matlabExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the Plotly/Python -- toolkit. [plotlyPythonExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the Plotly/R toolkit. [plotlyRExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the Mathematica -- toolkit. [mathematicaExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the GNU Octave -- toolkit. [octaveExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the GGPlot2 toolkit. [ggplot2Exe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the gnuplot toolkit. [gnuplotExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the Graphviz toolkit. [graphvizExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the Python/Bokeh -- toolkit. [bokehExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the Julia/Plots.jl -- toolkit. [plotsjlExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the PlantUML toolkit. [plantumlExe] :: Configuration -> !FilePath -- | Command-line arguments to pass to the Python interpreter for the -- Matplotlib toolkit [matplotlibCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the MATLAB -- toolkit. [matlabCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the -- Plotly/Python toolkit. [plotlyPythonCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the Plotly/R -- toolkit. [plotlyRCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the Mathematica -- toolkit. [mathematicaCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the GNU Octave -- toolkit. [octaveCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the GGPlot2 -- toolkit. [ggplot2CmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the gnuplot -- toolkit. [gnuplotCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the Graphviz -- toolkit. [graphvizCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the Python/Bokeh -- toolkit. [bokehCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the -- Julia/Plots.jl toolkit. [plotsjlCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the plantUML -- toolkit. [plantumlCmdArgs] :: Configuration -> !Text -- | Whether or not to make Matplotlib figures tight by default. [matplotlibTightBBox] :: Configuration -> !Bool -- | Whether or not to make Matplotlib figures transparent by default. [matplotlibTransparent] :: Configuration -> !Bool -- | pandoc-plot monad type PlotM = StateT PlotState (ReaderT RuntimeEnv IO) data RuntimeEnv RuntimeEnv :: Maybe Format -> Configuration -> Logger -> FilePath -> RuntimeEnv [envFormat] :: RuntimeEnv -> Maybe Format [envConfig] :: RuntimeEnv -> Configuration [envLogger] :: RuntimeEnv -> Logger [envCWD] :: RuntimeEnv -> FilePath data PlotState PlotState :: MVar (Map FilePath FileHash) -> MVar (Map Toolkit (Maybe Renderer)) -> PlotState -- | Evaluate a PlotM action. runPlotM :: Maybe Format -> Configuration -> PlotM a -> IO a -- | maps a function, performing at most N actions concurrently. mapConcurrentlyN :: Traversable t => Int -> (a -> PlotM b) -> t a -> PlotM (t b) -- | Run a command within the PlotM monad. Stderr stream is read -- and decoded, while Stdout is ignored. Logging happens at the debug -- level if the command succeeds, or at the error level if it does not -- succeed. runCommand :: FilePath -> Text -> PlotM (ExitCode, Text) -- | Prepend a directory to the PATH environment variable for the duration -- of a computation. -- -- This function is exception-safe; even if an exception happens during -- the computation, the PATH environment variable will be reverted back -- to its initial value. withPrependedPath :: FilePath -> PlotM a -> PlotM a -- | Conditional execution of a PlotM action if pandoc-plot is run in -- strict mode. whenStrict :: PlotM () -> PlotM () -- | Throw an error that halts the execution of pandoc-plot due to a -- strict-mode. throwStrictError :: Text -> PlotM () -- | Get a filehash. If the file hash has been computed before, it is -- reused. Otherwise, the filehash is calculated and stored. fileHash :: FilePath -> PlotM FileHash -- | Find an executable. executable :: Toolkit -> PlotM (Maybe Executable) -- | Verbosity of the logger. data Verbosity -- | Log all messages, including debug messages. Debug :: Verbosity -- | Log information, warning, and error messages. Info :: Verbosity -- | Log warning and error messages. Warning :: Verbosity -- | Only log errors. Error :: Verbosity -- | Don't log anything. Silent :: Verbosity -- | Description of the possible ways to sink log messages. data LogSink -- | Standard error stream. StdErr :: LogSink -- | Appended to file. LogFile :: FilePath -> LogSink debug :: (MonadLogger m, MonadIO m) => Text -> m () err :: (MonadLogger m, MonadIO m) => Text -> m () warning :: (MonadLogger m, MonadIO m) => Text -> m () info :: (MonadLogger m, MonadIO m) => Text -> m () -- | Lift a computation from the IO monad. liftIO :: MonadIO m => IO a -> m a -- | Retrieves the monad environment. ask :: MonadReader r m => m r -- | Retrieves a function of the current environment. asks :: MonadReader r m => (r -> a) -> m a -- | Get access to configuration within the PlotM monad. asksConfig :: (Configuration -> a) -> PlotM a -- | Modify the runtime environment to be silent. silence :: PlotM a -> PlotM a -- | Enumeration of supported toolkits data Toolkit Matplotlib :: Toolkit Matlab :: Toolkit PlotlyPython :: Toolkit PlotlyR :: Toolkit Mathematica :: Toolkit Octave :: Toolkit GGPlot2 :: Toolkit GNUPlot :: Toolkit Graphviz :: Toolkit Bokeh :: Toolkit Plotsjl :: Toolkit PlantUML :: Toolkit data Renderer Renderer :: Toolkit -> Executable -> (FigureSpec -> FilePath -> Script) -> (OutputSpec -> Text) -> [SaveFormat] -> [Script -> CheckResult] -> Text -> (Text -> Text) -> String -> Renderer [rendererToolkit] :: Renderer -> Toolkit [rendererExe] :: Renderer -> Executable [rendererCapture] :: Renderer -> FigureSpec -> FilePath -> Script [rendererCommand] :: Renderer -> OutputSpec -> Text [rendererSupportedSaveFormats] :: Renderer -> [SaveFormat] [rendererChecks] :: Renderer -> [Script -> CheckResult] [rendererLanguage] :: Renderer -> Text [rendererComment] :: Renderer -> Text -> Text [rendererScriptExtension] :: Renderer -> String -- | Source context for plotting scripts type Script = Text -- | Result of checking scripts for problems data CheckResult CheckPassed :: CheckResult CheckFailed :: Text -> CheckResult -- | Description of any possible inclusion key, both in documents and in -- configuration files. data InclusionKey DirectoryK :: InclusionKey CaptionK :: InclusionKey SaveFormatK :: InclusionKey WithSourceK :: InclusionKey CaptionFormatK :: InclusionKey PreambleK :: InclusionKey DpiK :: InclusionKey SourceCodeLabelK :: InclusionKey StrictModeK :: InclusionKey ExecutableK :: InclusionKey CommandLineArgsK :: InclusionKey DependenciesK :: InclusionKey FileK :: InclusionKey MatplotlibTightBBoxK :: InclusionKey MatplotlibTransparentK :: InclusionKey -- | Datatype containing all parameters required to run pandoc-plot. -- -- It is assumed that once a FigureSpec has been created, no -- configuration can overload it; hence, a FigureSpec completely -- encodes a particular figure. data FigureSpec FigureSpec :: !Renderer -> !Text -> !Bool -> !Script -> !SaveFormat -> !FilePath -> !Int -> ![FilePath] -> ![(Text, Text)] -> !Attr -> FigureSpec -- | Renderer to use for this figure. [renderer_] :: FigureSpec -> !Renderer -- | Figure caption. [caption] :: FigureSpec -> !Text -- | Append link to source code in caption. [withSource] :: FigureSpec -> !Bool -- | Source code for the figure. [script] :: FigureSpec -> !Script -- | Save format of the figure. [saveFormat] :: FigureSpec -> !SaveFormat -- | Directory where to save the file. [directory] :: FigureSpec -> !FilePath -- | Dots-per-inch of figure. [dpi] :: FigureSpec -> !Int -- | Files/directories on which this figure depends, e.g. data files. [dependencies] :: FigureSpec -> ![FilePath] -- | Renderer-specific extra attributes. [extraAttrs] :: FigureSpec -> ![(Text, Text)] -- | Attributes not related to pandoc-plot will be propagated. [blockAttrs] :: FigureSpec -> !Attr -- | Internal description of all information needed to output a figure. data OutputSpec OutputSpec :: FigureSpec -> FilePath -> FilePath -> FilePath -> OutputSpec -- | Figure spec [oFigureSpec] :: OutputSpec -> FigureSpec -- | Path to the script to render [oScriptPath] :: OutputSpec -> FilePath -- | Figure output path [oFigurePath] :: OutputSpec -> FilePath -- | Current working directory (used for PlantUML) [oCWD] :: OutputSpec -> FilePath -- | Generated figure file format supported by pandoc-plot. Note that not -- all formats are supported by all toolkits. data SaveFormat -- | Portable network graphics PNG :: SaveFormat -- | Portable document format PDF :: SaveFormat -- | Scalable vector graphics SVG :: SaveFormat -- | JPEG/JPG compressed image JPG :: SaveFormat -- | Encapsulated postscript EPS :: SaveFormat -- | GIF format GIF :: SaveFormat -- | Tagged image format TIF :: SaveFormat -- | WebP image format WEBP :: SaveFormat -- | HTML for interactive plots. HTML :: SaveFormat -- | LaTeX text and pdf graphics LaTeX :: SaveFormat -- | Class name which will trigger the filter cls :: Toolkit -> Text -- | Save format file extension extension :: SaveFormat -> String -- | List of supported toolkits. toolkits :: [Toolkit] -- | List of all keys related to pandoc-plot that can be specified in -- source material. inclusionKeys :: [InclusionKey] -- | Executable program and directory where it can be found. data Executable Executable :: FilePath -> Text -> Executable exeFromPath :: FilePath -> Executable isWindows :: Bool -- | Extract the plot-relevant content from inside of a full HTML document. -- Scripts contained in the head tag are extracted, as well as the -- entirety of the body tag. extractPlot :: Text -> Text -- | Convert a FigureSpec to a Pandoc figure component. Note that -- the script to generate figure files must still be run in another -- function. toFigure :: Format -> FigureSpec -> PlotM Block -- | This module defines a Pandoc filter plotTransform and related -- functions that can be used to walk over a Pandoc document and generate -- figures from code blocks, using a multitude of plotting toolkits. -- -- The syntax for code blocks is simple. Code blocks with the appropriate -- class attribute will trigger the filter, e.g. matplotlib for -- matplotlib-based Python plots. -- -- Here is an example, in Markdown, for a plot in MATLAB: -- --
--   This is a paragraph.
--   
--   ```{.matlabplot}
--   figure()
--   plot([1,2,3,4,5], [1,2,3,4,5], '-k')
--   ```
--   
-- -- The code block will be reworked into a script and the output figure -- will be captured. Optionally, the source code used to generate the -- figure will be linked in the caption. -- -- Here are the possible attributes what pandoc-plot understands for ALL -- toolkits: -- -- -- -- Default values for the above attributes are stored in the -- Configuration datatype. These can be specified in a YAML -- file. -- -- Here is an example code block which will render a figure using -- gnuplot, in Markdown: -- --
--   ```{.gnuplot format=png caption="Sinusoidal function" source=true}
--   sin(x)
--   
--   set xlabel "x"
--   set ylabel "y"
--   ```
--   
module Text.Pandoc.Filter.Plot -- | Walk over an entire Pandoc document, transforming appropriate code -- blocks into figures. This function will operate on blocks in parallel -- if possible. -- -- Failing to render a figure does not stop the filter, so that you may -- run the filter on documents without having all necessary toolkits -- installed. In this case, error messages are printed to stderr, and -- blocks are left unchanged. plotTransform :: Configuration -> Pandoc -> IO Pandoc -- | Clean all output related to pandoc-plot. This includes output -- directories specified in the configuration and in the document/block, -- as well as log files. Note that *all* files in pandoc-plot output -- directories will be removed. -- -- The cleaned directories are returned. cleanOutputDirs :: Walkable Block b => Configuration -> b -> IO [FilePath] -- | Read configuration from a YAML file. The keys are exactly the same as -- for code blocks. -- -- If a key is not present, its value will be set to the default value. -- Parsing errors result in thrown exceptions. configuration :: FilePath -> IO Configuration -- | Default configuration values. defaultConfiguration :: Configuration -- | The Configuration type holds the default values to use when -- running pandoc-plot. These values can be overridden in code blocks. -- -- You can create an instance of the Configuration type from -- file using the configuration function. -- -- You can store the path to a configuration file in metadata under the -- key plot-configuration. For example, in Markdown: -- --
--   ---
--   title: My document
--   author: John Doe
--   plot-configuration: pathtofile.yml
--   ---
--   
-- -- The same can be specified via the command line using Pandoc's -- -M flag: -- --
--   pandoc --filter pandoc-plot -M plot-configuration="path/to/file.yml" ...
--   
-- -- In this case, use configurationPathMeta to extact the path -- from Pandoc documents. data Configuration Configuration :: !FilePath -> !Bool -> !Int -> !SaveFormat -> ![FilePath] -> !Format -> !Text -> !Bool -> !Verbosity -> !LogSink -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !Script -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !FilePath -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Bool -> !Bool -> Configuration -- | The default directory where figures will be saved. [defaultDirectory] :: Configuration -> !FilePath -- | The default behavior of whether or not to include links to source code -- and high-res [defaultWithSource] :: Configuration -> !Bool -- | The default dots-per-inch value for generated figures. Renderers might -- ignore this. [defaultDPI] :: Configuration -> !Int -- | The default save format of generated figures. [defaultSaveFormat] :: Configuration -> !SaveFormat -- | List of files/directories on which all figures depend. [defaultDependencies] :: Configuration -> ![FilePath] -- | Caption format, in the same notation as Pandoc format, e.g. -- "markdown+tex_math_dollars" [captionFormat] :: Configuration -> !Format -- | The text label to which the source code is linked. Change this if you -- are writing non-english documents. [sourceCodeLabel] :: Configuration -> !Text -- | Whether to halt pandoc-plot when an error is encountered or not. [strictMode] :: Configuration -> !Bool -- | Level of logging verbosity. [logVerbosity] :: Configuration -> !Verbosity -- | Method of logging, i.e. printing to stderr or file. [logSink] :: Configuration -> !LogSink -- | The default preamble script for the matplotlib toolkit. [matplotlibPreamble] :: Configuration -> !Script -- | The default preamble script for the Plotly/Python toolkit. [plotlyPythonPreamble] :: Configuration -> !Script -- | The default preamble script for the Plotly/R toolkit. [plotlyRPreamble] :: Configuration -> !Script -- | The default preamble script for the MATLAB toolkit. [matlabPreamble] :: Configuration -> !Script -- | The default preamble script for the Mathematica toolkit. [mathematicaPreamble] :: Configuration -> !Script -- | The default preamble script for the GNU Octave toolkit. [octavePreamble] :: Configuration -> !Script -- | The default preamble script for the GGPlot2 toolkit. [ggplot2Preamble] :: Configuration -> !Script -- | The default preamble script for the gnuplot toolkit. [gnuplotPreamble] :: Configuration -> !Script -- | The default preamble script for the Graphviz toolkit. [graphvizPreamble] :: Configuration -> !Script -- | The default preamble script for the Python/Bokeh toolkit. [bokehPreamble] :: Configuration -> !Script -- | The default preamble script for the Julia/Plots.jl toolkit. [plotsjlPreamble] :: Configuration -> !Script -- | The default preamble script for the PlantUML toolkit. [plantumlPreamble] :: Configuration -> !Script -- | The executable to use to generate figures using the matplotlib -- toolkit. [matplotlibExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the MATLAB toolkit. [matlabExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the Plotly/Python -- toolkit. [plotlyPythonExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the Plotly/R toolkit. [plotlyRExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the Mathematica -- toolkit. [mathematicaExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the GNU Octave -- toolkit. [octaveExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the GGPlot2 toolkit. [ggplot2Exe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the gnuplot toolkit. [gnuplotExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the Graphviz toolkit. [graphvizExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the Python/Bokeh -- toolkit. [bokehExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the Julia/Plots.jl -- toolkit. [plotsjlExe] :: Configuration -> !FilePath -- | The executable to use to generate figures using the PlantUML toolkit. [plantumlExe] :: Configuration -> !FilePath -- | Command-line arguments to pass to the Python interpreter for the -- Matplotlib toolkit [matplotlibCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the MATLAB -- toolkit. [matlabCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the -- Plotly/Python toolkit. [plotlyPythonCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the Plotly/R -- toolkit. [plotlyRCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the Mathematica -- toolkit. [mathematicaCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the GNU Octave -- toolkit. [octaveCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the GGPlot2 -- toolkit. [ggplot2CmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the gnuplot -- toolkit. [gnuplotCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the Graphviz -- toolkit. [graphvizCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the Python/Bokeh -- toolkit. [bokehCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the -- Julia/Plots.jl toolkit. [plotsjlCmdArgs] :: Configuration -> !Text -- | Command-line arguments to pass to the interpreter for the plantUML -- toolkit. [plantumlCmdArgs] :: Configuration -> !Text -- | Whether or not to make Matplotlib figures tight by default. [matplotlibTightBBox] :: Configuration -> !Bool -- | Whether or not to make Matplotlib figures transparent by default. [matplotlibTransparent] :: Configuration -> !Bool -- | Verbosity of the logger. data Verbosity -- | Log all messages, including debug messages. Debug :: Verbosity -- | Log information, warning, and error messages. Info :: Verbosity -- | Log warning and error messages. Warning :: Verbosity -- | Only log errors. Error :: Verbosity -- | Don't log anything. Silent :: Verbosity -- | Description of the possible ways to sink log messages. data LogSink -- | Standard error stream. StdErr :: LogSink -- | Appended to file. LogFile :: FilePath -> LogSink -- | Generated figure file format supported by pandoc-plot. Note that not -- all formats are supported by all toolkits. data SaveFormat -- | Portable network graphics PNG :: SaveFormat -- | Portable document format PDF :: SaveFormat -- | Scalable vector graphics SVG :: SaveFormat -- | JPEG/JPG compressed image JPG :: SaveFormat -- | Encapsulated postscript EPS :: SaveFormat -- | GIF format GIF :: SaveFormat -- | Tagged image format TIF :: SaveFormat -- | WebP image format WEBP :: SaveFormat -- | HTML for interactive plots. HTML :: SaveFormat -- | LaTeX text and pdf graphics LaTeX :: SaveFormat -- | Source context for plotting scripts type Script = Text -- | Enumeration of supported toolkits data Toolkit Matplotlib :: Toolkit Matlab :: Toolkit PlotlyPython :: Toolkit PlotlyR :: Toolkit Mathematica :: Toolkit Octave :: Toolkit GGPlot2 :: Toolkit GNUPlot :: Toolkit Graphviz :: Toolkit Bokeh :: Toolkit Plotsjl :: Toolkit PlantUML :: Toolkit -- | List of toolkits available on this machine. The executables to look -- for are taken from the configuration. availableToolkits :: Configuration -> IO [Toolkit] -- | List of toolkits not available on this machine. The executables to -- look for are taken from the configur unavailableToolkits :: Configuration -> IO [Toolkit] -- | List of supported toolkits. toolkits :: [Toolkit] -- | Save formats supported by this renderer. supportedSaveFormats :: Toolkit -> [SaveFormat] -- | The version of the pandoc-plot package. pandocPlotVersion :: Version -- | Try to process the block with `pandoc-plot`. If a failure happens (or -- the block) was not meant to become a figure, return the block as-is -- unless running in strict mode. -- -- New in version 1.2.0: this function will detect nested code blocks, -- for example in Div blocks. make :: Block -> PlotM Block -- | Try to process the block with `pandoc-plot`, documenting the error. -- This function does not transform code blocks nested in other blocks -- (e.g. Divs) makeEither :: Block -> PlotM (Either PandocPlotError Block) data PandocPlotError ScriptRuntimeError :: Text -> Int -> PandocPlotError ScriptChecksFailedError :: Text -> PandocPlotError ToolkitNotInstalledError :: Toolkit -> PandocPlotError instance GHC.Show.Show Text.Pandoc.Filter.Plot.PandocPlotError