Beautiful Math for Pier

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Beautiful Math for Pier

espin
Hi all,
I just implemented a proof-of-concept extension for Pier: PRMath.
It uses MathJax, http://http://www.mathjax.org/, to display math formulae
with style: you can use [La]TeX syntax!

I created a squeak source project open to all to contribute at
  http://www.squeaksource.com/PRMath
and there are ToDo's for anybody (more knowledgeable than me) to contribute.

Just to give you an idea of what it is, I attach a snapshot of it in action.
Hope you like it and contribute (or even copy/enhance/fork/use/misuse...)
Bye
Enrico
PS: note that current PRMath implementation refers to MathJax
deployment, which is
_NOT_ polite, as explicitly written in MathJax site:
Please do not link to the copy of MathJax at www.mathjax.org, as we do not have
the resources to act as a web service for all the sites on the web
that would like to
display mathematics.

--
Enrico Spinielli
"Do Androids dream of electric sheep?"— Philip K. Dick
"Hear and forget; see and remember;do and understand."—Mitchel Resnick

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

beautiful math in Pier.png (53K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Beautiful Math for Pier

Lukas Renggli
Very cool plugin!

I am sure you know that there is a similar plugin that locally calls
LaTeX in the package Pier-Math in
http://source.lukas-renggli.ch/pieraddons/.

Lukas


On 1 November 2010 14:42, Enrico Spinielli
<[hidden email]> wrote:

> Hi all,
> I just implemented a proof-of-concept extension for Pier: PRMath.
> It uses MathJax, http://http://www.mathjax.org/, to display math formulae
> with style: you can use [La]TeX syntax!
>
> I created a squeak source project open to all to contribute at
>  http://www.squeaksource.com/PRMath
> and there are ToDo's for anybody (more knowledgeable than me) to contribute.
>
> Just to give you an idea of what it is, I attach a snapshot of it in action.
> Hope you like it and contribute (or even copy/enhance/fork/use/misuse...)
> Bye
> Enrico
> PS: note that current PRMath implementation refers to MathJax
> deployment, which is
> _NOT_ polite, as explicitly written in MathJax site:
> Please do not link to the copy of MathJax at www.mathjax.org, as we do not have
> the resources to act as a web service for all the sites on the web
> that would like to
> display mathematics.
>
> --
> Enrico Spinielli
> "Do Androids dream of electric sheep?"— Philip K. Dick
> "Hear and forget; see and remember;do and understand."—Mitchel Resnick
>
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Beautiful Math for Pier

Tudor Girba
Very cool indeed. How are you rendering the formulas (I did not look at the code yet)?

Cheers,
Doru


On 2 Nov 2010, at 10:06, Lukas Renggli wrote:

> Very cool plugin!
>
> I am sure you know that there is a similar plugin that locally calls
> LaTeX in the package Pier-Math in
> http://source.lukas-renggli.ch/pieraddons/.
>
> Lukas
>
>
> On 1 November 2010 14:42, Enrico Spinielli
> <[hidden email]> wrote:
>> Hi all,
>> I just implemented a proof-of-concept extension for Pier: PRMath.
>> It uses MathJax, http://http://www.mathjax.org/, to display math formulae
>> with style: you can use [La]TeX syntax!
>>
>> I created a squeak source project open to all to contribute at
>>  http://www.squeaksource.com/PRMath
>> and there are ToDo's for anybody (more knowledgeable than me) to contribute.
>>
>> Just to give you an idea of what it is, I attach a snapshot of it in action.
>> Hope you like it and contribute (or even copy/enhance/fork/use/misuse...)
>> Bye
>> Enrico
>> PS: note that current PRMath implementation refers to MathJax
>> deployment, which is
>> _NOT_ polite, as explicitly written in MathJax site:
>> Please do not link to the copy of MathJax at www.mathjax.org, as we do not have
>> the resources to act as a web service for all the sites on the web
>> that would like to
>> display mathematics.
>>
>> --
>> Enrico Spinielli
>> "Do Androids dream of electric sheep?"— Philip K. Dick
>> "Hear and forget; see and remember;do and understand."—Mitchel Resnick
>>
>> _______________________________________________
>> Magritte, Pier and Related Tools ...
>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki

--
www.tudorgirba.com

"We cannot reach the flow of things unless we let go."




_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Beautiful Math for Pier

espin
In reply to this post by Lukas Renggli
Hi Lukas,
PRMath does not require any LaTeX installation, all rendering is performed by MathJax
(written in Javascript...sponsored by American Mathematical Sociaty among aothers...)

The addon you mention probably allows to compile a (dvi/)pdf from a BOBook, I think,
while PRMath is just an exercise for myself to understand your post on "Extending the Pier
Parser" [1]...and with the following code it will integrate well (even if incompletely, i.e. lack
of \label{}) with BOLatexXYZZY

BOLatexWriter>>visitMath: anObject

        stream nextPutAll: anObject class markupBegin.
        stream nextPutAll: anObject text.
        stream nextPutAll: anObject class markupEnd.


Bye
Enrico


Bye
Enrico
[1] http://www.lukas-renggli.ch/blog/extendingpierparser
Reply | Threaded
Open this post in threaded view
|

Re: Beautiful Math for Pier

espin
In reply to this post by Tudor Girba
Hi Tudor,
it is all done by MathJax, the wiki code I used is something like

---------------
The following is a piece of Displayed Math:
\[\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} =
1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
{1+\frac{e^{-8\pi}} {1+\ldots} } } }\]

This, \(E = m c^2\), on the other end is a piece of Inline Math.
---------------

The guys at MathJax have done miracles...(the code I wrote is just tiny and trivial
and more needs to be done not to access relevant js from MathJax but from Seaside/Pier.
Any suggestions and helps is welcome of course ;-)

Bye
Enrico