I took the pull request for a drive. Very promising, but maybe needs some work
or more evaluation.
https://github.com/PreTeXtBook/pretext/pull/2081
* Requires Python 3.8. PreTeXt is at 3.6, so this would be a change.
* PNG seem to double in file size? (Sample size = 2!) Tried using "exiftool"
to read compressions but no luck. Unless somebody has a good reason otherwise,
I'd use the highest compression possible (level 9?).
* SVG are smaller. Maybe too small? "tikz-venn-diagram" from the sample
article has three colored, overlapping disks. In the new SVG they are
translucent, I can see the background (B/W checkerboard in my "eog" viewer). So
the image really is different. Did not read the tikz to see which is correct.
The SVG is *much* simpler, and in particular is missing a huge encoded raster
image (I think) - not sure how that happens?
So enough evidence for me that certainly more careful evaluation is called for.
I'll merge the PR as long as we are very clear this is present for testing and
evaluation only and warn that it might go away. Developers using the
pretext/pretext script will need to "pip install" the module and edit (on a
branch) the flag being sent to "latex_image_conversion".
Thanks,
Rob
On 9/29/23 08:56, Alex Jordan wrote:
> pdf2svg is also a problem to get on an SE Linux system.
>
> I applied pymupdf to a PDF from one of my latex images, and saved the resulting
> svg. It looks good.
>
> Bonus points for Oscar if you can manipulate the resulting svg file, and insert
> a "desc" element whose contents is the image's "shortdescription".
>
>
> On Thu, Sep 28, 2023 at 8:14 PM Rob Beezer <
bee...@privacyport.com
> <mailto:
bee...@privacyport.com>> wrote:
>
> That is wild. But not much in the PyPi world surprises me anymore
>
> On September 28, 2023 11:29:41 AM PDT, Steven Clontz
> <
steven...@gmail.com <mailto:
steven...@gmail.com>> wrote:
> >
https://github.com/JelteF/PyLaTeX <
https://github.com/JelteF/PyLaTeX>
> >
> >But that's actually wild: you create an abstraction of your LaTeX document
> >in Python, which then outputs LaTeX code (and runs e.g. pdflatex on it if
> >you want).
> >
> >There's a few other Python/LaTeX libraries, but none seem to do what we
> >actually want: a simple abstraction that takes a string of LaTeX markup (or
> >a path to a file with LaTeX markup) and runs a LaTeX engine on it.
> >
> >
> >Steven Clontz
> >
https://clontz.org <
https://clontz.org> -
steven...@gmail.com
> <mailto:
steven...@gmail.com>
> >> > <
http://computerscience.chemeketa.edu/people/andrew-scholer/
> <mailto:
pretext-dev%2Bunsu...@googlegroups.com>
> >> > <mailto:
pretext-dev...@googlegroups.com
> <mailto:
pretext-dev%2Bunsu...@googlegroups.com>>.
>
https://groups.google.com/d/msgid/pretext-dev/915ddaf0-d4cc-4f54-8da7-ed2eecbd845en%40googlegroups.com?utm_medium=email&utm_source=footer <
https://groups.google.com/d/msgid/pretext-dev/915ddaf0-d4cc-4f54-8da7-ed2eecbd845en%40googlegroups.com?utm_medium=email&utm_source=footer>
> >> >.
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> Groups
> >> > "PreTeXt development" group.
> >> > To unsubscribe from this group and stop receiving emails from it, send
> >> an email
> >> > to
pretext-dev...@googlegroups.com
> <mailto:
pretext-dev%2Bunsu...@googlegroups.com>
> >> > <mailto:
pretext-dev...@googlegroups.com
> <mailto:
pretext-dev%2Bunsu...@googlegroups.com>>.
>
https://groups.google.com/d/msgid/pretext-dev/CACm44N-NP6z_Z394ymEXHZ8uaq%2B%3DnvecVNUffKm-Vhky1QYbaw%40mail.gmail.com?utm_medium=email&utm_source=footer <
https://groups.google.com/d/msgid/pretext-dev/CACm44N-NP6z_Z394ymEXHZ8uaq%2B%3DnvecVNUffKm-Vhky1QYbaw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> >> >.
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "PreTeXt development" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an
> >> email to
pretext-dev...@googlegroups.com
> <mailto:
pretext-dev%2Bunsu...@googlegroups.com>.
> >> To view this discussion on the web visit
> >>
>
https://groups.google.com/d/msgid/pretext-dev/MTAwMDAxOC5iZWV6ZXI.1695828034%40quikprotect <
https://groups.google.com/d/msgid/pretext-dev/MTAwMDAxOC5iZWV6ZXI.1695828034%40quikprotect>
> >> .
> >>
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
pretext-dev...@googlegroups.com
> <mailto:
pretext-dev%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/pretext-dev/MTAwMDAwMC5iZWV6ZXI.1695957288%40quikprotect <
https://groups.google.com/d/msgid/pretext-dev/MTAwMDAwMC5iZWV6ZXI.1695957288%40quikprotect>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to
pretext-dev...@googlegroups.com
> <mailto:
pretext-dev...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/pretext-dev/CA%2BR-jrf2SAGbpbEitc0zP1U9mKhxRgRiq_Ae4L9WL2N9%2BgfQ%3Dw%40mail.gmail.com <
https://groups.google.com/d/msgid/pretext-dev/CA%2BR-jrf2SAGbpbEitc0zP1U9mKhxRgRiq_Ae4L9WL2N9%2BgfQ%3Dw%40mail.gmail.com?utm_medium=email&utm_source=footer>.