WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Easy LaTeX] How to contact the author? (13 posts)

  1. manojtd
    Member
    Posted 5 years ago #

    Please post any bug reports or feature requests here in this forum. If needed, the author can be contacted at through email.

    http://wordpress.org/extend/plugins/easy-latex/

  2. sorenweber
    Member
    Posted 5 years ago #

    I'm very uncomfortable with having the permissions on the cache being 777. Why is that necessary?

    I have root permissions so if it's a matter of another user account that needs access I can just create a new group that includes this user and the web-server user.

    Otherwise: great plugin :-)

  3. manojtd
    Member
    Posted 5 years ago #

    Easy LaTeX creates the equation images in the cache the first time the page is visited. Since the first visit may be from someone other than yourself, that someone (or his browser) needs access to the cache.

    But it may be possible to circumvent that. Let me think about it. May be I will ensure that the cache images are created when you save the post rather than the first time it is viewed. Stay tuned...

  4. sorenweber
    Member
    Posted 5 years ago #

    Thank you for the quick response. However, I don't quite understand: isn't it the web-server user/daemon that creates the images, in my case (Ubuntu) www-data, when the pages is created/accessed?

    How is the image created if not by a local TeX installation?

  5. manojtd
    Member
    Posted 5 years ago #

    The LaTeX images are created by a public server: http://l.wordpress.com/latex.php?latex=your-latex-code. In order to avoid future remote calls, the plugin caches the image first time it is generated. Since it is a browser that is making the call to create the image, your server wouldn't let it save it in the cache on the file system unless it is writable to the world.

    The only solution I can see is to give an option to the plugin user to disable the cache so that the image is generated every time the page is loaded. Will do that in the next release.

  6. Andrew Stacey
    Member
    Posted 5 years ago #

    Only the server needs write access to the cache. One way to make it work is as follows: when first installing the plugin, the server creates the cache directory somewhere. To do this, the parent directory of the cache needs to be world writable. After the cache is created, the parent directory can (and should) go back to ordinary permissions.

  7. sorenweber
    Member
    Posted 5 years ago #

    This would work for me!

  8. Andrew Stacey
    Member
    Posted 5 years ago #

    Okay, here's my diff:

    --- easy-latex.php	2009-01-04 22:52:08.000000000 +0100
    +++ easy-latex.php.new	2009-03-13 09:07:47.000000000 +0100
    @@ -63,8 +63,7 @@
           $mOptions = "ezLaTeX" . $mThemeName ;
    
           $ezTeXOptions = $this->getAdminOptions();
    
           $cache = dirname(__FILE__) . '/cache/';
    
    -      $cache_url = get_option('siteurl') . '/' . PLUGINDIR . '/' .
    
    -        basename(dirname(__FILE__)) . '/cache/' ;
    
    +      $cache_url = get_option('siteurl') . '/' . PLUGINDIR . '/' . '/cache/' ;
    
           $msg = '';
    
           if (!file_exists($cache)) {
    
             if (!mkdir($cache))
    
    @@ -75,7 +74,7 @@
                 'how to change file permissions at WordPress</a>.</font></li>' ;
    
           }
    
           else {
    
    -        if (fileperms($cache) != 16895)
    
    +        if (fileperms($cache) != 16877)
    
               $msg = '<li><font color="red">' .
    
                 'I cannot change the premission of the cache ' . $cache_url .
    
                 '.<br /> Please set its permission to 777. Use a command like:<br /> ' .
    
    @@ -369,11 +368,10 @@
         $formula_filename = 'tex_'.$formula_hash.'.'.$this->img_format;
    
         $cache_path = dirname(__FILE__) . '/cache/';
    
    -    if (fileperms($cache_path) != 16895) return '<i>$$' . $formula_text . '$$</i>' ;
    
    +    if (fileperms($cache_path) != 16877) return '<i>$$' . $formula_text . '$$</i>' ;
    
         $cache_formula_path = $cache_path . $formula_filename;
    
    -    $cache_url = get_option('siteurl') . '/' . PLUGINDIR . '/' .
    
    -      basename(dirname(__FILE__)) . '/cache/' ;
    
    +    $cache_url = get_option('siteurl') . '/' . PLUGINDIR . '/' . '/cache/' ;
    
         $cache_formula_url = $cache_url . $formula_filename;
    
         if ( !is_file($cache_formula_path))

    (I don't know if that will come out right!)

    The important bit are the file permissions. Actually, the script should just check that it has write access on the cache - it doesn't matter what other permissions are set. I'm not a PHP programmer so would need to look up how to do that sort of test (shouldn't be too hard, though).

    Note that there are some changes to the path/url of the cache. I just installed easy-latex.php directly in the plugins directory (not bothered about the colour picker) so the various pointers to the cache didn't match up. You may need to tweak these.

    Also, it doesn't tell you what to do because I haven't changed the installation code. So you need to do what I said above: change the permissions of the parent directory to 777, let the server create the cache (by running the plugin setup page) and then change the permissions of the parent directory back to 755. Do this fairly quickly so that you don't leave a directory with permissions 777 lying around.

    Hope this helps.

  9. mcsmartie
    Member
    Posted 4 years ago #

    Hi!
    I've been using you Easy LaTeX-plugin and so far I am super thrilled.
    However, I have one question.
    I couldn't get this script to work as I wanted it:
    $$\sum^9_{h=1}K(h)=85$$
    I want the 9 and h=1 to be above and under the Sum sign, which in ordinary LaTeX means that I have to add the \begin{equation} before and also end it. However this does not work either.
    What do I need to do?

    Thank you

    Johan

  10. manojtd
    Member
    Posted 4 years ago #

    Could you try without the $$?

  11. mcsmartie
    Member
    Posted 4 years ago #

    Hi,

    I tried but the result I got was that:
    $$\sum^9_{h=1}K(h)=85$$ that showed the calculation but with the "power of" 9 written to the upper right corner of the Sigma.
    All it said now was:
    \sum^9_{h=1}K(h)=85
    on the blog.

  12. manojtd
    Member
    Posted 4 years ago #

    Sorry Johan, I'm out of ideas.

  13. mcsmartie
    Member
    Posted 4 years ago #

    It's okay! No worries!

    Thank you for an excellent script - besides this minor problem, it is one of the best things for WordPress.

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags