computorg / computo-quarto-extension

Quarto extension for Computo template
https://computorg.github.io/computo-quarto-extension/
MIT License
16 stars 4 forks source link

Still a problem with tikz #33

Open durandg12 opened 1 day ago

durandg12 commented 1 day ago

Hello, I tried the workaround discussed in #20 and #24: for my two tikz diagrams I added the lines %%| filename: ../figure-tikz/fig-tikz-01 and %%| filename: ../figure-tikz/fig-tikz-02.

But I still have a problem in html render. The execution fails in 2 to 4 secondes with the following error message:

Error running filter /Applications/quarto/share/filters/main.lua:
inkscape: createProcess: posix_spawnp: does not exist (No such file or directory)
stack traceback:
    ...utorg/computo/_extensions/pandoc-ext/diagram/diagram.lua:421: in upvalue 'pdf2svg'
    ...utorg/computo/_extensions/pandoc-ext/diagram/diagram.lua:573: in function <...utorg/computo/_extensions/pandoc-ext/diagram/diagram.lua:521>
    [C]: in ?
    [C]: in method 'walk'
    ...utorg/computo/_extensions/pandoc-ext/diagram/diagram.lua:610: in function <...utorg/computo/_extensions/pandoc-ext/diagram/diagram.lua:608>
    [C]: in ?
    [C]: in method 'walk'
    /Applications/quarto/share/filters/main.lua:557: in local 'checked_walk'
    /Applications/quarto/share/filters/main.lua:609: in function 'run_emulated_filter'
    /Applications/quarto/share/filters/main.lua:1334: in local 'callback'
    [string "..."]:1888: in field 'withScriptFile'
    /Applications/quarto/share/filters/main.lua:1350: in upvalue 'run_emulated_filter_chain'
    /Applications/quarto/share/filters/main.lua:1388: in function </Applications/quarto/share/filters/main.lua:1385>
stack traceback:
    ...utorg/computo/_extensions/pandoc-ext/diagram/diagram.lua:610: in function <...utorg/computo/_extensions/pandoc-ext/diagram/diagram.lua:608>
    [C]: in ?
    [C]: in method 'walk'
    /Applications/quarto/share/filters/main.lua:557: in local 'checked_walk'
    /Applications/quarto/share/filters/main.lua:609: in function 'run_emulated_filter'
    /Applications/quarto/share/filters/main.lua:1334: in local 'callback'
    [string "..."]:1888: in field 'withScriptFile'
    /Applications/quarto/share/filters/main.lua:1350: in upvalue 'run_emulated_filter_chain'
    /Applications/quarto/share/filters/main.lua:1388: in function </Applications/quarto/share/filters/main.lua:1385>
stack traceback:
    /Applications/quarto/share/filters/main.lua:557: in local 'checked_walk'
    /Applications/quarto/share/filters/main.lua:609: in function 'run_emulated_filter'
    /Applications/quarto/share/filters/main.lua:1334: in local 'callback'
    [string "..."]:1888: in field 'withScriptFile'
    /Applications/quarto/share/filters/main.lua:1350: in upvalue 'run_emulated_filter_chain'
    /Applications/quarto/share/filters/main.lua:1388: in function </Applications/quarto/share/filters/main.lua:1385>

Furthermore the folder figure-tikz is never created.

I installed and updated pdf2svg and lua with Homebrew (I'm running on macOS 13.6.3, Apple M2 chip, R 4.4.2, last RStudio version 2024.09.1+394).

durandg12 commented 1 day ago

Solved by installing inkscape

durandg12 commented 1 day ago

That said, the github action build still fails after pushing, so there is still something that needs a fix.