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: Thu, 27 Mar 2014 08:42:08 -0400

On 27 March 2014 05:27, François Poulain <address@hidden> wrote:
> ...
> Using utf8 is probably a good idea.
>
>> 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.
>
> Most of the doc is in Help -> Interfacing.

Yes. :( Unfortunately unicode does not seem to be mentioned anywhere there.

>
> If I correctly understand the code and your needs (I didn't have
> tested anything and fricas is not packaged in debian...), I guess you
> simply have to call (cork->utf8 arg) from fricas-send-identifier.
>

Yes, I can do this. In fact TeXmacs apparently already does this when
math symbols are embedded inside a text-mode input.  I am not sure
where in the code this happens. It is not in anything I wrote.  What I
wrore only seesm to affect the output if the entire input is in math
mode.

But my problem is how to ensure that TeXmacs converts the utf-8
characters in scheme: output format generated by FirCAS into math
symbols inside TeXmacs.  The examples in the documentation only
consider the case of latex: format which FriCAS no longer uses for the
TeXmacs interface.  FriCAS now interfaces directly with TeXmacs
without any intermediate conversion program in the pipe.

In experiments I found that TeXmacs does sometimes recognize and
convert utf-8 characters to the Cork form but it seems this happens
only is parts of the scheme markup that is supposed to be interpreted
as literal text and for example the result for char(945) is shown
literally as <alpha> in TeXmacs - not the Greek symbol alpha. In other
cases.  This is not desirable.  In other cases char(945) results in
two unexpected non-ascii characters which seem related to the internal
utf-8 encoding so that TeXmacs has not performed the conversion.
Again, I do not know where this happens in the TeXmacs source code.
It is not something that I do in the code.



reply via email to

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