texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] Adding TeXmacs symbols to FriCAS math-mode input


From: Bill Page
Subject: Re: [Texmacs-dev] Adding TeXmacs symbols to FriCAS math-mode input
Date: Wed, 26 Mar 2014 22:13:55 -0400

On 26 March 2014 06:08, François Poulain <address@hidden> wrote:
> Hi Bill,
>
> Le Mon, 24 Mar 2014 11:40:06 -0400,
> Bill Page <address@hidden> a écrit :
>
>> The following patch is based on similar coding in mupad-input.scm  It
>> encodes all TeXmacs symbols as FriCAS identifiers by introducing
>> escapes in FriCAS symbol names in such a way
>
> Thank you very much for this patch. However, I am not a FriCAS user and
> I am not sure how to properly test the new behavior before commiting it.
>

No problem.  At this point I would consider more for discussion rather
than commit.  I was hoping to find a few FriCAS or Axiom users here
with opinions about how best this should be done.  I have also
submitted it to the FriCAS list and so far I received one comment
which encouraged me to test some cases for which the current patch
fails.  So it should be considered as work-in-progress.

> Is it possible for you to provide a small "test suite" with this patch?
> A TeXmacs document with a Fricas session showing the improved behavior
> should be sufficient.
>

Yes I will do this.  The main goal is for both FriCAS input and output
to be able to support the full (or at least a large subset) of TeXmacs
math symbols.  Things get a little more complicated if we want to
extend this support to include math mode symbols in text strings, etc.
 That is where the current patch fails since TeXmacs symbols are
encoded as escaped multi-character identifiers (the Cork names for the
math symbols). so for example indexing into a string containing such
"characters" produces somewhat unexpected results.

Since FriCAS supports the unicode character set, one solution to this
problem would be to encode TeXmacs symbols as unicode utf-8
characters.  This would necessitate converting TeXmacs internal form
to utf-8 before sending it to FriCAS and then re-coding the result
back to TeXmacs internal form for display.  Already it seems that
TeXmacs some attempts to do this but the translation seems to depend
on the context in a way that I do not understand.  So far I have been
unable to find any documentation of how  the TeXmacs session interface
is intended to work in the case of math-mode symbols and unicode.  By
searching through the source code and by experimentation I have found
that there are some internal routines in TeXmacs that are intended to
perform such translations for example in the case of converting to and
from LaTeX.  Some how and in some cases these translations also seem
to be performed during session input and output.  But so far I have
not been able to produce a patch to the FriCAS scheme interface code
and/or to FriCAS itself which takes complete advantage of this.  Any
help or references anyone can give me would be greatly appreciated.

Regards,
Bill Page.



reply via email to

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