Hi everyone, Is there any framework to generate latex code from Pharo? I would like to give a latex representation to some objects so I can export the latex code to a file I would include to my latex main file (for example). For example for a matrix I would like to do something like: fileStream nextPutAll: myMatrix asLatex. to have something like: \begin{pmatrix} 1& 2\\ 3& 4 \end{pmatrix} in the file. I used to do it with pylatex in Python and I wonder if something equivalent already exists in Pharo? Regards, Julien
Hi, I don't know if there is a framework but if you don't find you can still take a look at the class PRLaTeXCanvas and PRLaTeXWriter from Pharo. Maybe that'll help you to make something. On 16 May 2015 at 14:42, Julien Delplanque <julien@tamere.eu> wrote:
Hi everyone,
Is there any framework to generate latex code from Pharo? I would like to give a latex representation to some objects so I can export the latex code to a file I would include to my latex main file (for example).
For example for a matrix I would like to do something like:
fileStream nextPutAll: myMatrix asLatex.
to have something like:
\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}
in the file.
I used to do it with pylatex in Python and I wonder if something equivalent already exists in Pharo?
Regards,
Julien
-- Cheers Cyril Ferlicot
From which package does these classes come from? On 16/05/15 15:26, Cyril Ferlicot wrote:
Hi, I don't know if there is a framework but if you don't find you can still take a look at the class PRLaTeXCanvas and PRLaTeXWriter from Pharo. Maybe that'll help you to make something.
On 16 May 2015 at 14:42, Julien Delplanque <julien@tamere.eu> wrote:
Hi everyone,
Is there any framework to generate latex code from Pharo? I would like to give a latex representation to some objects so I can export the latex code to a file I would include to my latex main file (for example).
For example for a matrix I would like to do something like:
fileStream nextPutAll: myMatrix asLatex.
to have something like:
\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}
in the file.
I used to do it with pylatex in Python and I wonder if something equivalent already exists in Pharo?
Regards,
Julien
Pillar-ExporterLaTeX but they inherit from Pillar-ExporterCore I think On 16 May 2015 at 15:30, Julien Delplanque <julien@tamere.eu> wrote:
From which package does these classes come from?
On 16/05/15 15:26, Cyril Ferlicot wrote:
Hi, I don't know if there is a framework but if you don't find you can still take a look at the class PRLaTeXCanvas and PRLaTeXWriter from Pharo. Maybe that'll help you to make something.
On 16 May 2015 at 14:42, Julien Delplanque <julien@tamere.eu> wrote:
Hi everyone,
Is there any framework to generate latex code from Pharo? I would like to give a latex representation to some objects so I can export the latex code to a file I would include to my latex main file (for example).
For example for a matrix I would like to do something like:
fileStream nextPutAll: myMatrix asLatex.
to have something like:
\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}
in the file.
I used to do it with pylatex in Python and I wonder if something equivalent already exists in Pharo?
Regards,
Julien
-- Cheers Cyril Ferlicot
Julien Delplanque <julien@tamere.eu> writes:
From which package does these classes come from?
Gofer new smalltalkhubUser: 'Pier' project: 'Pillar'; configurationOf: 'Pillar'; load. (ConfigurationOfPillar project version: #stable) load: 'latex exporter'. With this loaded, you now have 2 choices: - instantiate PRLaTeXCanvas and PROutputStream manually and use them, or - create a Pillar document and export it as LaTeX. Continue asking questions here if you have more. -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
Is there anything already done to generate code related to math environment? I would like messages like: Fraction>>asMathLatex that returns $\frac{numerator}{denominator}$. Julien On 17/05/15 09:06, Damien Cassou wrote:
Julien Delplanque <julien@tamere.eu> writes:
From which package does these classes come from? Gofer new smalltalkhubUser: 'Pier' project: 'Pillar'; configurationOf: 'Pillar'; load.
(ConfigurationOfPillar project version: #stable) load: 'latex exporter'.
With this loaded, you now have 2 choices:
- instantiate PRLaTeXCanvas and PROutputStream manually and use them, or
- create a Pillar document and export it as LaTeX.
Continue asking questions here if you have more.
Sorry but that's an item of the TODO list of Pillar. On 17 May 2015 at 11:25, Julien Delplanque <julien@tamere.eu> wrote:
Is there anything already done to generate code related to math environment?
I would like messages like:
Fraction>>asMathLatex
that returns $\frac{numerator}{denominator}$.
Julien
On 17/05/15 09:06, Damien Cassou wrote:
Julien Delplanque <julien@tamere.eu> writes:
From which package does these classes come from?
Gofer new smalltalkhubUser: 'Pier' project: 'Pillar'; configurationOf: 'Pillar'; load.
(ConfigurationOfPillar project version: #stable) load: 'latex exporter'.
With this loaded, you now have 2 choices:
- instantiate PRLaTeXCanvas and PROutputStream manually and use them, or
- create a Pillar document and export it as LaTeX.
Continue asking questions here if you have more.
-- Cheers Cyril Ferlicot
Oh ok :) Do you have this todo list online? On 17/05/15 12:19, Cyril Ferlicot wrote:
Sorry but that's an item of the TODO list of Pillar.
On 17 May 2015 at 11:25, Julien Delplanque <julien@tamere.eu> wrote:
Is there anything already done to generate code related to math environment?
I would like messages like:
Fraction>>asMathLatex
that returns $\frac{numerator}{denominator}$.
Julien
On 17/05/15 09:06, Damien Cassou wrote:
Julien Delplanque <julien@tamere.eu> writes:
From which package does these classes come from? Gofer new smalltalkhubUser: 'Pier' project: 'Pillar'; configurationOf: 'Pillar'; load.
(ConfigurationOfPillar project version: #stable) load: 'latex exporter'.
With this loaded, you now have 2 choices:
- instantiate PRLaTeXCanvas and PROutputStream manually and use them, or
- create a Pillar document and export it as LaTeX.
Continue asking questions here if you have more.
http://smalltalkhub.com/#!/~Pier/Pillar "LaTeX embedding: LaTeX is very useful to write mathematical formulas for example. It would be nice to be able to embed LaTeX formulas inside a Pillar document and get these formulas fully exported. Org mode does something similar already." On 17 May 2015 at 12:33, Julien Delplanque <julien@tamere.eu> wrote:
Oh ok :)
Do you have this todo list online?
On 17/05/15 12:19, Cyril Ferlicot wrote:
Sorry but that's an item of the TODO list of Pillar.
On 17 May 2015 at 11:25, Julien Delplanque <julien@tamere.eu> wrote:
Is there anything already done to generate code related to math environment?
I would like messages like:
Fraction>>asMathLatex
that returns $\frac{numerator}{denominator}$.
Julien
On 17/05/15 09:06, Damien Cassou wrote:
Julien Delplanque <julien@tamere.eu> writes:
From which package does these classes come from?
Gofer new smalltalkhubUser: 'Pier' project: 'Pillar'; configurationOf: 'Pillar'; load.
(ConfigurationOfPillar project version: #stable) load: 'latex exporter'.
With this loaded, you now have 2 choices:
- instantiate PRLaTeXCanvas and PROutputStream manually and use them, or
- create a Pillar document and export it as LaTeX.
Continue asking questions here if you have more.
-- Cheers Cyril Ferlicot
Cyril Ferlicot <cyril.ferlicot@gmail.com> writes:
http://smalltalkhub.com/#!/~Pier/Pillar
"LaTeX embedding: LaTeX is very useful to write mathematical formulas for example. It would be nice to be able to embed LaTeX formulas inside a Pillar document and get these formulas fully exported. Org mode does something similar already."
this is something else. This feature means writing LaTeX directly inside the Pillar document and get nice output in all export formats. -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
Julien Delplanque <julien@tamere.eu> writes:
Is there anything already done to generate code related to math environment?
I would like messages like:
Fraction>>asMathLatex
that returns $\frac{numerator}{denominator}$.
stream := PROutputStream on: String new writeStream. configuration := PRCocoonConfiguration new. stream configuration: configuration. canvas := PRLaTeXCanvas on: stream. canvas raw: '$'. canvas command name: 'frac'; parameter: 'numerator'; parameter: 'denominator'. canvas raw: '$'. canvas flush -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
Ok thank you :) On 17/05/15 21:18, Damien Cassou wrote:
Julien Delplanque <julien@tamere.eu> writes:
Is there anything already done to generate code related to math environment?
I would like messages like:
Fraction>>asMathLatex
that returns $\frac{numerator}{denominator}$. stream := PROutputStream on: String new writeStream. configuration := PRCocoonConfiguration new. stream configuration: configuration. canvas := PRLaTeXCanvas on: stream.
canvas raw: '$'. canvas command name: 'frac'; parameter: 'numerator'; parameter: 'denominator'. canvas raw: '$'. canvas flush
stream := PROutputStream on: String new writeStream. configuration := PRCocoonConfiguration new. stream configuration: configuration. canvas := PRLaTeXCanvas on: stream.
canvas raw: '$'. canvas command name: 'frac'; parameter: 'numerator'; parameter: 'denominator'. canvas raw: '$'. canvas flush
Why not? stream := PROutputStream on: String new writeStream. canvas := PRLaTeXCanvas on: stream.
participants (4)
-
Cyril Ferlicot -
Damien Cassou -
Julien Delplanque -
stepharo