On 05/01/2026 22:10, Dima Pasechnik wrote:
On Mon, Jan 5, 2026 at 3:04 PM 'Ralf Hemmecke' via FriCAS - computer
algebra system <[email protected]> wrote:

On 1/4/26 22:06, Waldek Hebisch wrote:
I have now commited a TeX parser.

I guess for the restricted TeX macros that appear in docstrings, your
idea might work.

Bigger goal for TeX would be to produce HTML/XML version of
FriCAS Book.
That task is very ambitious, but should also be possible.
I just tried to use pandoc to translate the book to html. That does not
work, because some commands rely on the change of catcode to treat their
argument in a verbatim fashion and pandoc cannot deal with catcode changes.

If I remember correctly, mostly the commands starting with "\spad..."
are of this type. Maybe, piping all the .tex files through some filter
that adds necessary escape sequences to the argument text might produce
something that pandoc can handle. Nevertheless, I have no experience
with pandoc. Is there someone on the list who has? In particular, we
probably would like a nice-looking HTML.

Pandoc is quite extendable, it does have its own filter facility.
There is also latex+raw_tex mode (i.e. "pandoc -f latex+raw_tex"),
which, they say, allow catcode changes.



Ralf

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/f3f47792-0176-4e71-8611-943dc7e9c467%40hemmecke.org.


It might be simpler to convert the PDF file to HTML by using

  * https://pdf2htmlex.github.io/pdf2htmlEX/
  * https://github.com/pdf2htmlEX/pdf2htmlEX

It's also available via apt:

pdf2htmlex/now 0.0.18.8.rc1.master.bionic.20200630-0 amd64 [installed,local]
  Converts PDF to HTML without losing format

I did convert the book some months ago:

   https://nilqed.github.io/book.html

Zooming possible with +/- ...

Looks not bad, albeit the produced HTML is quite huge ...



--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/af8f64b7-7987-4ebc-9b10-a6bd7394d6f7%40gmail.com.

Reply via email to