axiom-developer
[Top][All Lists]

## [Axiom-developer] Re: Local MathAction

 From: Page, Bill Subject: [Axiom-developer] Re: Local MathAction Date: Tue, 17 Jan 2006 18:21:29 -0500



-----Original Message-----
Sent: Tuesday, January 17, 2006 7:14 AM
To: Ralf Hemmecke
Cc: Bill Page
Subject: RE: Local MathAction

Ralf,

On Tuesday, January 17, 2006 6:04 AM you wrote:
>
> The .png files get created. However, my zope1 instance did
>
> chmod a+r /var/lib/zope2.7/instance/zope1

This directory (and all the sub-directories and files) only
needs to be readable by the 'zope' user.

chown -R zope:zope /var/lib/zope2.7/instance
chown -R a+r /var/lib/zope2.7/instance

This should be the case by default. These files are not
accessed directly by the browser, but only through Zope as
"Zope objects", so user 'zope' needs to be able to read
from the sub-directory. I will try to explain this in more
detail below.

>
> runzope shows nothing when I view a latexwiki page. It's
> probable because the generated html is not too wrong.

Yes, that is a good sign. Also it is a very good sign that
you can find the .png files. That means almost everything
is working. Just for some reason your browser cannot access
the image files.

> The only thing I wonder is why it says "images" in src=.
>
> <a name="eq1"><table width="100%"><tr><td align="center"
> width="95%"><img alt="
> \label{eq1}
>   \int{x^2 + y_3}{dx}
> " class="equation" src="images/1936239154-18px.png"
> width="93" height="39"/>
>
> I have no idea where this directory should be.

This is not a directory, it is a **folder object** inside the
Zope database. You should be able to see it if you go to ZMI

http://localhost:9673/manage

If you click on 'mathaction' (the name of your local
latexwiki) and then on 'images' you should see the contents
of the .../var/LatexWiki directory.

If you click on the tab 'properties' you should be able to
see that the basepath which points to

/var/lib/zope2.7/instance/zope1/var/LatexWiki

> It is not under
>
> /var/lib/zope2.7/instance/zope1/var/LatexWiki
>
> and the .png files (and .tex files) get generated into
> that directory.

In fact both 'images' (the Zope folder) and '.../var/LatexWiki'
(the directory) are the same thing. The purpose of 'LocalFS'
is really stored in the file system look like a virtual Zope
object. It is like an "alias" that allows the Zope webserver
to access the contents of a directory

'images' ==> /var/lib/zope2.7/instance/zope1/var/LatexWiki

So a url like:

http://localhost:9673/mathaction/images/1936239154-18px.png

(replace 'mathaction' with the name of your local text latexwiki)

should display the contents of the file

ls /var/lib/zope2.7/instance/zope1/var/LatexWiki/1936239154-18px.png

You should actually see the graphic for the equation in your
browser. Does this work? Or do you get an error message?

This is exactly the same as what the HTML img attribute

... src="images/1936239154-18px.png"

is trying to do.

>
> I've tried to create
> /var/lib/zope2.7/instance/zope1/var/LatexWiki/images
> and copied all the .png files there, but still no picture
> is shown.

No, that is not the correct thing to do. 'images' is
already (or at least should be) directly associated with
/var/lib/zope2.7/instance/zope1/var/LatexWiki

>
> Do you know why?
>
> > apt-get install tetex-base tetex-bin tetex-extra gs
> python2.3-imaging
> >
> > which is correct, but you say that python2.3 had been previously
> > installed on your system. There is a possibility that perhaps
> > the python2.3-imaging package is not correctly associated with
> > your python interpreter. To check try
> >
> >   % python
> >   import PIL
> >   ^D
>
> python2.3-imaging was not installed, only python itself (I
> cannot even
> easily deinstall it -- I think KDE uses it).
>
> The "import PIL" gives no error.
>

Yes, this all must be working because you actually have .png
files in the .../var/LatexWiki directory. That is good.

It sounds to me like there must be a problem with the LocalFS
folder object 'images'. Perhaps it was not created when you
created the Type: latexwiki ZWiki object (it should have been).
Or perhaps

/var/lib/zope2.7/instance/zope1/var/LatexWiki

is not accessible to user 'zope'? (It should have at least