\usepackage{svg} does not work on own instance #42

Open
opened 2025-03-11 22:58:40 +01:00 by Benjamin_Loison · 17 comments

LaTeX Error: File `svg.sty' not found.

on https://overleaf.lemnoslife.com.

Related to #30 and #5.

Menu > Settings > Compiler does not seem to help as far as I tested with LaTeX in addition to default pdfLaTeX.

I guess that need to use another Docker image or modify current one.

> LaTeX Error: File `svg.sty' not found. on https://overleaf.lemnoslife.com. Related to #30 and #5. *Menu* > *Settings* > *Compiler* does not seem to help as far as I tested with *LaTeX* in addition to default *pdfLaTeX*. I guess that need to use another Docker image or modify current one.
Author
Owner

https://plmlatex.math.cnrs.fr wants directly svg-inkscape/ content it seems, maybe there is a $LaTeX option when \usepackage or \includesvg if I remember correctly.

https://plmlatex.math.cnrs.fr wants directly `svg-inkscape/` content it seems, maybe there is a $LaTeX option when `\usepackage` or `\includesvg` if I remember correctly.
Author
Owner

DuckDuckGo search svg-inkscape includesvg LaTeX.

DuckDuckGo search *svg-inkscape includesvg LaTeX*.
Author
Owner

--shell-escape

Source: the Tex Stack Exchange answer 74693

