About generating chapters with Pillar/Pier tools

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

About generating chapters with Pillar/Pier tools

hernanmd
Hello,

I have experimented several dissapointing errors when working with updated Pillar tools. I am not doing anything special besides working under Windows.

Apparently the Pillar CommandLineHandler is not working because OSEnvironment exception (Windows 8.1). When executing

Pharo.exe Pillar.image export --to=html BioPharo.pier

The attached exception raises.
This happens in all the images from:

https://ci.inria.fr/pharo-contribution/job/Pillar/PHARO=40,VERSION=stable,VM=vm/ Pharo4.0 (Latest update: #40614)
https://ci.inria.fr/pharo-contribution/job/Pillar/PHARO=40,VERSION=development,VM=vm/ Pharo4.0 (Latest update: #40614)
https://ci.inria.fr/pharo-contribution/job/Pillar/PHARO=50,VERSION=stable,VM=vm/ Pharo5.0
Latest update: #50124

Changing the method #baseDirectory to use %CD% environment variable doesn't fix it even when it works in command line:

c:\MySmalltalkProjects\Pillar\pharo-vm>echo %PWD%
%PWD%
c:\MySmalltalkProjects\Pillar\pharo-vm>echo %CD%
c:\MySmalltalkProjects\Pillar\pharo-vm

The solution I found was to replace the OSEnvironment line with FileSystem workingDirectory as suggested at: https://pharo.fogbugz.com/f/cases/15356/Pillar-command-line-script-doesn-t-auto-detect-pillar-conf-file-under-cygwin

About instructions given here
you do not need MinGW to export a Pier chapter. See here https://github.com/biosmalltalk/biopharo/blob/develop/doc/pier2tex.bat for an example

Another (worst) situation happened when I wanted to convert a generated LaTeX to PDF. I had to remove all tables, annotations and notes from the .pier file because errors reported in pdfLaTeX .

For tables  :

! Undefined control sequence.

l.176 \toprule


For notes (i.e. @@note )

! LaTeX Error: Environment note undefined.


See the LaTeX manual or LaTeX Companion for explanation.

Type H <return> for immediate help.

...

l.178 \begin{note}


Finally generated PDF looks different from previous versions.


Now I am the only one generating PDF with Pillar in Windows?


Hernán


