On Sat, May 01, 2021 at 02:29:17PM +0200, Ralf Hemmecke wrote:
> There are obviously already people using jfricas.
> I was asked for a feature to allow greek letters and other stuff.
> While it is easily possible to do this with UTF-8 encoding like
> 
> delta := "????"::Symbol
> 
> and show nicely in jfricas with FormatMathJax enabled.
> However, right-clicking on the output and exporting the expression as
> TeX, gives back a UTF-8 symbol. If you want to include that expression
> in a LaTeX document, then one must enable the right encoding. In my
> experience you need something like lualatex or xelatex to work reliably
> with 8bit characters.
> 
> So it makes sense to support LaTeX symbols in the MathJax output for
> jFriCAS. Currently the backslash is translated into {\backslash} and
> thus shows as a literal backslash in the output.
> 
> After this patch a symbol name that starts with \ is directly handed to
> the output unaltered so that it can be interpreted by MathJax.

That breaks normal rules: OutputForm is supposed to give equivalent
output for all formatters.  This proposal would create "LaTeX only"
OutputForm, which is quite undesirable.

Ideally, we would have single set of rules working for everywone.
ATM it seems that we need some compromises to provide desired
features.  However, this "direct LaTeX" way seem much less clean
than say recoding Greek letters as LaTeX escapes.  To say the
truth, in longer run teaching LaTeX to correctly handle Greek
letters seem more desirable.  In my case the following seem
to work:

\usepackage[utf8x]{inputenc}
\def\textalpha{\alpha}


After that unicode alpha in formula correctly appears in the
output.  Of course, that would have to be done for all
Greek math symbols.  I would expect some ready-made package
to handle this, but the above is easier than searching trough
tons of packages...

-- 
                              Waldek Hebisch

-- 
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/20210502022225.GA35406%40math.uni.wroc.pl.

Reply via email to