On 03/19/2017 11:11 PM, Kurt Pagani wrote: > I'm still experimenting. Unfortunately pandoc cannot handle several essential > constructs like \newenvironment, \def etc., > so it's no wonder you can't see much in the generated rst file :( > As I remarked earlier we have to create a new style file for rst output > (replacing fricas.sty by fricasrst.sty for example).
I'm sure that I'll be able to produce something that is not so complicated. Perhaps that requires some simple transformations in the .tex input where I have used tricks with \catcode. As far as I remember, that all lives in \spad... commands. And parsing arguments of those commands should be easy. > Also see: https://github.com/jgm/pandoc/issues/987 Oh, having no \newenvironment is probably bad for pandoc, but I don't think, it is too restricting for our purpose. > Here's a sample what I got so far ... poor, yet I'm still confident :) > https://github.com/nilqed/fricas_input/blob/master/htex2rst/tex/book.rst That's pretty amazing already. You're much farther then I am. Interestingly, you even must have replaced https://github.com/hemmecke/fricas/blob/mathjax/src/doc/htex2input.awk#L6 print ")set output tex on" by print ")set output mathjax on" Anyway, maybe it makes sense to (re)write the filter spool2tex.awk so that it replaces all non-standard environments/commands by something that pandoc understands. That should be much easier than parsing all of LaTeX or tweaking pandoc. My problem with doing this is that I don't yet have a clear idea what kind of LaTex I should actually generate so that the pandoc transformation into .rst then yields something that sphinx then puts into a nice html. I'm not even sure whether as the first iteration it would be more appropriate to use pandoc directly to go to HTML. Ralf PS: Kurt, can you send me the command line (or all the commands that you've used to produce https://github.com/nilqed/fricas_input/blob/master/htex2rst/tex/book.rst? Or was this mostly manual trial and error? -- 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 fricas-devel+unsubscr...@googlegroups.com. To post to this group, send email to fricas-devel@googlegroups.com. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.