Opened 10 years ago

Closed 9 years ago

# TracMathPlugin does not work in Trac0.11b1

Reported by: Owned by: HeX rlotun normal TracMathPlugin normal nicolas.dumoulin@… 0.11

### Description

I just tried to run the plugin with Trac 0.11b1. It installs fine and can be activated but nothing else happens. When inserting the example code into a wikipage it is just displayed plainly as code.

  {{{
#!latex
$\mbox{Var}[\tau(X_p,X_d)] = \mbox{Var}[E(\tau(X_p,X_d)|X_p)] E[\mbox{Var}(\tau(X_p,X_d)|X_p)]$
}}}


Just to make sure there are no side effects I deactivated all other plugins and the paths to dvipng and latex are also set correctly. The directory /tmp/tracmath is created but nothing is placed therein. No error message is logged in trac.log.

Any clue what else I could check?

### comment:1 Changed 9 years ago by anonymous

I had some trouble with dvipng prompting for interaction the first time it needed a new font size, stalling the plugin (using mikTeX 2.7 on Windows). A "-q" (quiet) flag for dvipng might help?

### comment:2 Changed 9 years ago by anonymous

Unfortunately, the -q flag does not help. Apparently something goes wrong the first time a new font size (like \tiny) is used, and the whole dvipng process hangs.

The generated .dvi file is thereby locked, so manage_cache gets an exception. (This should be avoided by wrapping the two calls to os.unlink() in a try-except construct!)

If I kill the hung processes and delete the .dvi-file and .png-file, then it is re-generated correctly the second time (presumably because the new font size has been generated by then)...

### comment:3 Changed 9 years ago by jalar@…

This sounds like mftopk is having trouble finding the font. The conversion is made inside libkpathsea, and dvipng has very little influence on the behaviour of this. What is the log output of dvipng in this case? There may be something wrong with your TeX installation.

### comment:4 Changed 9 years ago by thesorcerer

With 0.11rc1 I have the same problem. /tmp/tracmath is created, but nothing else happens.

### comment:5 Changed 9 years ago by thesorcerer

Works with 0.11 final under Windows. Make sure that the paths to dvipng.exe and latex.exe have no spaces or are surrounded by quotes.

Or set the system's PATH variable, so you have just to specify dvipng.exe and latex.exe.

More debug information to Trac's log would be helpful.

### comment:6 Changed 9 years ago by HeX

Resolution: → worksforme new → closed

I can confirm that it works with 0.11 under Linux (Debian testing/Lenny). So I guess as a reporter I'm also privileged to close this ticket.

### comment:7 Changed 9 years ago by NicolasDumoulin

Resolution: worksforme closed → reopened

Hi, I have a similar issue with trac 0.11.1 on a debian etch with backports.

2008-10-06 10:04:59,896 Trac[__init__] DEBUG: Loading tracmath from /usr/lib/python2.4/site-packages/TracMath-0.1-py2.4.egg


The directory /tmp/tracmath is well created, but nothing else.

### comment:9 in reply to:  description ; follow-up:  10 Changed 9 years ago by anonymous

Hi folks,

I ran into a comparable error, when I was upgrading from trac 0.10 to 0.11. It is about the behaviour of the wiki-System. When you use a WikiProcessor you may indent the braces and you may indent the code to be process, but you may not indent the processor directive (e.g. #!latex). This is the same for all processors, internal as well as external. (html, rst, graphviz, ...).

As I look at the example given above, I can see there are two whitespaces indentation of everything. Remove the whitespaces before #!latex and give it another try.

Hope I could help a bit.

### comment:11 Changed 9 years ago by NicolasDumoulin

Resolution: → worksforme reopened → closed

Yes, you're totally right ! It works fine know :-) Thank you

### comment:12 Changed 9 years ago by Gabriel.Moreau@…

I use trac 0.10.3 and it's OK for me. I just understand what i had to do.

I use debian etch and tracmath use amsmath style package. So you need to install this style. On etch, you have to to (if you use tetex)

apt-get install tetex-extra


If you use texlive (lenny for example), thise style is in package texlive-latex-base so i thinks most people have it by default. It's the reason why these is less problem under lenny than etch.

Wish it's help everybody

gaby

### comment:13 Changed 6 years ago by anonymous

$\mbox{Var}[\tau(X_p,X_d)] = \mbox{Var}[E(\tau(X_p,X_d)|X_p)] E[\mbox{Var}(\tau(X_p,X_d)|X_p)]$


### Modify Ticket

Change Properties