Closed lsignac closed 1 year ago
That line should probably be local pkgs = opt['additional-packages'] or opt['additionalPackages'] or ''
; the camelCase version was just not handled. One can also use additional-packages="..."
for the time being.
I tried opt['additionalPackages']
in diagram.lua
before opening this issue and it did not work. My conclusion was that I did not understand the opt[...]
thing.
Writing additional-packages
instead of additionalPackages in the markdown file does not work either (I tried with the sample.md
you provided (camelCase)).
You're right, I forgot that I changed this to opt-additional-packages
. The docs have not been updated yet.
Got it... ! You sample.md file contains :
```{.tikz caption="This is an image, created by **TikZ i.e. LaTeX**."
additionalPackages="\usepackage{adjustbox}"}
...
But it should be :
```{.tikz caption="This is an image, created by **TikZ i.e. LaTeX**."
opt-additional-packages="\usepackage{adjustbox}"}
...
Oh... too late :)
The real reference files are those named test/input-*.md
now. I'll remove sample.md
.
Not sure that test/input-*.md
are good for the final user. The first thing I did when I found your filter was trying to compile a sample file to check that the filter matched my needs. (It matched). I close the issue. Thank you for your work and you blazingly fast answers
It seems to me that additional packages for tikz are not taken into account.
sample.md
contains :but in
diagram.lua
:variable
pkgs
remains empty (opt['additional-packages']
isnil
). The package is not added, and compilation fails (missing\trimbox
).If I add
\usepackage{adjustbox}
directly inlocal tikz_template
variable, everything works fine.I don't understand lua enough to make a PR... :)