texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] graph editor


From: Massimiliano Gubinelli
Subject: Re: [Texmacs-dev] graph editor
Date: Tue, 18 May 2021 08:02:12 +0200

Hi Joris,

On 17. May 2021, at 18:06, TeXmacs <texmacs@lix.polytechnique.fr> wrote:

Hi Max,

On Mon, May 17, 2021 at 11:33:07AM +0200, Massimiliano Gubinelli wrote:
Dear all,
in the forum there is a question about a more friendly interface to the plot editor ("!" in the graph more). Currently one can define functions but only in scheme syntax which is not very user-friendly.

We should devise a better interface. I'm not sure what plans Joris has for this but it would be a nice project to create a dialog where functions can be inserted via standard TeXmacs math commands. Since TeXmacs has already a parser for math (used for semantic checking) maybe it would be possible to extract a syntax tree (with correct precedence rules) and generate a corresponding scheme function.

Joris, any idea/suggestions?

The question is whether TeXmacs would really be in its role here.
This could be considered to be the job of plug-ins.


It could. But then the question become if we want to provide a unified mechanism to parse mathematical formulas, e.g. from the TeXmacs format to an abstract form which could then used to create _expression_ in some target language  (scheme, mathemagix, Python, etc...) for evaluation.

We still lack a generic mechanism to parse our mathematical formulas for various uses. For example we could use it to generate MathML (I do not think is already the case) or LaTeX, for what it is worth. 

This is only part of the subject.  It makes sense to have the parsing part
inside TeXmacs.  What to do with it, computationally speaking, is another matter.


I had in mind the use-case I mention above. This would allow to write programs using proper mathematical markup. 

In fact, we already _do_ have the parsing part; this is precisely what
std-symbols.scm and std-math.scm are about.  Another question is what
we could do with the parsed formulas.  We might generate content MathML
in addition to presentation MathML.  I don't understand why you mention LaTeX
in this context; it even does not support clean presentation markup.


Thanks, I will give a look to the parsing support. I looked already in the C++ code but I do not understand how to extract a syntax tree from the parsing execution, it seems that it returns only whether the formula can be parsed.

Ignore the mention to LaTeX, it does indeed do not make sense in this context.

Yet another issue concerns the semantics of symbols/formulas.
In different areas, the semantics may differ,
so not everybody will necessarily agree with our decisions.


I think the common need for plugins is to take a TeXmacs document which represent a mathematical _expression_ and extract some AST e.g. a scheme tree, then a plugin can process this tree to target the final language.


Best
Max



Best wishes, --Joris

_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/texmacs-dev


reply via email to

[Prev in Thread] Current Thread [Next in Thread]