Hello,

Le mer. 11 juin 2025 à 20:59, 'Ralf Hemmecke' via FriCAS - computer
algebra system <[email protected]> a écrit :
>
> Hi Waldek,
>
> as you know, I would like to let HyperDoc die.
> But, maybe that sound too extreme for what I actually mean.
> And I agree to some extend to your plan for a new hyperdoc.
>
> Let me explain my wishes.
>
> FriCAS should have an interface (in LISP or SPAD) that let's
> SPAD or external programs get information about
> categories/domains/packages/documentation.
>  From such an interface it should be easy to generate any output format
> be it html, rst or pdf.

+1

For what I am interested in right now, is displaying '++'
documentation in text form, and. readable directly in the interpreter
console.
>From what I have read in api.spad and api2.spad the implementations
are tightly related the reST and HTML formats and I would like
plain/text format also. I do not want to use a Regex style replacement
method as it requires Julia or cl-ppcre and/or, for my concern,
cl-ppcre-unicode. Looking at api2 for example there is code to return
TexTree as a SEX expression. There is a TeXTree to HTML converter
which outputs the conversion in a file, no routine from what I have
seen that converts it to a String. I will eventually code something in
this regard. Maybe Waldek, you have already done this privately?
Having a generic parser would be a very good idea, I think. Gathering
the two parser implementations.


    jlDocumentation(op) ==
      ops := getDatabase("o")$OperationsQuery
      docs := elt(ops,equation('name, op)$QueryEquation)
      elts : DataList(String) := elt(docs,'doc)
      for i in 1 .. #elts repeat
        output((elts.i)::OutputForm)$OutputPackage
         -- PPRINT(jlEvalString(concat(["replace(raw_"",

  "\spad{svd(m)} computes the singular value decomposition \spad{SVD} of \spad{
  m} such that \spad{SVD}.\spad{U} * diagonalMatrix(\spad{sv}) * \spad{SVD}.\sp
  ad{Vt} = \spad{m}."
  "\spad{svd(m)} computes the singular value decomposition \spad{SVD} of \spad{
  m} such that \spad{SVD}.\spad{U} * diagonalMatrix(\spad{sv}) * \spad{SVD}.\sp
  ad{Vt} = \spad{m}."
  "\spad{svd(m)} computes the singular value decomposition \spad{SVD} of \spad{
  m} such that \spad{SVD}.\spad{U} * diagonalMatrix(\spad{sv}) * \spad{SVD}.\sp
  ad{Vt} = \spad{m}."
  "\spad{svd(m)} computes the singular value decomposition \spad{SVD} of \spad{
  m} such that \spad{SVD}.\spad{U} * diagonalMatrix(\spad{sv}) * \spad{SVD}.\sp
  ad{Vt} = \spad{m}."
  "\spad{svd(m)} computes the singular value decomposition of the matrix \spad{
  m}."
                                                                   Type: Void

And regexing/replacing, completely irrelevant for me, some Tex-like
construct I would like to obtain something like:
(25) -> jlDocumentation "svd"

"svd(m) computes the singular value decomposition SVD of m such that
SVD.U * diagonalMatrix(sv) * SVD.Vt = m."
"svd(m) computes the singular value decomposition SVD of m such that
SVD.U * diagonalMatrix(sv) * SVD.Vt = m."
"svd(m) computes the singular value decomposition SVD of m such that
SVD.U * diagonalMatrix(sv) * SVD.Vt = m."
"svd(m) computes the singular value decomposition SVD of m such that
SVD.U * diagonalMatrix(sv) * SVD.Vt = m."
"svd(m) computes the singular value decomposition of the matrix m."
                                                               Type:
Void

or:

(26) -> jlDocumentation "string"

"string(f) gives string corresponding to f. Valid only when string?(f) is true"
"string(i) returns the decimal representation of i as a string."
"string(s) returns s as an element of Str. Error: if s is not an atom
that also belongs to Str."
"string(jt) returns the string representation of jt."
"string(x) stringifies x."
"string(s) converts the symbol s to a string. Error: if the symbol is
subscripted."

(27) -> jlDocumentation "str"
                                                                   Type: Void

But with more information (conditional exports, origins etc.)  and
more options. Probably as a system command?
)display doc string as an example.

Just my two cents.

- Greg

-- 
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/CAHnU2dY5SH52A0U56a8kSqSBO%2BFX0Lzsq%3Dw6hzBCfcuBd20m8Q%40mail.gmail.com.

Reply via email to