If I just look at the output of a particular type, then your patch seems to produce a reasonable OutputForm value, see below.

Format1D translates this into reasonable output.

Actually also FormatMathJax and FormatLaTeX look reasonable. There is only one little problem. The innermost type is not considered as an operator and therefore printed as if it were a variable. Well, it was my design decision to print operators in a different way then arguments. Probably questionable, but in line with how for example
\gcd(x,y) is printed in LaTeX.

Additionally, since the OutputForm of a type is indistinguishable from

That said, and with the background that without that patch the other formatters would not be able to print the type, I am much in favour of this patch.

Looking at the BOOT code makes me wish for a testsuite that lists domains/categories and there expected output. It is somewhat clear for the common cases, but you add double quotes for strings and I would like to see a type where this piece of code is used, so that I can check the other formatters.

Additionally, I am not so happy with the explicit appearance of "->" when translating the Mapping type. I somehow think that -> should become a special treatment like zag or slash or ...

Ralf



%%% (186) ->
   (186)
   XHashTable
      Matrix(Integer)
  ,
      Record
         fmats:
           Record
              fcusp:Cusp
          ,
              fgamma:Matrix(Integer)
          ,
              fred:Matrix(Integer)
          ,
              ftriang:Matrix(Integer)
     ,
         fex:QEtaLaurentSeries(Fraction(Integer))
--FORMAT:BEG:Format1D
XHashTable(Matrix(Integer), Record(fmats:Record(fcusp:Cusp, fgamma:Matrix(Integer), fred:Matrix(Integer), ftriang:Matrix(Integer)), fex:QEtaLaurentSeries(Fraction(Integer))))
--FORMAT:END:Format1D
--FORMAT:BEG:FormatMathJax
\[
\operatorname{XHashTable}\left(\operatorname{Matrix}\left(Integer\right), \operatorname{Record}\left(fmats\texttt{:}\operatorname{Record}\left(fcusp\texttt{:}Cusp, fgamma\texttt{:}\operatorname{Matrix}\left(Integer\right), fred\texttt{:}\operatorname{Matrix}\left(Integer\right), ftriang\texttt{:}\operatorname{Matrix}\left(Integer\right)\right), fex\texttt{:}\operatorname{QEtaLaurentSeries}\left(\operatorname{Fraction}\left(Integer\right)\right)\right)\right)
\]
--FORMAT:END:FormatMathJax
--FORMAT:BEG:FormatLaTeX
\begin{fricasmath}{186}
\FUN{XHashTable}\PAREN{\FUN{Matrix}\PAREN{\SYMBOL{Integer}}, \FUN{Record}\PAREN{\SYMBOL{fmats}\STRING{:}\FUN{Record}\PAREN{\SYMBOL{fcusp}\STRING{:}\SYMBOL{Cusp}, \SYMBOL{fgamma}\STRING{:}\FUN{Matrix}\PAREN{\SYMBOL{Integer}}, \SYMBOL{fred}\STRING{:}\FUN{Matrix}\PAREN{\SYMBOL{Integer}}, \SYMBOL{ftriang}\STRING{:}\FUN{Matrix}\PAREN{\SYMBOL{Integer}}}, \SYMBOL{fex}\STRING{:}\FUN{QEtaLaurentSeries}\PAREN{\FUN{Fraction}\PAREN{\SYMBOL{Integer}}}}}
\end{fricasmath}
--FORMAT:END:FormatLaTeX

--
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 on the web visit 
https://groups.google.com/d/msgid/fricas-devel/32c1bf98-99a0-4c0b-b8aa-982a8026870f%40hemmecke.org.

Reply via email to