Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

No helpful error message when inkscape conversion fails #43

Open
jansol opened this issue Apr 4, 2022 · 5 comments
Open

No helpful error message when inkscape conversion fails #43

jansol opened this issue Apr 4, 2022 · 5 comments
Assignees
Milestone

Comments

@jansol
Copy link

jansol commented Apr 4, 2022

So it turns out that Inkscape 1.1 (and presumably 1.0) saves as SVG 2.0 by default, and this includes some subtle changes* that break SVG 1.1 parsers i.e. older Inkscape releases. This is a problem for example when using ubuntu 21.10 for editing the SVGs on the desktop and editing the LaTeX document on overleaf.com with the 2021 texlive environment which is presumably running on the previous ubuntu LTS.

Unfortunately all that LaTeX has to say about it is a relatively uninformative "blahblah_svg.pdf_tex: no such file". I've already reported this to overleaf, but on selfhosted overleaf instances and other environments this might still come as a surprise and as such it would be great if the svg package could report problems the inkscape shell command encounters.

*such as using context-stroke and context-fill instead of specific colours in curve end markers

@mrpiggi
Copy link
Owner

mrpiggi commented Apr 5, 2022

Package svg is more or less an utility for Inkscape export automation via CLI. So if an export fails and no *.pdf_tex is generated, what do you think this package should do? This package does not and will not do any validity checks on SVG files itself.

@jansol
Copy link
Author

jansol commented Apr 5, 2022

It could see to it that whatever inkscape prints to stdout/stderr ends up in the LaTeX log. Or, if inkscape returns a nonzero exit code it could report that.

@mrpiggi
Copy link
Owner

mrpiggi commented Apr 5, 2022

AFAIR, the usage of stdout and stderr by Inkscape was kind of messy:

#31
https://gitlab.com/inkscape/inbox/-/issues/3882

If you are willing to provide a minimal example one overleaf, I will see what I can do.

@mrpiggi mrpiggi self-assigned this Apr 5, 2022
@mrpiggi mrpiggi added this to the v2.03 milestone Apr 5, 2022
@jansol
Copy link
Author

jansol commented Apr 6, 2022

In a blank overleaf template use this as the document body:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{svg}
\title{svg-poc}
\author{tester}
\date{April 2022}
\begin{document}
\maketitle
\section{Introduction}
\includesvg[width=\columnwidth]{broken.svg}
\end{document}

And upload this file: broken.svg

TeX Live 2021 fails with this. The upcoming TeX Live 2022 should have a newer Inkscape that converts this svg file correctly.

@jansol
Copy link
Author

jansol commented Apr 6, 2022

I don't have an old inkscape version at hand, but if it does simply not output anything useful that is unfortunate. In that case the error about the missing file could perhaps point out that this is a possible reason for the file being missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants