Skip to content

Support diagram-generator for tikz when inkscape installed as snap #230

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
a2k42 opened this issue May 15, 2022 · 2 comments
Closed

Support diagram-generator for tikz when inkscape installed as snap #230

a2k42 opened this issue May 15, 2022 · 2 comments

Comments

@a2k42
Copy link

a2k42 commented May 15, 2022

Operating System: Ubuntu 22.04 LTS                
Kernel: Linux 5.15.0-30-generic
pandoc 2.18
TeX 3.141592653 (TeX Live 2022)
Inkscape 1.1.2 (08b2f3d93c, 2022-04-05)  !!! Installed as Snap

After much debugging I discovered that the below error was being caused by Inkscape being unable to read files in the /tmp directory when installed as a snap. I checked with Firefox and had the same trouble. Unfortunately with Ubuntu 22.04, snap installations are the default.

As far as resolving the issue from the diagram-generator.lua perspective, perhaps a helpful error message might be more useful than trying to solve an OS problem?

I am going to try and find some suitable workarounds for the moment, suggestions welcome.

Related: Firefox Quantum installed but doesn't see internal or external storage drives

Reproduction

Install Inkscape as a Snap and process the diagram-generator/sample.md with make test

I/O Error: Couldn't open file '/tmp/tikz2image-76c32015dfdd72fc/tikz-image.pdf': No such file or directory.
** Message: 21:20:06.663: couldn't open the PDF file.

** (org.inkscape.Inkscape:83371): WARNING **: 21:20:06.669: Can't open file: /tmp/tikz2image-76c32015dfdd72fc/tikz-image.pdf (doesn't exist)
ink_file_open: '/tmp/tikz2image-76c32015dfdd72fc/tikz-image.pdf' cannot be opened!
InkscapeApplication::document_open: Failed to open: /tmp/tikz2image-76c32015dfdd72fc/tikz-image.pdf
ConcreteInkscapeApplication::on_open: failed to create document!
Warning
no image data has been returned.
Error running filter my-tikz.lua:
my-tikz.lua:181: Image conversion failed. Aborting.
stack traceback:
        my-tikz.lua:181: in function 'CodeBlock'
@a2k42
Copy link
Author

a2k42 commented May 15, 2022

For the moment I've added a ~/tmp folder and then exported it in my .bashrc

export TMPDIR="$HOME/tmp"

@tarleb
Copy link
Member

tarleb commented Apr 16, 2023

Apologies for the late reply, see #207 for some of the reasons for this delay.

The diagram generator is now maintained at https://github.com/pandoc-ext/diagram. Please feel free to re-raise the issue there.

@tarleb tarleb closed this as completed Apr 16, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants