Re: [EP-underground] enabling latex features
"Malka Cymbalista" <[email protected]> Thu, 25 Jul 2002 16:03:39 +0300
| Newsgroups | gmane.comp.web.eprints.general |
|---|---|
| Message-ID | <[email protected]> |
I seem to be having a very hard time getting eprints to display tex code. something very strange is happening. When I give the URL http://wisdomarchive.wisdom.weizmann.ac.il/perl/latex2png?latex={\pi}r^2 I get back the expected equation. If, however, I change the equation in any way, for example
http://wisdomarchive.wisdom.weizmann.ac.il/perl/latex2png?latex={\pi}r^3 then I get no result (I am told that the document contains no data) and when I look in the error log it tells me that it failed on the convert because it failed to find one of the libraries. But how could it work for \pi r^2 but not for \pi r^3?
(BTW, when I simply run convert from the command line as the user who is running apache, it works properly. I have put the LD_LIBRARY_PATH in the .cshrc and .login files of the user who is running the httpd process so I don't understand this at all.)
In addition, after I changed the render method in ArchiveMetadataConfig.pm I ran generate_abstracts as per your suggestion. The html code that was generated wherever there is tex code is something like the following:
<img alt="$\epsilon$" border="0"
src="http://wisdomarchive.wisdom.weizmann.ac.il/perl/latex2png?latex=%24%5Cepsilon%24"
align="absbottom" />
which doesn't get rendered properly on the screen I assume because of the problem I described above. Is this what is supposed to get generated?
Any help will be greatly appreciated.
Malki Cymbalista
Webmaster, Weizmann Institute of Science
Rehovot, Israel 76100
Internet: [email protected]
>>> [email protected] 07/25/02 01:59PM >>>
Ah. It depends where your looking. It *should* work in /perl/ but you may
need to regenerate the views and abstracts. Normally you never have to change
the abstract pages, they get re-written if the data changes. If the render-
method changes you have to rebuild them by hand by running generate_abstracts.
generate_abstracts should *not* be run daily (unless you really want to for
some reason)
On Wed, Jul 24, 2002 at 05:00:11PM +0300, Malka Cymbalista wrote:
> Thanks for your reply. I edited ArchiveMetadataConfig.pm and changed one of the lines to read:
>
> { name => "abstract", input_rows => 10, type => "longtext", render_single_value => \&EPrints::Latex::render_string },
>
> I added the render_single_value property to several different field items.
> I saved the file and restarted the web server. I still do not see nicely formatted TeX output. Is there anything else I must do?
>
> Malki Cymbalista
> Webmaster, Weizmann Institute of Science
> Rehovot, Israel 76100
> Internet: [email protected]
>
> >>> [email protected] 07/24/02 01:11PM >>>
> That's the one. I didn't check the filename.
>
> the render_single_value is a property that should appear in the comma seperated
> field properties list, like "name", "type" or "input_cols"
>
> On Wed, Jul 24, 2002 at 09:59:27AM +0300, Malka Cymbalista wrote:
> > Thanks very much for your reply. I had a hard time getting convert to work properly but I now get proper mathematical output when I go to
> > http://--archiveurl--/perl/latex2png?latex={\pi}r^2
> >
> > However, I cannot find the file ArchiveMetadataConfig.pm. Where is it supposed to be? I did a
> > find . - name ArchiveMetadataConfig.pm
> > in the highest eprints directory but nothing shows up.
> >
> > I did find a file ArchiveMetadataFieldsConfig.pm. Is that the one? But I could not figure out where to put the line
> > render_single_value => \&EPrints::Latex::render_string
> >
> > Any help will be appreciated. Thank you.
> >
> >
> > Malki Cymbalista
> > Webmaster, Weizmann Institute of Science
> > Rehovot, Israel 76100
> > Internet: [email protected]
> >
> > >>> [email protected] 07/15/02 02:08PM >>>
> > First you should check it's working... try
> >
> > http://--archiveurl--/perl/latex2png?latex={\pi}r^2
> >
> > Which should return the image of an equation.
> >
> > The most likely problem you'll have is it not knowing where latex/convert etc.
> > are, in which case edit /opt/eprints2/perl_lib/EPrints/SystemSettings.pm
> >
> > THEN:
> >
> > In ArchiveMetadataConfig.pm add the following property to the text or
> > longtext field(s):
> >
> > render_single_value => \&EPrints::Latex::render_string
> >
> > This overrides the default field renderer with the latex aware one.
> >
> > On Mon, Jul 15, 2002 at 12:08:52PM +0300, Malka Cymbalista wrote:
> > > The eprints documentation says that there is an optional feature that
> > > allows eprints to look in certain fields for TeX looking text and
> > > display it as an image. When I originally installed eprints, I did not
> > > install latex. I have since then installed latex, dvips, and convert.
> > > How do I enable this feature?
> > > Thanks for any information.
> > >
> > > Malki Cymbalista
> > > Webmaster, Weizmann Institute of Science
> > > Rehovot, Israel 76100
> > > Internet: [email protected]
> >
> > --
> >
> > Christopher Gutteridge [email protected]
> > ePrints2 Coder, Support and Stuff +44 23 8059 4833
> >
> >
> >
>
> --
>
> Christopher Gutteridge [email protected]
> ePrints2 Coder, Support and Stuff +44 23 8059 4833
>
>
>
--
Christopher Gutteridge [email protected]
ePrints2 Coder, Support and Stuff +44 23 8059 4833