Menu

problem with displaying TeX-derived images

Help
gpetty
2006-06-26
2012-10-11
  • gpetty

    gpetty - 2006-06-26

    I'm a new user/administrator of a phpWiki installation under Linux. When I first visited the page for TeX2pngPlugin, I got a php error message to the effect that images/tex was not writable. I fixed that by replacing the above relative path with /var/cache/httpd/images/tex.

    Now I get no error messages, and the TeX png images are successfully generated in the above cache directory and are viewable offline. However, they don't display in my browser. Instead, the alternate text is displayed.

    Here's a sample of the the resulting html source:

    <div class="plugin tightenable" id="TeX2pngPlugin"><div align="center"><img class="tex" src="/var/cache/httpd/images/tex/c0e7585c2add482621c0a58207171029.png" alt="$$(a+b)^n=\sum_{k=0}^n{n\choose k}a^k b^{n-k}$$" /></div>
    </div>

    The above-referenced png image exists, but only the alternate text actually appears in my browser. I don't know what "plugin tightenable" refers to, so I don't know whether that's a factor here or not.

    My browser is Mozilla 1.7.11

     
    • gpetty

      gpetty - 2006-06-26

      I think I understand part of the problem now. Although changing the relative path to an absolute path cured the problem with creating the images, it lead to html in which the "absolute" path was been searched relative to the http root -- i.e., /var/www/http.

      What I can't figure out now is what the default path is when the path is specified as images/tex. In other words, where should I be creating this cache directory so that it is both writable by the plugin and accessible by apache?

       
    • gpetty

      gpetty - 2006-06-26

      Further info:

      I discovered that if I revert to the original (relative) path in the plugin code, and create a directory images/tex inside the top-level phpWiki directory, the png files are successfully created there. But the server apparently doesn't look in the same place when it comes time to display the images. Once I figure out where it DOES look, I can probably soft-link the two locations together.

      But the fact that the plugin uses a relative path that is interpreted differently by Apache seems like a bug to me.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.