MessageNotUnderstood receiver of asFileReference is nil.png (152K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: About generating chapters with Pillar/Pier tools

Ben Coman


On Sun, Jun 21, 2015 at 11:21 AM, Hernán Morales Durand <[hidden email]> wrote:

Now I am the only one generating PDF with Pillar in Windows?

Back when I did a bit on Pillar, difficulties with latex was part of the reason I moved to OSX.
cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: About generating chapters with Pillar/Pier tools

hernanmd
Thank you Ben for taking the time to read.

Do you (or anyone) mind to share which command do you use to convert from Pillar generated .tex to .pdf in Linux or OS/X?
Cheers,

Hernán


2015-06-21 12:15 GMT-03:00 Ben Coman <[hidden email]>:


On Sun, Jun 21, 2015 at 11:21 AM, Hernán Morales Durand <[hidden email]> wrote:

Now I am the only one generating PDF with Pillar in Windows?

Back when I did a bit on Pillar, difficulties with latex was part of the reason I moved to OSX.
cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: About generating chapters with Pillar/Pier tools

CyrilFerlicot
In reply to this post by hernanmd
Le 21/06/2015 05:21, Hernán Morales Durand a écrit :

> Hello,
>
> I have experimented several dissapointing errors when working with
> updated Pillar tools. I am not doing anything special besides working
> under Windows.
>
> Apparently the Pillar CommandLineHandler is not working because
> OSEnvironment exception (Windows 8.1). When executing
>
> Pharo.exe Pillar.image export --to=html BioPharo.pier
>
> The attached exception raises.
> This happens in all the images from:
>
> https://ci.inria.fr/pharo-contribution/job/Pillar/PHARO=40,VERSION=stable,VM=vm/
> Pharo4.0 (Latest update: #40614)
> https://ci.inria.fr/pharo-contribution/job/Pillar/PHARO=40,VERSION=development,VM=vm/
> Pharo4.0 (Latest update: #40614)
> https://ci.inria.fr/pharo-contribution/job/Pillar/PHARO=50,VERSION=stable,VM=vm/
> Pharo5.0
> Latest update: #50124
>
> Changing the method #baseDirectory to use %CD% environment variable
> doesn't fix it even when it works in command line:
>
> c:\MySmalltalkProjects\Pillar\pharo-vm>echo %PWD%
> %PWD%
> c:\MySmalltalkProjects\Pillar\pharo-vm>echo %CD%
> c:\MySmalltalkProjects\Pillar\pharo-vm
>
> The solution I found was to replace the OSEnvironment line with
> FileSystem workingDirectory as suggested at:
> https://pharo.fogbugz.com/f/cases/15356/Pillar-command-line-script-doesn-t-auto-detect-pillar-conf-file-under-cygwin
>
> About instructions given here
>
> https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/PillarChap/Pillar.html#sec:windowsusers
>
> you do not need MinGW to export a Pier chapter. See here
> https://github.com/biosmalltalk/biopharo/blob/develop/doc/pier2tex.bat
> for an example
Hi!
We know that Pillar is not easy to use on Windows and we need to improve
that, but for now we have a lot of work to do with Pillar and not enough
time to do it.
Using MinGW is only a temporary solution.

>
> Another (worst) situation happened when I wanted to convert a generated
> LaTeX to PDF. I had to remove all tables, annotations and notes from the
> .pier file because errors reported in pdfLaTeX .
>
> For tables  :
>
> ! Undefined control sequence.
>
> l.176 \toprule
>
I'll try to take a look at that one.
Can you send me a pillar file that raise this please ?


>
> For notes (i.e. @@note )
>
> ! LaTeX Error: Environment note undefined.
>
>
> See the LaTeX manual or LaTeX Companion for explanation.
>
> Type H <return> for immediate help.
>
> ...
>
> l.178 \begin{note}
>
>
Same here, can you send me a file because I never saw this error with
@@note.


> Finally generated PDF looks different from previous versions.
>
> Previous Pillar version:
> https://github.com/biosmalltalk/biopharo/blob/develop/doc/BioPharo.pier.pdf
>
> Current Pillar version (>= 0.56) :
> https://github.com/biosmalltalk/biopharo/blob/develop/doc/BioPharo.pdf
>

This one is normal. We changed the way extensions was generated because
the previous way wasn't right. When we export a .tex to a .pdf we don't
want to have a file .tex.pdf, so when we want to export a .pillar to a
.tex we don't want to get a .pillar.pdf!
So we changed that.

> Now I am the only one generating PDF with Pillar in Windows?

I do it but I use some script with MinGW for now or I use Pillar
directly from Pharo because the windows environment is not good for now.

>
>
> Hernán
>

--
Cheers
Cyril Ferlicot-Delbecque



signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: About generating chapters with Pillar/Pier tools

Ben Coman
In reply to this post by hernanmd
Sorry. It was nine months ago I made some small contribution. I don't
remember and it may have changed since.
cheers -ben

On Mon, Jun 22, 2015 at 12:43 PM, Hernán Morales Durand
<[hidden email]> wrote:

> Thank you Ben for taking the time to read.
>
> Do you (or anyone) mind to share which command do you use to convert from
> Pillar generated .tex to .pdf in Linux or OS/X?
> Cheers,
>
> Hernán
>
>
> 2015-06-21 12:15 GMT-03:00 Ben Coman <[hidden email]>:
>>
>>
>>
>> On Sun, Jun 21, 2015 at 11:21 AM, Hernán Morales Durand
>> <[hidden email]> wrote:
>>>
>>>
>>> Now I am the only one generating PDF with Pillar in Windows?
>>
>>
>> Back when I did a bit on Pillar, difficulties with latex was part of the
>> reason I moved to OSX.
>> cheers -ben
>
>

Reply | Threaded
Open this post in threaded view
|

Re: About generating chapters with Pillar/Pier tools

Damien Cassou-2
In reply to this post by CyrilFerlicot

Ferlicot D. Cyril <[hidden email]> writes:

> Le 21/06/2015 05:21, Hernán Morales Durand a écrit :
>> About instructions given here
>>
>> https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/PillarChap/Pillar.html#sec:windowsusers
>>
>> you do not need MinGW to export a Pier chapter. See here
>> https://github.com/biosmalltalk/biopharo/blob/develop/doc/pier2tex.bat
>> for an example
>
> We know that Pillar is not easy to use on Windows and we need to
> improve that, but for now we have a lot of work to do with Pillar and
> not enough time to do it. Using MinGW is only a temporary solution.


I asked Cyril to work on integrating what's currently in Bash scripts
inside Pillar itself (e.g.,, iterating over input files, generating pdf
from latex). This should make porting much easier (as well as creating
new Pillar-based projects).


>> Another (worst) situation happened when I wanted to convert a generated
>> LaTeX to PDF. I had to remove all tables, annotations and notes from the
>> .pier file because errors reported in pdfLaTeX .
>>
>> For tables  :
>>
>> ! Undefined control sequence.
>>
>> l.176 \toprule
>>
>
> I'll try to take a look at that one.
> Can you send me a pillar file that raise this please ?


this one is related to a missing latex package in your latex template.
Add this to your LaTeX template (or use the default template Pillar
provides or use the template from
https://github.com/SquareBracketAssociates/EnterprisePharo/)

    \usepackage{booktabs}


>> For notes (i.e. @@note )
>>
>> ! LaTeX Error: Environment note undefined.
>>
>>
>> See the LaTeX manual or LaTeX Companion for explanation.
>>
>> Type H <return> for immediate help.
>>
>> ...
>>
>> l.178 \begin{note}


each time you use @@XXXX, the LaTeX document will contain a
\begin{XXXX}. This means you have to create the environments you need.
So, if you write @@note in your Pillar document, you must add something
like this to your LaTeX template:


    \newenvironment{note}{\begin{center}\begin{minipage}{8cm}\hrule\vspace{0.2cm}
    \textbf{Note:}}{\vspace{0.3cm}\hrule\end{minipage}\end{center}}

Look here for what we use in EnterprisePharo:
    https://github.com/SquareBracketAssociates/EnterprisePharo/blob/master/support/latex/common.tex

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

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

Reply | Threaded
Open this post in threaded view
|

Re: About generating chapters with Pillar/Pier tools

Damien Cassou-2
In reply to this post by hernanmd

Hernán Morales Durand <[hidden email]> writes:

> Thank you Ben for taking the time to read.
>
> Do you (or anyone) mind to share which command do you use to convert from
> Pillar generated .tex to .pdf in Linux or OS/X?
> Cheers,


we use the following Bash script to do everything for the
EnterprisePharo book:

    https://github.com/SquareBracketAssociates/EnterprisePharo/blob/master/compile.sh

To answer your question, converting a .tex to a .pdf is as simple as

    pdflatex thefile.tex

or, if you use lualatex as we do in EnterprisePharo:

    lualatex thefile.tex

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

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

Reply | Threaded
Open this post in threaded view
|

Re: About generating chapters with Pillar/Pier tools

hernanmd
In reply to this post by CyrilFerlicot


2015-06-22 5:35 GMT-03:00 Ferlicot D. Cyril <[hidden email]>:
Le 21/06/2015 05:21, Hernán Morales Durand a écrit :
> Hello,
>
> I have experimented several dissapointing errors when working with
> updated Pillar tools. I am not doing anything special besides working
> under Windows.
>
> Apparently the Pillar CommandLineHandler is not working because
> OSEnvironment exception (Windows 8.1). When executing
>
> Pharo.exe Pillar.image export --to=html BioPharo.pier
>
> The attached exception raises.
> This happens in all the images from:
>
> https://ci.inria.fr/pharo-contribution/job/Pillar/PHARO=40,VERSION=stable,VM=vm/
> Pharo4.0 (Latest update: #40614)
> https://ci.inria.fr/pharo-contribution/job/Pillar/PHARO=40,VERSION=development,VM=vm/
> Pharo4.0 (Latest update: #40614)
> https://ci.inria.fr/pharo-contribution/job/Pillar/PHARO=50,VERSION=stable,VM=vm/
> Pharo5.0
> Latest update: #50124
>
> Changing the method #baseDirectory to use %CD% environment variable
> doesn't fix it even when it works in command line:
>
> c:\MySmalltalkProjects\Pillar\pharo-vm>echo %PWD%
> %PWD%
> c:\MySmalltalkProjects\Pillar\pharo-vm>echo %CD%
> c:\MySmalltalkProjects\Pillar\pharo-vm
>
> The solution I found was to replace the OSEnvironment line with
> FileSystem workingDirectory as suggested at:
> https://pharo.fogbugz.com/f/cases/15356/Pillar-command-line-script-doesn-t-auto-detect-pillar-conf-file-under-cygwin
>
> About instructions given here
>
> https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/PillarChap/Pillar.html#sec:windowsusers
>
> you do not need MinGW to export a Pier chapter. See here
> https://github.com/biosmalltalk/biopharo/blob/develop/doc/pier2tex.bat
> for an example

Hi!
We know that Pillar is not easy to use on Windows and we need to improve
that, but for now we have a lot of work to do with Pillar and not enough
time to do it.
Using MinGW is only a temporary solution.

>
> Another (worst) situation happened when I wanted to convert a generated
> LaTeX to PDF. I had to remove all tables, annotations and notes from the
> .pier file because errors reported in pdfLaTeX .
>
> For tables  :
>
> ! Undefined control sequence.
>
> l.176 \toprule
>

I'll try to take a look at that one.
Can you send me a pillar file that raise this please ?



 
>
> For notes (i.e. @@note )
>
> ! LaTeX Error: Environment note undefined.
>
>
> See the LaTeX manual or LaTeX Companion for explanation.
>
> Type H <return> for immediate help.
>
> ...
>
> l.178 \begin{note}
>
>

Same here, can you send me a file because I never saw this error with
@@note.


Same file as above
 

> Finally generated PDF looks different from previous versions.
>
> Previous Pillar version:
> https://github.com/biosmalltalk/biopharo/blob/develop/doc/BioPharo.pier.pdf
>
> Current Pillar version (>= 0.56) :
> https://github.com/biosmalltalk/biopharo/blob/develop/doc/BioPharo.pdf
>

This one is normal. We changed the way extensions was generated because
the previous way wasn't right. When we export a .tex to a .pdf we don't
want to have a file .tex.pdf, so when we want to export a .pillar to a
.tex we don't want to get a .pillar.pdf!
So we changed that.

It's ok, I was talking about the text appearance like fonts and code formatting. In previous version the code was formatted inside a grey box.
 

> Now I am the only one generating PDF with Pillar in Windows?

I do it but I use some script with MinGW for now or I use Pillar
directly from Pharo because the windows environment is not good for now.


Thank you for the feedback,
Cheers,

Hernán
 
Reply | Threaded
Open this post in threaded view
|

Re: About generating chapters with Pillar/Pier tools

hernanmd
In reply to this post by Damien Cassou-2


2015-06-22 9:59 GMT-03:00 Damien Cassou <[hidden email]>:

Ferlicot D. Cyril <[hidden email]> writes:

> Le 21/06/2015 05:21, Hernán Morales Durand a écrit :
>> About instructions given here
>>
>> https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/PillarChap/Pillar.html#sec:windowsusers
>>
>> you do not need MinGW to export a Pier chapter. See here
>> https://github.com/biosmalltalk/biopharo/blob/develop/doc/pier2tex.bat
>> for an example
>
> We know that Pillar is not easy to use on Windows and we need to
> improve that, but for now we have a lot of work to do with Pillar and
> not enough time to do it. Using MinGW is only a temporary solution.


I asked Cyril to work on integrating what's currently in Bash scripts
inside Pillar itself (e.g.,, iterating over input files, generating pdf
from latex). This should make porting much easier (as well as creating
new Pillar-based projects).


>> Another (worst) situation happened when I wanted to convert a generated
>> LaTeX to PDF. I had to remove all tables, annotations and notes from the
>> .pier file because errors reported in pdfLaTeX .
>>
>> For tables  :
>>
>> ! Undefined control sequence.
>>
>> l.176 \toprule
>>
>
> I'll try to take a look at that one.
> Can you send me a pillar file that raise this please ?


this one is related to a missing latex package in your latex template.
Add this to your LaTeX template (or use the default template Pillar
provides or use the template from
https://github.com/SquareBracketAssociates/EnterprisePharo/)

    \usepackage{booktabs}



My knowledge of LaTeX is minimal, so I didn't configured any template to generate my LaTeX file (I am using the stable build for 4.0).
The .tex file is generated from Pillar code and I don't know what template is using. I just evaluated:

Pharo.exe Pillar.image export --to=latex BioPharo.pier

I will be happy to make it work for now, but it would be much better if anyonce could modify the generated .tex with needed packages so they are included by default in the .tex file and users like me can work with Pillar in an easier way.

 
>> For notes (i.e. @@note )
>>
>> ! LaTeX Error: Environment note undefined.
>>
>>
>> See the LaTeX manual or LaTeX Companion for explanation.
>>
>> Type H <return> for immediate help.
>>
>> ...
>>
>> l.178 \begin{note}


each time you use @@XXXX, the LaTeX document will contain a
\begin{XXXX}. This means you have to create the environments you need.
So, if you write @@note in your Pillar document, you must add something
like this to your LaTeX template:


    \newenvironment{note}{\begin{center}\begin{minipage}{8cm}\hrule\vspace{0.2cm}
    \textbf{Note:}}{\vspace{0.3cm}\hrule\end{minipage}\end{center}}

Look here for what we use in EnterprisePharo:
    https://github.com/SquareBracketAssociates/EnterprisePharo/blob/master/support/latex/common.tex



I will try to add it or switch to Linux, but as I said above if anyone with better knowledge of Pillar could check with the Pillar build it would be really cool :)

Thank you Damien,


Hernán
 
--
Damien Cassou
http://damiencassou.seasidehosting.st

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