compiling Pillar files locally (for LaserGame book)

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

compiling Pillar files locally (for LaserGame book)

Ben Coman

I've haven't been able to find any instructions on how to compile Pillar
files locally. Any pointers?

Is TEXLive required for the PDF compilation?
Maybe the setup I reported [1] for PBE1 on Windows would be similar?
However I now have access to a Mavericks machine.  Would that be a
better option?  What tools would you use to edit with ? (this is my
first Mac - something to google for would be useful)

I see that [2] runs  ./download.sh
so perhaps that is all that is required in this case for the LaserGame book?

[1] http://blog.openinworld.com/2012/05/contributing-to-pbe/ regarding
[2]
https://ci.inria.fr/pharo-contribution/job/PharoLaserGame/lastSuccessfulBuild/console

cheers -ben


Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

nacho
Ben,
1) Yes, it is possible. You could check the compile.sh script that is in the PharoForTheEnterprise repository in GitHub. It does exactly that.
2) Yes you have to have TEXLive installed.
3) If you install it on Mavericks check the paths. TexLive now install into a weird location and you should add that location to your path or else you'll get an error.
4) To edit pillar text I use TextMate with Uko's bundle.
best
Nacho

Lic. Ignacio Sniechowski, MBA







On Mon, May 5, 2014 at 2:42 PM, Ben Coman <[hidden email]> wrote:

I've haven't been able to find any instructions on how to compile Pillar files locally. Any pointers?
Is TEXLive required for the PDF compilation?
Maybe the setup I reported [1] for PBE1 on Windows would be similar?
However I now have access to a Mavericks machine.  Would that be a better option?  What tools would you use to edit with ? (this is my first Mac - something to google for would be useful)

I see that [2] runs  ./download.sh
so perhaps that is all that is required in this case for the LaserGame book?

[1] http://blog.openinworld.com/2012/05/contributing-to-pbe/ regarding
[2] https://ci.inria.fr/pharo-contribution/job/PharoLaserGame/lastSuccessfulBuild/console

cheers -ben



Nacho Smalltalker apprentice. Buenos Aires, Argentina.
Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

pharo4Stef@free.fr
In reply to this post by Ben Coman

> Is TEXLive required for the PDF compilation?
> Maybe the setup I reported [1] for PBE1 on Windows would be similar?
> However I now have access to a Mavericks machine.  Would that be a
> better option?  What tools would you use to edit with ? (this is my
> first Mac - something to google for would be useful)

I used either texmate or emacs (damien did a mode for pillar).
But do not bother too much if you edit and break ping me and I will fix
problems.

Stef

>
> I see that [2] runs  ./download.sh
> so perhaps that is all that is required in this case for the LaserGame
> book?
>
> [1] http://blog.openinworld.com/2012/05/contributing-to-pbe/ regarding
> [2]
> https://ci.inria.fr/pharo-contribution/job/PharoLaserGame/lastSuccessfulBuild/console
>
> cheers -ben
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

Damien Cassou
In reply to this post by Ben Coman

On Mon, May 5, 2014 at 7:42 PM, Ben Coman <[hidden email]> wrote:
Is TEXLive required for the PDF compilation?

yes. But you can use Pillar locally without PDF creation and let the integration server do the job (https://ci.inria.fr/pharo-contribution/job/PharoLaserGame/). Just comment the line starting with 'mypdflatex' in produce_pdf of the compile.sh file.


--
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: compiling Pillar files locally (for LaserGame book)

Ben Coman
In reply to this post by nacho
nacho wrote
2) Yes you have to have TEXLive installed.
3) If you install it on Mavericks check the paths. TexLive now install into a weird location and you should add that location to your path or else you'll get an error.
For me it was not a path issue.   I installed MacTex and it added /usr/texbin to my PATH. That contains 23 links to pdftext (ls -l | grep pdftex).  However pdflatex was not one of them. Fixed my problem with the following:
# cd /usr/texbin
# sudo ln -s pdftex pdflatex

Other than that, it was quite straight forward.  So now I have forked the PharoLaserGameTutorial repo, and compiled it to a PDF, and can start working on it :)

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

kilon.alios
Yes I am using MacTex too, it works like a charm. I compile the pdf always before committing to Github to make sure I am not braking enough. I also installed Texmaker which is an even better editor for Tex files and compiling to pdf. 


Though so far emacs with pillar mode and compile.sh is more than enough for my needs. Textmate also is good enough. 


On Sat, May 10, 2014 at 6:21 PM, Ben Coman <[hidden email]> wrote:
nacho wrote
> 2) Yes you have to have TEXLive installed.
> 3) If you install it on Mavericks check the paths. TexLive now install
> into a weird location and you should add that location to your path or
> else you'll get an error.

