Re: [Pharo-users] Mathex first release is out.

2015-09-22 Thread Julien Delplanque



On 21/09/15 15:40, Damien Cassou wrote:

Julien Delplanque  writes:


- Greek letters are defined as globals: Alpha, Beta, ...


instead of "polluting" the global namespace, you might want to let your
users write:

#alpha asMathex

Yep but I think the notation is nicer with '(Alpha index: $i) equal: 
Beta' than with '(#alpha asMathex index: $i) equal: #beta asMathex' and 
also lighter... But ok there is the cost of polluting globals...

  * Have a preview of the compiled LaTeX code using pdflatex


you launch pdflatex from Pharo? Does it work on Windows? How do you know
when pdflatex is finished compiling? How do you get the exit status of
pdflatex?

Pillar wanted the same. But we only managed to let Pillar generate a
bash script that must be executed to launch pdflatex.

Yes I launch pdflatex from Pharo using OSProcess and for now it is very 
weak, the call to pdflatex
block the vm until pdflatex finished its job. The exit status is not 
checked yet.


I will try to enhance it for the next release. The enhancement consist in:
- Create the pdf asynchronously (with a little animation in GT-Spotter 
till the preview is ready).
- To check the compilation status, I think I will use a regex to verify 
the output of pdflatex.


Julien



Re: [Pharo-users] Mathex first release is out.

2015-09-21 Thread Ben Coman
I don't have a use right now, but this is really cool. Thanks for the
announcement.
cheers -ben

On Mon, Sep 21, 2015 at 1:44 AM, Julien Delplanque  wrote:
> Hi all,
>
> I'm sending this mail for those who are eventually interested in the Mathex
> package
> I announced in a precedent mail
> (http://forum.world.st/Mathex-Generating-latex-math-from-Pharo-td4848409.html).
>
> Mathex has now its first release: 0.1 (the latest release will always be in
> the same state
> as master branch, new features will be on bleed till there is no new
> release. So basically,
> releases are not really usefull except for announcing them :) ).
>
> Here is a list of changes/additional features since the last mail:
> =
>
> - Greek letters are defined as globals: Alpha, Beta, ...
>
> - Additional packages for more latex commands
> (https://github.com/juliendelplanque/mathex#load-additional-package)
>
> - GT-Inspector extensions to:
> * explore the tree formed by Mathex objects
> * see the LaTeX code generated by a Mathex object
> * Have a preview of the compiled LaTeX code using pdflatex
>
> - The possibility to define custom commands made of Mathex objects
> composition using
> blocks (see: https://github.com/juliendelplanque/mathex/wiki#advanced-uses)
>
> - Documentation available on the wiki (more to come)
>
> - A code rewriter and its GUI (not documented yet and still experimental)
> that allows you
> to write "Mathex Smalltalk" ie Smalltalk code where #asMathex message is
> sent to all literals automatically.
> This make the code lighter because in spite of  '(1 asMathex + 2 asMathex)
> equal: 3 asMathex.', you can write:
> '(1 + 2) equal: 3' and get Mathex objects that are able to generate LaTeX.
>
> - The possibility to create Mathex objects using symbols. For example:
> '#vdash asMathex' returns a MVdash object.
>
> - Added messages to do things like:
> '$a asMathex ==> $b asMathex' and get the latex code 'a \Rightarrow b'.
>
> - Some refactoring
>
> And probably things I forgot
>
> Some links:
> ===
>
> Mathex github repository: https://github.com/juliendelplanque/mathex
> Mathex 0.1 release:
> https://github.com/juliendelplanque/mathex/releases/tag/0.1 (you can just
> follow instructions in this mail or in the README to get it).
> Mathex wiki: https://github.com/juliendelplanque/mathex/wiki.
>
> Install Mathex package:
> ==
>
> Metacello new
> baseline: 'Mathex';
> repository: 'github://juliendelplanque/mathex/repository';
> load.
>
> Install Mathex extensions (after Mathex package installation):
> 
>
> MLoader loadArrows. "Load Mathex-Arrows"
> MLoader loadBinaryOperators. "Load Mathex-BinaryOperators"
> MLoader loadLoglike. "Load Mathex-Loglike"
> MLoader loadMisc. "Load Mathex-Misc"
> MLoader loadRelations. "Load Mathex-Relations"
>
> Install GT-Inspector extensions (after Mathex package installation):
> 
>
> MLoader loadGTInspectorExtensions.
>
> Add a preview of the LaTeX code compiled in GT-Inspector (only for linux
> users from now, sorry for others)
> ==
> See:
> https://github.com/juliendelplanque/mathex#add-a-preview-of-the-latex-code-compiled-to-gt-inspector
>
> Comments, help and critics are welcome.
>
> Regards,
>
> Julien



Re: [Pharo-users] Mathex first release is out.

2015-09-21 Thread Damien Cassou

Julien Delplanque  writes:

> - Greek letters are defined as globals: Alpha, Beta, ...


instead of "polluting" the global namespace, you might want to let your
users write:

   #alpha asMathex


>  * Have a preview of the compiled LaTeX code using pdflatex


you launch pdflatex from Pharo? Does it work on Windows? How do you know
when pdflatex is finished compiling? How do you get the exit status of
pdflatex?

Pillar wanted the same. But we only managed to let Pillar generate a
bash script that must be executed to launch pdflatex.

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



[Pharo-users] Mathex first release is out.

2015-09-20 Thread Julien Delplanque

Hi all,

I'm sending this mail for those who are eventually interested in the 
Mathex package
I announced in a precedent mail 
(http://forum.world.st/Mathex-Generating-latex-math-from-Pharo-td4848409.html).


Mathex has now its first release: 0.1 (the latest release will always be 
in the same state
as master branch, new features will be on bleed till there is no new 
release. So basically,

releases are not really usefull except for announcing them :) ).

Here is a list of changes/additional features since the last mail:
=

- Greek letters are defined as globals: Alpha, Beta, ...

- Additional packages for more latex commands 
(https://github.com/juliendelplanque/mathex#load-additional-package)


- GT-Inspector extensions to:
* explore the tree formed by Mathex objects
* see the LaTeX code generated by a Mathex object
* Have a preview of the compiled LaTeX code using pdflatex

- The possibility to define custom commands made of Mathex objects 
composition using

blocks (see: https://github.com/juliendelplanque/mathex/wiki#advanced-uses)

- Documentation available on the wiki (more to come)

- A code rewriter and its GUI (not documented yet and still 
experimental) that allows you
to write "Mathex Smalltalk" ie Smalltalk code where #asMathex message is 
sent to all literals automatically.
This make the code lighter because in spite of  '(1 asMathex + 2 
asMathex) equal: 3 asMathex.', you can write:

'(1 + 2) equal: 3' and get Mathex objects that are able to generate LaTeX.

- The possibility to create Mathex objects using symbols. For example: 
'#vdash asMathex' returns a MVdash object.


- Added messages to do things like:
'$a asMathex ==> $b asMathex' and get the latex code 'a \Rightarrow b'.

- Some refactoring

And probably things I forgot

Some links:
===

Mathex github repository: https://github.com/juliendelplanque/mathex
Mathex 0.1 release: 
https://github.com/juliendelplanque/mathex/releases/tag/0.1 (you can 
just follow instructions in this mail or in the README to get it).

Mathex wiki: https://github.com/juliendelplanque/mathex/wiki.

Install Mathex package:
==

Metacello new
baseline: 'Mathex';
repository: 'github://juliendelplanque/mathex/repository';
load.

Install Mathex extensions (after Mathex package installation):


MLoader loadArrows. "Load Mathex-Arrows"
MLoader loadBinaryOperators. "Load Mathex-BinaryOperators"
MLoader loadLoglike. "Load Mathex-Loglike"
MLoader loadMisc. "Load Mathex-Misc"
MLoader loadRelations. "Load Mathex-Relations"

Install GT-Inspector extensions (after Mathex package installation):


MLoader loadGTInspectorExtensions.

Add a preview of the LaTeX code compiled in GT-Inspector (only for linux 
users from now, sorry for others)

==
See: 
https://github.com/juliendelplanque/mathex#add-a-preview-of-the-latex-code-compiled-to-gt-inspector


Comments, help and critics are welcome.

Regards,

Julien