On Sun, Apr 26, 2015 at 7:49 PM, Bill Page <[email protected]> wrote:
> On 26 April 2015 at 20:49, William Stein <[email protected]> wrote:
>> On Sun, Apr 26, 2015 at 5:40 PM, Bill Page <[email protected]> 
>> wrote:
>> ...
>>>  Is there a way to tell the worksheet to render code
>>> between $$ ... $$ as MathJax or have MathML markup rendered by
>>> the browser instead of being treated simply as text?
>>
>> You'll have to write a new mode called something like
>>
>> %fricas2
>>
>> say.  Then you can do pretty much anything.   I could explain, but I
>> don't have the time right now (I will later).
>>
>
> OK, thanks.  Any pointers to documentation of "modes" in the Sage
> worksheet would be fine too.

There's no documentation yet.  However, you might find this example
worksheet useful:

  
https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-04-26-211601-fricas.sagews

William

>
>> Can you provide a very simple example of input to provide to fricas to
>> get latex output, at least?
>>
>
> Sure. A worksheet cell with the contents
>
> %fricas
> )set output algebra off
> )set output tex on
> sqrt(2)
>
> currently displays following output
>
> $
> sqrt {2}
> leqno(10)
> $
>
> "algebra" is what FriCAS calls it's ascii output mode.  "tex" is
> actually the LaTeX mode (at least it is mostly LaTeX mod a few custom
> commands). The actual output generated by Fricas is
>
> $$
> \sqrt {2}
> \leqno(10)
> $$
>
> I do not know why the first character of each line is not shown in the
> worksheet.  Perhaps the current %fricas mode is trimming this first
> character?
>
> )set output tex off
> )set output mathml on
> sqrt(2)
>
> produces the following MathML code
>
> <math xmlns="http://www.w3.org/1998/Math/MathML"; mathsize="big" 
> display="block">
> <msqrt><mrow><mn>2</mn></mrow></msqrt>
> </math>
>
> Getting MathJax to process FriCAS's LaTeX dialect might require some
> extra work on the part of a new %fricas-latex mode, so I guess what I
> would like most is a mode such as
>
> %fricas-mml
>
> that allows me to inject FriCAS-generated MathML into the worksheet output.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-cloud" 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/sage-cloud/CAC6x94QmDAcDakv%3DAiqHzCmW%3DN_0QOnEx1mw2FkvfZRVKzqRSg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
William Stein
Founder/CEO of SageMath, Inc. (http://sagemath.com)
206-419-0925

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to