OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OJS Plugin: LatexRender support

The Plugin Gallery is a venue for users of PKP software to share their plugins.

Moderators: jmacgreg, michael, John

Forum rules
If you post a plugin here, please include information on which versions of which applications it is compatible with. Attach a tarball of the plugin (e.g. tar cvzf myPlugin-0.1.tar.gz plugins/generic/myPlugin). Thanks for contributing!

OJS Plugin: LatexRender support

Postby asmecher » Tue Aug 12, 2008 9:51 am

This plugin adds support for automatic rendering of TeX formulas within article titles and abstracts using the open source LatexRender tool (included).

Once enabled through the Journal Manager -> System Plugins interface, the plugin will watch for $inline TeX$ and $$blockquoted TeX$$ snippets, e.g. $\alpha$ or $\\alpha$, and replace them with rendered images of the formula.

Author: Alec Smecher
Software: OJS
Versions: 2.2+
Attachments
latexRender-0.4.tar.gz
LatexRender plugin version 0.4
(20.94 KiB) Downloaded 708 times
asmecher
 
Posts: 7737
Joined: Wed Aug 10, 2005 12:56 pm

Re: OJS Plugin: LatexRender support

Postby lightshadow306 » Wed Nov 05, 2008 8:29 am

Dear asmecher
I install this plugin and enable it, but it always get "(Error rendering LaTeX formula"
Could you show me the details of installion step by step ? Thank you
lightshadow306
 
Posts: 63
Joined: Wed Nov 05, 2008 8:16 am

Re: OJS Plugin: LatexRender support

Postby asmecher » Wed Nov 05, 2008 9:55 am

Hi lightshadow306,

This is a generic message given when LatexRender encounters an error; the most likely cause is that the necessary LaTeX tools aren't in the paths specified as defaults (see lib/otherPHP/latexrender/class.latexrender.php). If you're handy with PHP, try adding some debugging output in the getFormulaURL function in that class.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7737
Joined: Wed Aug 10, 2005 12:56 pm

Re: OJS Plugin: LatexRender support

Postby lightshadow306 » Wed Nov 05, 2008 10:08 am

Dear Sir:
I have use a laterrender plugin integraed with wordpress, It is of no problem. So I thik the latex enviroment on my server is ok. I will try again. Thank you.
lightshadow306
 
Posts: 63
Joined: Wed Nov 05, 2008 8:16 am

Re: OJS Plugin: LatexRender support

Postby lightshadow306 » Wed Nov 05, 2008 10:04 pm

Dear Sir,
It still fails on my system. Can you do me a favor to tell me how to debug ?
lightshadow306
 
Posts: 63
Joined: Wed Nov 05, 2008 8:16 am

Re: OJS Plugin: LatexRender support

Postby asmecher » Wed Nov 05, 2008 10:48 pm

Hi lightshadow306,

For debugging, choose a simple formula and embed it inline by using single "$" characters on either side. In LatexRenderPlugin.inc.php, find the lines:
Code: Select all
        function latexCallbackSingle($matches) {
                $match = html_entity_decode($matches[2]);
                $latexRender =& $this->getLatexRender();
                $formulaUrl = $latexRender->getFormulaURL($match);
After these lines, add the following:
Code: Select all
                die("Error code \"" . $latexRender->_errorcode . "\"; Error message \"" . $latexRender->_errorextra . "\"");
This should result in an error message when you try to display a LaTeX snippet.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7737
Joined: Wed Aug 10, 2005 12:56 pm

Re: OJS Plugin: LatexRender support

Postby lightshadow306 » Thu Nov 06, 2008 9:40 am

Dear Sir
I got
Error code "6"; Error message ""

Thank you for your help
lightshadow306
 
Posts: 63
Joined: Wed Nov 05, 2008 8:16 am

Re: OJS Plugin: LatexRender support

Postby asmecher » Thu Nov 06, 2008 10:03 am

Hi lightshadow30,

This means LatexRender is having trouble copying the generated image into another directory. Check your PHP logs for an error message that describes the problem in more detail. It's most likely a file permission problem.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7737
Joined: Wed Aug 10, 2005 12:56 pm

Re: OJS Plugin: LatexRender support

Postby lightshadow306 » Thu Nov 06, 2008 10:08 am

Dear Sir
It is starng I can run plugins/generic/latexRender/lib/otherPHP/example.php without any problem.
lightshadow306
 
Posts: 63
Joined: Wed Nov 05, 2008 8:16 am

Re: OJS Plugin: LatexRender support

Postby asmecher » Thu Nov 06, 2008 10:14 am

Hi lightshadow30,

Have you checked your logs as per my previous message?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7737
Joined: Wed Aug 10, 2005 12:56 pm

Re: OJS Plugin: LatexRender support

Postby lightshadow306 » Thu Nov 06, 2008 10:20 am

Dear Sir
I got
identify: unable to open image `306b0bbc0b1783e9cd8600daf65956fa.png': No such file o
r directory.
identify: unable to open file `306b0bbc0b1783e9cd8600daf65956fa.png'.
Do you mean this ?
lightshadow306
 
Posts: 63
Joined: Wed Nov 05, 2008 8:16 am

Re: OJS Plugin: LatexRender support

Postby asmecher » Thu Nov 06, 2008 10:36 am

Hi lightshadow306,

Yes, that helps. Please ensure that the following two directories exist and are writable by the web server:
  • a "temp" directory, created as a subdirectory of the files_dir (as configured in config.inc.php)
  • a "cache" directory, created as a subdirectory of the latexRender directory (the LatexRender plugin's main directory)
Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7737
Joined: Wed Aug 10, 2005 12:56 pm

Re: OJS Plugin: LatexRender support

Postby lightshadow306 » Thu Nov 06, 2008 10:48 am

Dear Sir
Now I got
Error code "0"; Error message ""
and the error messages
identify: unable to open file `e52704f7bd88c11451f20576270a6fa5.png'.
404fba71f2b525455011cce518f9ff61.dvi: No such file or directory
identify: unable to open image `404fba71f2b525455011cce518f9ff61.png': No such file or directory.
identify: unable to open file `404fba71f2b525455011cce518f9ff61.png'.

Thank you very much !!
I forgot to say that my system is FreeBSD 7.0 Release /AMD64
Thank you AGAIN
lightshadow306
 
Posts: 63
Joined: Wed Nov 05, 2008 8:16 am

Re: OJS Plugin: LatexRender support

Postby asmecher » Thu Nov 06, 2008 10:49 am

Hi lightshadow306,

OK, now try removing the debugging code suggested in the above post.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7737
Joined: Wed Aug 10, 2005 12:56 pm

Re: OJS Plugin: LatexRender support

Postby lightshadow306 » Thu Nov 06, 2008 10:55 am

Dear Sir,
Thank you very much, it works now. Awesome, The God !!
By the way, May I set articlId as the way "20081101001"
The is a old question !!
Thank you again
lightshadow306
 
Posts: 63
Joined: Wed Nov 05, 2008 8:16 am

Next

Return to Plugin Gallery

Who is online

Users browsing this forum: No registered users and 1 guest

cron