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
I notice that when an svg is embedded. It is a vector graphic but all the text that was in the original is no longer selectable. (e.g. I cannot copy text from it). This inserts a clear distinction between typst raw output vs typst -> svg -> typst output. but mostly its a little inconvenient.
Use Case
For functional documents copy and paste reduces translation errors. This is part of the reason that embedding a svg/pdf is preferable to raster formats. Allowing text to be selectable from embedded vector graphics would make the svg embedding more useful.
Reacted by Karol Musur, Niklas Saari, Nicolai Weitkemper, Mahmoud Abdelkhalek, stormofice, Hugo , HK-SHAO, MrToWy, 方而静, drskoolie and 6 more
I agree that selectable text in embedded vector images would be nice, but if that is added it would be great to make that an opt-in/opt-out feature. Selectable text in a diagram with paragraphs wrapped around it would for example mess up the paragraph's text when trying to copy just that, so making some graphics like diagrams have non-selectable text, and other graphics like external tables have selectable text would be desirable, I think.
Reacted by Nicolai Weitkemper, Kreijstal, Adhalianna, Lukas, HK-SHAO, Bastien Voirin and Philipp Niedermayer
Unfortunately not, I've been wanting to work on this but it does take some effort and I haven't had the time. :/
No problem at all. Typst is already incredible as it is, and I'm very grateful for your work so far. This is more of a "nice-to-have" at the moment for me.
Happy to say that that text preservation has been implemented upstream, so the odds are good that we can have this in Typst as well by the next release.
Reacted by Mahmoud Abdelkhalek, Hans Christian Schmitz, stormofice, GamerBene19, Timo Bachmann, Alex L, Taylor Hillegeist, MrToWy, Jalin Wang and NickAc
During the latest release, this has eradicated the only simple way of producing unselectable text. @hcsch is right. There are instances where this functionality needs to be toggled off. Is there a plan to make it configurable? This will also address: #2249
Activity
hcsch commentedon May 17, 2023
I agree that selectable text in embedded vector images would be nice, but if that is added it would be great to make that an opt-in/opt-out feature. Selectable text in a diagram with paragraphs wrapped around it would for example mess up the paragraph's text when trying to copy just that, so making some graphics like diagrams have non-selectable text, and other graphics like external tables have selectable text would be desirable, I think.
mhdadk commentedon Jan 11, 2024
Is there any update on this? This would be a really useful feature to have.
LaurenzV commentedon Jan 24, 2024
Unfortunately not, I've been wanting to work on this but it does take some effort and I haven't had the time. :/
mhdadk commentedon Jan 24, 2024
No problem at all. Typst is already incredible as it is, and I'm very grateful for your work so far. This is more of a "nice-to-have" at the moment for me.
LaurenzV commentedon Mar 30, 2024
Happy to say that that text preservation has been implemented upstream, so the odds are good that we can have this in Typst as well by the next release.
taylorh140 commentedon May 17, 2024
Just checked if this has changed in 0.11.1?
Keep open.
laurmaedje commentedon May 17, 2024
Yeah, 0.11.1 was just a patch release. This will be part of the next proper release, 0.12.
LaurenzV commentedon Jun 6, 2024
Works on main now. :)
utdelsec commentedon Nov 7, 2024
During the latest release, this has eradicated the only simple way of producing unselectable text. @hcsch is right. There are instances where this functionality needs to be toggled off. Is there a plan to make it configurable? This will also address: #2249
LaurenzV commentedon Nov 7, 2024
I opened a PR: #5390
Although keep in mind that this doesn't solve #2249, because architecturally speaking SVG text and normal text are handled completely separately.