Skip to content

Commit

Permalink
feat: A CSV file as image source is interpreted as a pie chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Omikhleia authored and Didier Willis committed Feb 13, 2024
1 parent 166c59c commit 6bd05c2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/markdown/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,14 @@ Please consider using a resilient-compatible class!]])
elseif ext == "dot" then
options.format = "dot"
SILE.call("embed", options)
elseif ext == "csv" then
-- Needs warning if piecharts package is not loaded
if not (self.hasPackageSupport.piecharts or self.hasPackageSupport.piechart) then -- HACK Some early versions of piecharts have the wrong internal name
SU.error("No piecharts package available to render CSV data ".. uri)
end
options.src = nil
options.csvfile = uri
SILE.call("piechart", options)
else
SILE.call("img", options)
end
Expand Down

0 comments on commit 6bd05c2

Please sign in to comment.