Login  Register

Re: Pillar used directly from Pharo

Posted by Damien Cassou-2 on Apr 20, 2015; 11:59am
URL: https://forum.world.st/Pillar-used-directly-from-Pharo-tp4820420p4820623.html


Hi Jan,

the following complements Cyril's answers. You can have a look at all
the unit-tests, they do a lot of things like what you want.

Jan Valášek <[hidden email]> writes:
> header := pillarHeaderObject new.  //creating pillar objects directly

header := PRHeader new level: 2; add: (PRText content: 'foo'); yourself.


> aPillarDocument add: header.   //adding them to the whole document


document := PRDocument new.
document add: header.

> aPillarDocument exportToLatex. //export the document


to only export the body of the document:

PRLaTeXWriter write: document


> or I can just write the text in the pillar notation to "myTextObject"
> and then call something like->
> -------
> pillarParseAndExportToLatex: myTextObject.


document := PRDocumentParser parse: '!!foo'.
PRLaTeXWriter write: document.


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

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