On 03/14/2017 11:50 PM, Kurt Pagani wrote: > You're right. The first idea was to reuse ht.awk to rst.awk by transforming > the > print lines. Using .tex also seems easier to me (than comprehending htex).
Well, comprehending htex is easy. If I remember correctly, I've made it a subset of LaTeX. This however requires a few tricks that are hidden in fricas.sty. What I see from the Makefile.in is that the .htex files will be transformed into .input files with the goal to spool them through fricas. So we have ${HTEX2INPUT} ug04.htex > tmp/ug04.input echo ")read tmp/ug04.input" | ${INTERPSYS} > tmp/ug04.spool ${SPOOL2TEX} tmp/ug04.spool > tmp/ug04.tex Now, HTEX2INPUT = ${AWK} -f ${srcdir}/htex2input.awk removes everything that is only relevant for .ht. It transforms the \xtc commands into true fricas commands and adds markup around it. All the remaining Text is prepended by "-- " and moved as is into the .input file. INTERPSYS evaluates the commands and (since it is spool) writes the output exactly after the respective input command. Now, SPOOL2TEX = ${AWK} -f ${srcdir}/spool2tex.awk basically has just to remove the "-- " again and the result is a LaTeX file. I believe that this LaTeX-file is simple enough to be used for the transformation into .rst. I'm not sure if perhaps PanDoc could do the main task, but there are some tricks with \catcode in fricas.sty that we probably have to deal with before we can hand over the files belonging to book.tex to PanDoc. Of course, PanDoc would mean a dependency on Haskell, but since that is only for the production of the book, I think it would be better than reinventing the wheel. That would be my strategy to keep the .htex files as "originals" and still have an up-to-date html-version of the book. > BTW: your branch compiled well with SBCL 1.3.0, however, using 1.3.15 stopped: > > Compiling FriCAS source code from file > /root/fricas/src/algebra/MATHJAX.spad using old system compiler. > MATHJAX abbreviates domain MathJaxFormat > > >> System error: > :ASCII stream decoding error on > #<SB-SYS:FD-STREAM for "file /root/fricas/src/algebra/MATHJAX.spad" > {1005FABD73}>: > > the octet sequence #(226) cannot be decoded. That looks as if there where a non-ASCII character in the file. Maybe Waldek or Qian know more details. I'm currently running with 1.3.0. Interestingly, for Ubuntu 17.04 there is still the problematic sbcl 1.3.3 listed. https://launchpad.net/ubuntu/zesty/+source/sbcl Isn't that bad for FriCAS? 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 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.