This file lists some questions together with their solutions.

Issues concerning use of certain latex syntax etc.

Latex installation issues

Q: 1/3/2006
I have recently installed pmwiki, and tried to install linuxtex. I added a line: include_once('cookbook/linuxtexsb.php'); to the config file. I created a directory pub/cache in pmwiki, and set to to chmod 755 (also tried 777). However, the latex is still displayed as text and not as equation. Can anybody please suggest anything? --Harsh

A:I think I had the same problem as you had. I got it working the following way: I debugged the exec("... $latexPath ...") command using

  $outmsgs = array();
  exec(".. $cmd ..", $outmsgs);
  for ($outmsgs as $line) echo "$line <br />\n";

which yielded:

I can't find the format file `latex.fmt'!

I googled and found two hints ([(approve links) edit diff] and [(approve links) edit diff]) of how to generate this format file, of which the second one worked: Execute

fmtutil --all


fmtutil --byfmt=latex

to build the file(s). The command outputs the location where the file is placed. As latex then still did not find the file, adding a command line option -fmt=<pathToYourFormatFile> to the latex command showed to be fruitful. (Note that the <pathToYourFormatFile> has to contain the filename, but omit its file extension.)

(This worked for a tetex distribution of latex.)

ThomasP August 21, 2006, at 03:53 AM

Some symbols are missing in the generated image file:
I experienced that dvipng sometimes needed extra font files (e.g. when changing font size), which are usually generated on the fly during conversion. When executing with exec this generation does not seem to happen. A file named missfonts.log (named like this in my case) was generated though, which just had to be chmodded and executed on the terminal to get the files. (Maybe add code for this to automatically happen? Vote: +)

ThomasP August 21, 2006, at 04:37 AM

Graphical/stylesheet issues

To adjust the image positions for a better alignment of the formula text baseline with the wiki text baseline, I have used the following lines in the img.inlineMath clause (added to the original ones, apart from margin-top)

        margin-top: -0.0em;
        top: -2px;

ThomasP August 21, 2006, at 04:21 AM