For me it was not a path issue.   I installed MacTex and it added
/usr/texbin to my PATH. That contains 23 links to pdftext (ls -l | grep
pdftex).  However pdflatex was not one of them. Fixed my problem with the
following:
# cd /usr/texbin
# sudo ln -s pdftex pdflatex

Other than that, it was quite straight forward.  So now I have forked the
PharoLaserGameTutorial repo, and compiled it to a PDF, and can start working
on it :)

cheers -ben



--
View this message in context: http://forum.world.st/compiling-Pillar-files-locally-for-LaserGame-book-tp4757965p4758547.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

Ben Coman
kilon alios wrote:
Yes I am using MacTex too, it works like a charm. I compile the pdf always before committing to Github to make sure I am not braking enough. I also installed Texmaker which is an even better editor for Tex files and compiling to pdf. 


Though so far emacs with pillar mode and compile.sh is more than enough for my needs. Textmate also is good enough. 

Thanks Kilon. Good to know.

btw, I see that files are generated under that git-clone created.  Being somewhat new to git, when I push back to my fork on github, then issue a pull request to SquareBrackets, what stops the generated files being included ?

cheers -ben
 

On Sat, May 10, 2014 at 6:21 PM, Ben Coman <[hidden email]> wrote:
nacho wrote
> 2) Yes you have to have TEXLive installed.
> 3) If you install it on Mavericks check the paths. TexLive now install
> into a weird location and you should add that location to your path or
> else you'll get an error.

For me it was not a path issue.   I installed MacTex and it added
/usr/texbin to my PATH. That contains 23 links to pdftext (ls -l | grep
pdftex).  However pdflatex was not one of them. Fixed my problem with the
following:
# cd /usr/texbin
# sudo ln -s pdftex pdflatex

Other than that, it was quite straight forward.  So now I have forked the
PharoLaserGameTutorial repo, and compiled it to a PDF, and can start working
on it :)

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

kilon.alios
well in order to include a file in your git repo you will have to add it. The fact that the file or folder exists inside your repo folder does not mean anything to git. So you need to issue a "git add" command. 

Because when you git add a folder it git adds all the files and sub folders it contain its possible to create a git ignore file that will tell git what to ignore. Again files you add inside thoses folders or new subfolders after the git add command will not be added so git ignore is not needed for those.

From what I see from working in UpdatedPharoByExample is that a gitignore is already made for all compiled files like html, pdf and anything else that pillar generated in the process of compilation so you dont need to gitignore those. 

its also possible to "git rm" this command will remove the file or folder from your git repo but it wont delete it, the file/folder will keep being inside your git repo local folder but it wont be part of your git repo and wont be tracked.  

I can't recommend GIT DOCs enough. These guys know how to write documentation and will amazed you how simple yet powerful GIT really is.

you can find the docs here -> http://git-scm.com/documentation

also another thing, git add and rm commands need a git commit and git push to be uploaded and committed to you online repo. Of course you can do other modifications and actions and commit all of them with one commit and push. 


On Sat, May 10, 2014 at 6:51 PM, Ben Coman <[hidden email]> wrote:
kilon alios wrote:
Yes I am using MacTex too, it works like a charm. I compile the pdf always before committing to Github to make sure I am not braking enough. I also installed Texmaker which is an even better editor for Tex files and compiling to pdf. 


Though so far emacs with pillar mode and compile.sh is more than enough for my needs. Textmate also is good enough. 

Thanks Kilon. Good to know.

btw, I see that files are generated under that git-clone created.  Being somewhat new to git, when I push back to my fork on github, then issue a pull request to SquareBrackets, what stops the generated files being included ?

cheers -ben

 

On Sat, May 10, 2014 at 6:21 PM, Ben Coman <[hidden email]> wrote:
nacho wrote
> 2) Yes you have to have TEXLive installed.
> 3) If you install it on Mavericks check the paths. TexLive now install
> into a weird location and you should add that location to your path or
> else you'll get an error.

For me it was not a path issue.   I installed MacTex and it added
/usr/texbin to my PATH. That contains 23 links to pdftext (ls -l | grep
pdftex).  However pdflatex was not one of them. Fixed my problem with the
following:
# cd /usr/texbin
# sudo ln -s pdftex pdflatex

Other than that, it was quite straight forward.  So now I have forked the
PharoLaserGameTutorial repo, and compiled it to a PDF, and can start working
on it :)

cheers -ben


Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

Ben Coman
kilon alios wrote:
well in order to include a file in your git repo you will have to add it. The fact that the file or folder exists inside your repo folder does not mean anything to git. So you need to issue a "git add" command. 

Because when you git add a folder it git adds all the files and sub folders it contain its possible to create a git ignore file that will tell git what to ignore. Again files you add inside thoses folders or new subfolders after the git add command will not be added so git ignore is not needed for those.

