You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add support for inline or included plantuml diagrams.
- Use figure identifiers for rendered mermaid / plantuml / aavg
diagrams, allowing deletion of stale renders.
- Collate all rendered output (including latex cache files) to a .cache/ directory.
- Fix permissions for cached/generated files.
print(string.format('%s already exists; not re-rendering it', filename_pdf))
13
+
ifutils.fileExists(filename_pdf) then
14
+
print(string.format(" not converting %s (already up-to-date as %s)", attrs.identifier, filename_pdf))
47
15
else
48
16
print(string.format('rendering %s using aasvg ...', filename_svg))
49
-
ifnotrunCommandWithInput(string.format(
17
+
ifnotutils.runCommandWithInput(string.format(
50
18
"aasvg --fill > %s 2>&1", filename_svg), code) then
51
19
print(string.format('failed to convert ASCII art SVG (aasvg) diagram to %s using aasvg, falling back to letting LaTeX try to pick it up', filename_svg))
52
20
returnfalse
21
+
else
22
+
print(string.format(" rendered %s to %s", attrs.identifier, filename_svg))
53
23
end
54
24
55
25
print(string.format('converting %s to %s using rsvg-convert ...', filename_svg, filename_pdf))
56
-
ifnotrunCommandSuppressOutput(string.format("rsvg-convert --format=pdf --keep-aspect-ratio --output %s %s 2>&1", filename_pdf, filename_svg)) then
26
+
ifnotutils.runCommandSuppressOutput(string.format("rsvg-convert --format=pdf --keep-aspect-ratio --output %s %s 2>&1", filename_pdf, filename_svg)) then
57
27
print(string.format('failed to convert %s to %s using rsvg-convert, falling back to letting LaTeX try to pick it up', filename_svg, filename_pdf))
58
28
returnfalse
29
+
else
30
+
print(string.format(' converted %s to %s', filename_svg, filename_pdf))
31
+
end
32
+
33
+
-- Delete stale copies of the files. This makes it easier to cache only the latest converted pdfs.
34
+
-- Don't do this if the "keepstaleimages" variable is set.
35
+
ifnotPANDOC_WRITER_OPTIONS.variables["keepstaleimages"] then
0 commit comments