AllenDowney / plastex-oreilly

Branch of plastex that generates DocBook 4.5 that meets O'Reilly style guidelines.
7 stars 7 forks source link

plasTeX is hard to get running on a Mac #31

Open AllenDowney opened 12 years ago

AllenDowney commented 12 years ago

Step 1, we have to get it running!

Step 2, we should document everything Adam and Sanders had to install / configure

So far that includes

PIL lxml

LaTeX itself (specifically http://www.tug.org/mactex/)

Adam, would you use this issue to document what else you have done?

Then I will get it into the plasTeX docs.

tiarno commented 12 years ago

I have to set TEXINPUTS and DocBookTEMPLATES in a script. I wonder if the TEXINPUTS is the reason for the latex problems.

AllenDowney commented 12 years ago

Sounds like it's worth a try. Do you have the script handy?

This thread looks like it might be helpful:

http://www.latex-community.org/viewtopic.php?f=5&t=1435

Allen

On Mon, Aug 20, 2012 at 5:54 PM, Tim Arnold notifications@github.comwrote:

I have to set TEXINPUTS and DocBookTEMPLATES in a script. I wonder if the TEXINPUTS is the reason for the latex problems.

— Reply to this email directly or view it on GitHubhttps://github.com/AllenDowney/plastex-oreilly/issues/31#issuecomment-7884904.

tiarno commented 12 years ago

export PYTHONPATH="/Users/tim/github/local/plastex-oreilly/oreilly" export DocBookTEMPLATES="/Users/tim/github/local/plastex-oreilly/oreilly" export TEXINPUTS="/Users/tim/github/local/plastex-oreilly/oreilly:.::"

The PYTHONPATH includes the new classes, the TEXINPUTS includes the new (sometimes empty) .sty files and note the ending :: which tells latex to look in its regular places in addition to the named paths and the DocBookTEMPLATES point to the directory containing my templates (.ches and *.zpts) files.

I just source that file before starting work. --Tim

On Mon, Aug 20, 2012 at 6:50 PM, AllenDowney notifications@github.comwrote:

Sounds like it's worth a try. Do you have the script handy?

This thread looks like it might be helpful:

http://www.latex-community.org/viewtopic.php?f=5&t=1435

Allen

On Mon, Aug 20, 2012 at 5:54 PM, Tim Arnold notifications@github.comwrote:

I have to set TEXINPUTS and DocBookTEMPLATES in a script. I wonder if the TEXINPUTS is the reason for the latex problems.

— Reply to this email directly or view it on GitHub< https://github.com/AllenDowney/plastex-oreilly/issues/31#issuecomment-7884904>.

— Reply to this email directly or view it on GitHubhttps://github.com/AllenDowney/plastex-oreilly/issues/31#issuecomment-7886247.

AllenDowney commented 12 years ago

I am liking this theory more and more. The empty .sty files in the Data Analysis directory are probably there to prevent the real .sty files from getting read, but if they are not on the TEXINPUTS path, they are not doing their job, and that could explain the error messages Adam is getting.

Allen

On Mon, Aug 20, 2012 at 6:58 PM, Tim Arnold notifications@github.comwrote:

export PYTHONPATH="/Users/tim/github/local/plastex-oreilly/oreilly" export DocBookTEMPLATES="/Users/tim/github/local/plastex-oreilly/oreilly" export TEXINPUTS="/Users/tim/github/local/plastex-oreilly/oreilly:.::"

The PYTHONPATH includes the new classes, the TEXINPUTS includes the new (sometimes empty) .sty files and note the ending :: which tells latex to look in its regular places in addition to the named paths and the DocBookTEMPLATES point to the directory containing my templates (.ches and *.zpts) files.

I just source that file before starting work. --Tim

On Mon, Aug 20, 2012 at 6:50 PM, AllenDowney notifications@github.comwrote:

Sounds like it's worth a try. Do you have the script handy?

This thread looks like it might be helpful:

http://www.latex-community.org/viewtopic.php?f=5&t=1435

Allen

On Mon, Aug 20, 2012 at 5:54 PM, Tim Arnold notifications@github.comwrote:

I have to set TEXINPUTS and DocBookTEMPLATES in a script. I wonder if the TEXINPUTS is the reason for the latex problems.

— Reply to this email directly or view it on GitHub<

https://github.com/AllenDowney/plastex-oreilly/issues/31#issuecomment-7884904>.

— Reply to this email directly or view it on GitHub< https://github.com/AllenDowney/plastex-oreilly/issues/31#issuecomment-7886247>.

— Reply to this email directly or view it on GitHubhttps://github.com/AllenDowney/plastex-oreilly/issues/31#issuecomment-7886432.

adamwitwer commented 12 years ago

Thanks for creating this issue, Allen.

First, to answer your question from another thread, yes, it fails on test_suite/small in addition to all other books in the test_suite.

We all use MacBooks for our personal machines, but we regularly use and maintain software on Linux (Ubuntu) boxes. I'd like to get working in both places, though, so Sanders and I thought we'd start with out own machines.

For dependencies, I used brew install for PIL (which seemed to work), easy_install for lxml, and the DMG of MacTeX. Also, I see that plasTeX has its own list of dependencies, which I assume the user needs:

To generate images for destinations like HTML, you will also need to have
a LaTeX distribution installed, and either ghostscript or, preferably, 
either dvi2bitmap (http://dvi2bitmap.sourceforge.net/) or 
dvipng (http://savannah.nongnu.org/projects/dvipng/).  You will also
need to install the Python Imaging Library 
ihttp://www.pythonware.com/products/pil/)

Finally, Tim, can you be a little more explicit about your set up? We'd like to give it a try. What is the "oreilly" file that the export paths are pointing at? I don't see that in the GitHub repo? And I assume we want the export paths in our bash profiles? Or somewhere else?

Sorry for the basic questions, but we have very little experience using LaTeX.

Thank you! Adam

AllenDowney commented 12 years ago

Since you have some Linux boxes, can I suggest we hold off on the Mac for now and get it working on Linux? That will allow us to separate basic installation issues from things that are Mac specific.

niklasp commented 8 years ago

I would also be interested in more information about setting it up on OSX