From what I see from working in UpdatedPharoByExample is that a gitignore is already made for all compiled files like html, pdf and anything else that pillar generated in the process of compilation so you dont need to gitignore those. 

its also possible to "git rm" this command will remove the file or folder from your git repo but it wont delete it, the file/folder will keep being inside your git repo local folder but it wont be part of your git repo and wont be tracked.  

I can't recommend GIT DOCs enough. These guys know how to write documentation and will amazed you how simple yet powerful GIT really is.

you can find the docs here -> http://git-scm.com/documentation

also another thing, git add and rm commands need a git commit and git push to be uploaded and committed to you online repo. Of course you can do other modifications and actions and commit all of them with one commit and push. 


On Sat, May 10, 2014 at 6:51 PM, Ben Coman <[hidden email]> wrote:
kilon alios wrote:
Yes I am using MacTex too, it works like a charm. I compile the pdf always before committing to Github to make sure I am not braking enough. I also installed Texmaker which is an even better editor for Tex files and compiling to pdf. 


Though so far emacs with pillar mode and compile.sh is more than enough for my needs. Textmate also is good enough. 

Thanks Kilon. Good to know.

btw, I see that files are generated under that git-clone created.  Being somewhat new to git, when I push back to my fork on github, then issue a pull request to SquareBrackets, what stops the generated files being included ?

cheers -ben

 

On Sat, May 10, 2014 at 6:21 PM, Ben Coman <[hidden email]> wrote:
nacho wrote
> 2) Yes you have to have TEXLive installed.
> 3) If you install it on Mavericks check the paths. TexLive now install
> into a weird location and you should add that location to your path or
> else you'll get an error.

For me it was not a path issue.   I installed MacTex and it added
/usr/texbin to my PATH. That contains 23 links to pdftext (ls -l | grep
pdftex).  However pdflatex was not one of them. Fixed my problem with the
following:
# cd /usr/texbin
# sudo ln -s pdftex pdflatex

Other than that, it was quite straight forward.  So now I have forked the
PharoLaserGameTutorial repo, and compiled it to a PDF, and can start working
on it :)

cheers -ben


thanks kilon.  That is exactly what I needed to know.
cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

stepharo
In reply to this post by Ben Coman

On 10/5/14 17:51, Ben Coman wrote:
kilon alios wrote:
Yes I am using MacTex too, it works like a charm. I compile the pdf always before committing to Github to make sure I am not braking enough. I also installed Texmaker which is an even better editor for Tex files and compiling to pdf. 


Though so far emacs with pillar mode and compile.sh is more than enough for my needs. Textmate also is good enough. 

Thanks Kilon. Good to know.

btw, I see that files are generated under that git-clone created.  Being somewhat new to git, when I push back to my fork on github, then issue a pull request to SquareBrackets, what stops the generated files being included ?

no only the pier files are under git.
you should not add the others.
in essence you should

git add .pier
git add figures/pdf if you change a pdf
and
git commit
git pull
git push



cheers -ben
 

On Sat, May 10, 2014 at 6:21 PM, Ben Coman <[hidden email]> wrote:
nacho wrote
> 2) Yes you have to have TEXLive installed.
> 3) If you install it on Mavericks check the paths. TexLive now install
> into a weird location and you should add that location to your path or
> else you'll get an error.

For me it was not a path issue.   I installed MacTex and it added
/usr/texbin to my PATH. That contains 23 links to pdftext (ls -l | grep
pdftex).  However pdflatex was not one of them. Fixed my problem with the
following:
# cd /usr/texbin
# sudo ln -s pdftex pdflatex

Other than that, it was quite straight forward.  So now I have forked the
PharoLaserGameTutorial repo, and compiled it to a PDF, and can start working
on it :)

cheers -ben


Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

Ben Coman
stepharo wrote:

On 10/5/14 17:51, Ben Coman wrote:
kilon alios wrote:
Yes I am using MacTex too, it works like a charm. I compile the pdf always before committing to Github to make sure I am not braking enough. I also installed Texmaker which is an even better editor for Tex files and compiling to pdf. 


Though so far emacs with pillar mode and compile.sh is more than enough for my needs. Textmate also is good enough. 

Thanks Kilon. Good to know.

btw, I see that files are generated under that git-clone created.  Being somewhat new to git, when I push back to my fork on github, then issue a pull request to SquareBrackets, what stops the generated files being included ?

no only the pier files are under git.
you should not add the others.
in essence you should

git add .pier
git add figures/pdf if you change a pdf