`--shell-escape` Source: [the Tex Stack Exchange answer 74693](https://tex.stackexchange.com/a/74693)
Author
Owner

It works out of the box on https://www.overleaf.com.

It works out of the box on https://www.overleaf.com.
Author
Owner
https://fr.wikipedia.org/wiki/Fichier:Logo_de_la_présidence_de_la_République_(2018).svg
Author
Owner

Screenshot from 2025-03-11 23-13-41.png

![Screenshot from 2025-03-11 23-13-41.png](/attachments/5296dfb8-dd4f-42a7-b8d5-c58b13f00612)
Author
Owner
Tracked at:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdAIc1f5PS0BVni1LbHzNZP5C0dOoYrZfZPdPGt7b4p9A4w
DyUdBVll0b7Wlh/uLxGMibjgtwAG66soTVM3Lh7q2ZWg91BJTlVbnqRnKpL/j3CZ
0oUBweHF8MxAhCNBK82zAvFL+nA3cZkPDuf9FpZfENezGAcyLULOrQ+YuSIKArQ9
4IKq+4mhcjf1VE3AxfM2LNsuxKeG8w2e5bdAFrkGXoHk1XiIMWT8M9jtujbsJayJ
G70mzgC6hmkVIBAJK5XZRk60D+rEfm+5bm+Rbg3CQRYN4aJgsny/
=jpUk
-----END PGP MESSAGE-----
<details> <summary>Tracked at:</summary> ``` -----BEGIN PGP MESSAGE----- hF4DTQa9Wom5MBgSAQdAIc1f5PS0BVni1LbHzNZP5C0dOoYrZfZPdPGt7b4p9A4w DyUdBVll0b7Wlh/uLxGMibjgtwAG66soTVM3Lh7q2ZWg91BJTlVbnqRnKpL/j3CZ 0oUBweHF8MxAhCNBK82zAvFL+nA3cZkPDuf9FpZfENezGAcyLULOrQ+YuSIKArQ9 4IKq+4mhcjf1VE3AxfM2LNsuxKeG8w2e5bdAFrkGXoHk1XiIMWT8M9jtujbsJayJ G70mzgC6hmkVIBAJK5XZRk60D+rEfm+5bm+Rbg3CQRYN4aJgsny/ =jpUk -----END PGP MESSAGE----- ``` </details>
Author
Owner

Screenshot from 2025-03-12 00-32-59.png

inkscapelatex=false (source: the Tex Stack Exchange answer 437498) does not seem helpful here but helps locally with other .svgs to not have distorted text once included in \LaTeX.

![Screenshot from 2025-03-12 00-32-59.png](/attachments/e3162728-7b02-4080-bdab-1394a0d248c6) `inkscapelatex=false` (source: [the Tex Stack Exchange answer 437498](https://tex.stackexchange.com/a/437498)) does not seem helpful here but helps locally with other `.svg`s to not have distorted text once included in $\LaTeX$.
Author
Owner
Related to [Benjamin-Loison/latex2e/issues/24](https://github.com/Benjamin-Loison/latex2e/issues/24).
Author
Owner

Maybe PLMLaTeX SVG never worked.

Maybe PLMLaTeX SVG never worked.
Author
Owner

For CENSORED.svg:

ls CENSORED_svg-*
Output:
CENSORED_svg-raw.pdf
CENSORED_svg-tex.pdf
CENSORED_svg-tex.pdf_tex

are all of these actually necessary?

Being able to generate the needed one without having to compile a .tex would help.

Note that may have to consider a .svg with text.

For `CENSORED.svg`: ```bash ls CENSORED_svg-* ``` <details> <summary>Output:</summary> ``` CENSORED_svg-raw.pdf CENSORED_svg-tex.pdf CENSORED_svg-tex.pdf_tex ``` </details> are all of these actually necessary? Being able to generate the needed one without having to compile a `.tex` would help. Note that may have to consider a `.svg` with text.
Author
Owner

https://plmlatex.math.cnrs.fr complains about missing CENSORED_svg-raw.pdf. So let us provide it as it is not biased it seems that way.

https://plmlatex.math.cnrs.fr complains about missing `CENSORED_svg-raw.pdf`. So let us provide it as it is not biased it seems that way.
Author
Owner

For another .svg I only have _svg-raw.pdf generated and it works fine on https://plmlatex.math.cnrs.fr and I can select the figure text.

For another `.svg` I only have `_svg-raw.pdf` generated and it works fine on https://plmlatex.math.cnrs.fr and I can select the figure text.
Author
Owner

DuckDuckGo search Linux SVG to PDF.

Should ensure that can still select the PDF text.

DuckDuckGo search *Linux SVG to PDF*. Should ensure that can still select the PDF text.
Author
Owner
rsvg-convert -f pdf -o CENSORED.pdf CENSORED.svg
Output:
Command 'rsvg-convert' not found, but can be installed with:
sudo apt install librsvg2-bin

Source: the Super User answer 381128

on my Debian 12 GNOME laptop.

```bash rsvg-convert -f pdf -o CENSORED.pdf CENSORED.svg ``` <details> <summary>Output:</summary> ``` Command 'rsvg-convert' not found, but can be installed with: sudo apt install librsvg2-bin ``` </details> Source: [the Super User answer 381128](https://superuser.com/a/381128) on my Debian 12 GNOME laptop.
Author
Owner
sudo apt install -y librsvg2-bin
Output:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  librsvg2-bin
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 1,584 kB of archives.
After this operation, 5,758 kB of additional disk space will be used.
Get:1 http://ftp.fr.debian.org/debian bookworm/main amd64 librsvg2-bin amd64 2.54.7+dfsg-1~deb12u1 [1,584 kB]
Fetched 1,584 kB in 0s (3,240 kB/s)    
cannot stat initial working directory for /home/benjamin_loison/Desktop/bens_folder/thesis/ssd/prnu_extraction: Permission denied at /usr/sbin/dpkg-preconfigure line 73.
cannot stat initial working directory for /home/benjamin_loison/Desktop/bens_folder/thesis/ssd/prnu_extraction: Permission denied at /usr/sbin/dpkg-preconfigure line 159.
Selecting previously unselected package librsvg2-bin.
(Reading database ... 456372 files and directories currently installed.)
Preparing to unpack .../librsvg2-bin_2.54.7+dfsg-1~deb12u1_amd64.deb ...
Unpacking librsvg2-bin (2.54.7+dfsg-1~deb12u1) ...
Setting up librsvg2-bin (2.54.7+dfsg-1~deb12u1) ...
Processing triggers for man-db (2.11.2-2) ...
Scanning processes...                                                           
Scanning processor microcode...                                                 
Scanning linux images...                                                        

Running kernel seems to be up-to-date.

The processor microcode seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.

Text is still selectable.

rsvg-convert -f pdf -o CENSORED.pdf CENSORED.svg

does not return anything.

svg-inkscape/ and above method results in visually identical PDFs.

Related to Benjamin_Loison/pdf/issues/13.

```bash sudo apt install -y librsvg2-bin ``` <details> <summary>Output:</summary> ``` Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: librsvg2-bin 0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded. Need to get 1,584 kB of archives. After this operation, 5,758 kB of additional disk space will be used. Get:1 http://ftp.fr.debian.org/debian bookworm/main amd64 librsvg2-bin amd64 2.54.7+dfsg-1~deb12u1 [1,584 kB] Fetched 1,584 kB in 0s (3,240 kB/s) cannot stat initial working directory for /home/benjamin_loison/Desktop/bens_folder/thesis/ssd/prnu_extraction: Permission denied at /usr/sbin/dpkg-preconfigure line 73. cannot stat initial working directory for /home/benjamin_loison/Desktop/bens_folder/thesis/ssd/prnu_extraction: Permission denied at /usr/sbin/dpkg-preconfigure line 159. Selecting previously unselected package librsvg2-bin. (Reading database ... 456372 files and directories currently installed.) Preparing to unpack .../librsvg2-bin_2.54.7+dfsg-1~deb12u1_amd64.deb ... Unpacking librsvg2-bin (2.54.7+dfsg-1~deb12u1) ... Setting up librsvg2-bin (2.54.7+dfsg-1~deb12u1) ... Processing triggers for man-db (2.11.2-2) ... Scanning processes... Scanning processor microcode... Scanning linux images... Running kernel seems to be up-to-date. The processor microcode seems to be up-to-date. No services need to be restarted. No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host. ``` </details> Text is still selectable. ```bash rsvg-convert -f pdf -o CENSORED.pdf CENSORED.svg ``` does not return anything. `svg-inkscape/` and above method results in visually identical PDFs. Related to [Benjamin_Loison/pdf/issues/13](https://codeberg.org/Benjamin_Loison/pdf/issues/13).
Author
Owner
Related to [Benjamin_Loison/matplotlib/issues/33](https://codeberg.org/Benjamin_Loison/matplotlib/issues/33).
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Benjamin_Loison/overleaf#42
No description provided.