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
Runaway argument?
! File ended while scanning use of ^^M.
<inserted text>
\par
<*> 1-drawing_svg-tex.tex
Looking at 1-drawing_svg-tex.tex we can discover the problem.
%% This file was generated by package `svg-extract'%% from source `test'%% It's intended to be compiled with `pdflatex' \AtBeginDocument{%\svgxsetpapersize%
}
\PassOptionsToPackage{hidelinks}{hyperref}
\begin {filecontents}[noheader]{drawing.svg}
<?xml version="1.0" encoding="UTF-8"?>
<svg width="96.725mm" height="50.327mm" version="1.1" viewBox="0 0 96.725 50.327" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><metadata><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><g transform="translate(-27.689 -45.179)"><path d="m100.09 88.093-6.259-9.7729-10.235 5.4701 3.7384-10.987-10.658-4.5917 10.921-3.9274-3.0554-11.196 9.8795 6.0894 6.8483-9.3694 1.3988 11.521 11.595-0.48748-8.1351 8.2767 7.6106 8.7615-11.543-1.1998z" fill="#ff0808"/><text x="83.593781" y="83.789787" fill="#000000" font-family="'CMU Serif'" font-size="12.7px" letter-spacing="0px" stroke-width=".26458" text-align="end" text-anchor="end" word-spacing="0px" style="line-height:1.25" xml:space="preserve"><tspan x="83.593781" y="83.789787" font-size="3.8806px" stroke-width=".26458" text-align="end" text-anchor="end">This is a test: $\sum _{k = 0}^\infty2^{-k} = 2$</tspan></text></g></svg>\end {filecontents}\documentclass {article}\usepackage [inkscapearea=page]{svg}\usepackage {svg-extract}\usepackage{svg-extract}\svgxsetbox[lastpage=1]{./svg-inkscape/drawing_svg-tex.pdf}\usepackage{xr}\externaldocument{test}\begin{document}\pagestyle{empty}\svgxoutputbox%\end{document}
All the macros from the original file's preamble are followed by a space. This is not a problem for most macros, but it is in the case of \end {filecontents}.
As a workaround, the filecontents environment can be moved inside the document environment to avoid it being copied to the extraction file (or a different extractpreamble can be used).
The text was updated successfully, but these errors were encountered:
Thanks for the report and the provided workaround. I probably have to adapt the catcodes when grabbing the preamble of the main document. I will have some time in June, so that I can work on a new version addressing all the open issues.
for defining 1st, 2nd, till 4th order tensors with underline notation in math mode (this notation is also used in some of the svg images). The problem is that this notation gets converted into:
the added whitespace before the @ symbol causes this to error out. If I remove these, it runs fine.
I'm not to great with latex, so currently I just manualy remove the whitespace, and then run the image.tex file. But a fix that prevents this from happening would be nice.
Compiling the MWE
results in the somewhat obscure error message
Looking at
1-drawing_svg-tex.tex
we can discover the problem.All the macros from the original file's preamble are followed by a space. This is not a problem for most macros, but it is in the case of
\end {filecontents}
.As a workaround, the
filecontents
environment can be moved inside thedocument
environment to avoid it being copied to the extraction file (or a differentextractpreamble
can be used).The text was updated successfully, but these errors were encountered: