On 02.05.2021 17:29, Bill Page wrote:
> Ralf's proposed patch for FormatMathJax allows much more than just support of
> Unicode-like symbols. There are many cases when one might want to use a small
> but otherwise arbitrary LaTeX fragment as a more sophisticated way to 
> represent
> some symbol. 

++1

In my view it's simpy great. For example, one can (deliberately!) write
a:="\alpha"::Symbol or hb := "\hbar"::Symbol::EXPR INT, then 'a', 'hb' will be
rendered as 𝛼,ℏ as soon as we set

  setPrettySymbols! true

It does no harm to OutputForm at all; moreover, one is not urged to use special
identifiers (like alpha, %alpha, ...) and, last but not least, it works for
BasicOperator as well :)



> 
> On Sun, May 2, 2021 at 10:00 AM Ralf Hemmecke <[email protected]
> <mailto:[email protected]>> wrote:
> 
>     Waldek,
> 
>     Your message was not clear whether or not you want me to commit this to
>     FriCAS.
> 
>     On 02.05.21 04:22, Waldek Hebisch wrote:
>     > That breaks normal rules:
> 
>     Sorry, I haven't seen any documented rules about this.
> 
>     > OutputForm is supposed to give equivalent
>     > output for all formatters.
> 
>     You've just made this up, right? What is the definition of "equivalent"?
>     Is 𝛿 and \delta equivalent?
> 
>     > This proposal would create "LaTeX only"
>     > OutputForm, which is quite undesirable.
> 
>     Wrong. It never touches anything in OutputForm, only in FormatMathJax.
>     And most importantly it doesn't break anything since a user must switch
>     this feature on to work.
> 
>     > Ideally, we would have single set of rules working for everywone.
> 
>     Ideally Unicode was invented 100 years ago and OutputForm would not have
>     been primarily written to deal with the output of 2D-ASCII math.
> 
>     > ATM it seems that we need some compromises to provide desired
>     > features.
> 
>     Yes, that is why I wrote this extension.
> 
>     > 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}
> 
>     Of course, the usual "works for me" is not convincing.
> 
>     I took some characters from
>     
> https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode
>     
> <https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode>
> 
>     Works fine in FriCAS
> 
>     (1) -> delta := "𝛿"::Symbol; NN := "𝓝"::Symbol; DD:="𝔻"::Symbol;Symbol;
>                                         Type: Symbol
>     (2) -> sin(DD+delta+NN)
> 
>        (2)  sin(𝛿 + 𝔻 + 𝓝)
>                                         Type: Expression(Integer)
> 
>     and works perfectly in jFriCAS.
>     When I copy the output form the Jupyter notebook, it gives me
> 
>     \sin\left(𝛿+𝔻+𝓝\right)
> 
>     which is fine for lualatex, but not for pdflatex neither with utf8 nor
>     utf8x. See attached LaTeX file.
> 
>     pdflatex -interaction=nonstopmode foo.tex
> 
>     The utf8x package builds on the ucs package and a quick search reveals
>     that this is incompatible with biblatex.
>     Search ucs in the documentation of https://www.ctan.org/pkg/biblatex
>     <https://www.ctan.org/pkg/biblatex> .)
>     I wouldn't want to sacrifice biblatex just for having a delta in FriCAS
>     output.
> 
>     As you can see in the attachement your
>     \def\textdelta{\delta}
>     only helps partially.
> 
>     I don't know why it would be such a bad idea to make the life of our
>     users easy.
>     Furthermore, I am happy to remove that stuff from FormatMathJax, if we
>     enter an ideal world and everyone is using a unicode-aware LaTeX.
> 
>     Ralf
> 
>     -- 
>     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]
>     <mailto:fricas-devel%[email protected]>.
>     To view this discussion on the web visit
>     
> https://groups.google.com/d/msgid/fricas-devel/daeb853d-5874-03e2-d2b7-17e5c1e9418b%40hemmecke.org
>     
> <https://groups.google.com/d/msgid/fricas-devel/daeb853d-5874-03e2-d2b7-17e5c1e9418b%40hemmecke.org>.
> 
> -- 
> 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]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/fricas-devel/CAC6x94QpFrbjC%3DGfSrZvPEwg1Awi2%2BnA0awktz9wSqAAUeT-PA%40mail.gmail.com
> <https://groups.google.com/d/msgid/fricas-devel/CAC6x94QpFrbjC%3DGfSrZvPEwg1Awi2%2BnA0awktz9wSqAAUeT-PA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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/f4653245-7ac9-749b-be44-1c07a76d60c0%40gmail.com.

Reply via email to