I noticed that many of the figures are pdf, so I am really curious why this was done and not left as a JPG or PNG?  It may not matter for a book but it seems awkward if a html version is needed at some point. Also I added a .gitignore since `git status` showed way too much irrelevant info to be useful - and the PDF-figures prevent *.pdf being a filter (but *.pier.pdf is an effective alternative for our purpose).
and
git commit
git pull
git push

Thank for that.  Its good to have a quickstart. I'll read up on them now to learn more.
cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

Damien Cassou
On Sun, May 11, 2014 at 3:20 PM, Ben Coman <[hidden email]> wrote:
>
> I noticed that many of the figures are pdf, so I am really curious why this
> was done and not left as a JPG or PNG?  It may not matter for a book but it
> seems awkward if a html version is needed at some point. Also I added a
> .gitignore since `git status` showed way too much irrelevant info to be
> useful - and the PDF-figures prevent *.pdf being a filter (but *.pier.pdf is
> an effective alternative for our purpose).

- PDF is a vector graphics format.
- JPG and PNG are not.

http://en.wikipedia.org/wiki/Vector_graphics


--
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: compiling Pillar files locally (for LaserGame book)

Ben Coman
Damien Cassou wrote:
On Sun, May 11, 2014 at 3:20 PM, Ben Coman [hidden email] wrote:
  
I noticed that many of the figures are pdf, so I am really curious why this
was done and not left as a JPG or PNG?  It may not matter for a book but it
seems awkward if a html version is needed at some point. Also I added a
.gitignore since `git status` showed way too much irrelevant info to be
useful - and the PDF-figures prevent *.pdf being a filter (but *.pier.pdf is
an effective alternative for our purpose).
    

- PDF is a vector graphics format.
- JPG and PNG are not.

http://en.wikipedia.org/wiki/Vector_graphics


  
But these screen snapshots (which I didn't clarify earlier, see attached) are bitmaps not vector graphics. From line 22 of attached file: "<< /Length 8 0 R /Type /XObject /Subtype /Image /Width 1428 /Height 1070 /ColorSpace 9 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream"

Okay I see a benefit in annotations on top of the bitmap being re-editable later, but it makes the underlying bitmap harder to edit.  'll have see how this balance pans out in practice.  Maybe the bitmaps wont need much editing.

cheers -ben


3-FourClassesCreated.pdf (378K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

Damien Cassou
On Tue, May 20, 2014 at 2:01 AM, Ben Coman <[hidden email]> wrote:
> Okay I see a benefit in annotations on top of the bitmap being re-editable
> later, but it makes the underlying bitmap harder to edit.  'll have see how
> this balance pans out in practice.  Maybe the bitmaps wont need much
> editing.


we need to find a solution that works for both pdf and html

--
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: compiling Pillar files locally (for LaserGame book)

Stephan Eggermont-3
Damien Cassou wrote:
>- PDF is a vector graphics format.

Uhm, pdf is a compound format. It is an unsuitable format for figures. It just adds overhead.
Screenshots should be png, photo's jpg.

Stephan
Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

Tudor Girba-2
Yes, but drawings should be vector graphics :)

Doru


On Tue, May 20, 2014 at 9:55 AM, Stephan Eggermont <[hidden email]> wrote:
Damien Cassou wrote:
>- PDF is a vector graphics format.

Uhm, pdf is a compound format. It is an unsuitable format for figures. It just adds overhead.
Screenshots should be png, photo's jpg.

Stephan



--

"Every thing has its own flow"
Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

Stephan Eggermont-3
In reply to this post by Damien Cassou
And of course there is no need to have a lower number of screenshots
now you can generate them from the image.

Stephan

Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

stepharo

> And of course there is no need to have a lower number of screenshots
> now you can generate them from the image.

Well I will let you for the book you will write and learn from you.
For me and my time, I will minimize the number of screenshots and if you
have some scripts
to generate these screenshots I will use the scripts.

Stef


Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

Stephan Eggermont-3
In reply to this post by Damien Cassou
Stef wrote:
>Well I will let you for the book you will write and learn from you.
>For me and my time, I will minimize the number of screenshots and if you
>have some scripts
>to generate these screenshots I will use the scripts.

Please do:
http://forum.world.st/Making-screenshots-programmatically-for-book-td4757560.html#a4758268
Reply | Threaded
Open this post in threaded view
|

Re: compiling Pillar files locally (for LaserGame book)

stepharo
I will try. Now I do not know if I can script Nautilus.


Stef

On 21/5/14 10:51, Stephan Eggermont wrote:
> Stef wrote:
>> Well I will let you for the book you will write and learn from you.
>> For me and my time, I will minimize the number of screenshots and if you
>> have some scripts
>> to generate these screenshots I will use the scripts.
> Please do:
> http://forum.world.st/Making-screenshots-programmatically-for-book-td4757560.html#a4758268
>
>