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

Error in parsing SVG image : no more preview #21

Closed
deb75 opened this issue Nov 27, 2023 · 3 comments
Closed

Error in parsing SVG image : no more preview #21

deb75 opened this issue Nov 27, 2023 · 3 comments

Comments

@deb75
Copy link

deb75 commented Nov 27, 2023

emacs 29 / mingw64 / windows 11

It was working nicely since I reinstalled some components. The process is active and working but
nothing more shows up except a small white square. In the *Messages* buffer, each time I try to preview,
I get the following error report :

Error parsing SVG image: XML parse error: Error domain 1 code 4 on line 1 column 1 of data: Start tag expected, '<' not found [13 times]

It seems there are some errors in the produced svg. What can I do ?

Regards

@deb75
Copy link
Author

deb75 commented Nov 30, 2023

Solved. This was a deprecation warning with nodejs.

I changed :

(setq org-latex-impatient--process
        (make-process
         :name "org-latex-impatient"
         :buffer org-latex-impatient--output-buffer
         :command (append (list org-latex-impatient-tex2svg-bin
                                tex-string)
                          (when org-latex-impatient--is-inline
                            '("--inline")))

into

 (setq org-latex-impatient--process
        (make-process
         :name "org-latex-impatient"
         :buffer org-latex-impatient--output-buffer
         :command (append org-latex-impatient-tex2svg-bin
                          (list tex-string)
                          (when org-latex-impatient--is-inline
                            '("--inline")))

That is to say I changed org-latex-impatient-tex2svg-bin from a string to a list :

(defconst local/org-latex-impatient-tex2svg-bin (list "/path/to/node.exe" "--no-warnings" "/path/to/tex2svg"))

This means also that a previous check on this variable has to be adapted.

Could it be possible to update the repository with this change ?

Regards

@deb75 deb75 closed this as completed Nov 30, 2023
@yangsheng6810
Copy link
Owner

Thanks for all your efforts!
I will take a look this weekend. After a quick glance, I will probably add a customizable variable, e.g. org-latex-impatient-tex2svg-arguments.

@deb75
Copy link
Author

deb75 commented Dec 5, 2023

I appreciate.

Another reason to change is that on windows11 text2svg is not always recognized as an executable, unlike on linux. So, I initially had to change org-latex-impatient-tex2svg-bin from a string to a list with first element being the real executable (node.exe).

Regards

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

No branches or pull requests

2 participants