Opened 6 years ago

Closed 6 years ago

# Inline formulas sometimes interfere with WikiFormatting

Reported by: Owned by: rrossmair kisielk normal TracMathJaxPlugin normal latex rrossmair 0.12

### Description

Source code:

Im Falle, daß wir keine astigmatische Linse haben (Cylinder = 0), ist $$D_1$$ = BaseCurve, $$D$$ entspricht Sphere und $$D_2$$ kann nach unten stehender Formel berechnet werden.


Result:

### comment:1 Changed 6 years ago by rrossmair

• Keywords monospace removed
• Summary changed from Inline formulas //sometimes// interfere with monospace WikiFormating to Inline formulas sometimes interfere with WikiFormatting

I just noticed that there are similar problems with table separators, i.e. ||, so it seems the issue is with WikiFormatting in general.

### comment:2 Changed 6 years ago by kisielk

• Status changed from new to assigned

I believe I have this fixed in the default branch on bitbucket: https://bitbucket.org/kisielk/tracmathjaxplugin/

Can you download the development code from https://bitbucket.org/kisielk/tracmathjaxplugin/get/9b0942b0d876.zip and let me know if it fixes the bug for you?

### comment:3 Changed 6 years ago by rrossmair

Not quite, the example I gave renders correctly now, but the following table row

||$$W_\alpha$$||Wirkung im Meridianschnitt mit Winkel $$\alpha$$ (gegenüber Bezugs-Hauptschnitt) in $$dpt$$||


still doesn't:

### comment:4 Changed 6 years ago by kisielk

Thanks for providing an example.

Can you try the revision from https://bitbucket.org/kisielk/tracmathjaxplugin/get/e84e96a982aa.zip and see if it solves the table problem for you? I didn't get a chance to fully test it before running off to work this morning, but I think it should do the trick.

### comment:5 Changed 6 years ago by rrossmair

The other errors are gone now, but unfortunately I see a new one. This worked before, but doesn't anymore:

$W_\alpha = D_{sph} + D_{cyl}·sin^2\alpha$


Result:

### comment:6 follow-up: ↓ 7 Changed 6 years ago by kisielk

If that worked before, it must have been purely by accident since I never wrote in support for the $..$ block syntax. The way I intended to use it is the $$...$$ or latex processor block syntax. However, if you want support for the square braces I can add that as well.

### comment:7 in reply to: ↑ 6 Changed 6 years ago by rrossmair

If that worked before, it must have been purely by accident since I never wrote in support for the $..$ block syntax.

Oh. My mistake... I guess I tried it and it worked so far.

The way I intended to use it is the $$...$$ or latex processor block syntax. However, if you want support for the square braces I can add that as well.

No, that won't be necessary.

Thank you for that great plugin, I really appreciate it. Greetings, Robert

### comment:8 Changed 6 years ago by kisielk

It's not too hard to add, I'll probably put it in later tonight and release a new version with the fixes. It seems I totally forgot that $...$ is the mid-length displaymath syntax in LaTeX :) Will close this ticket when done.

Thanks for the bug report and examples.

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

• Resolution set to fixed
• Status changed from assigned to closed

I've included support for the $...$ braces as well. However, due to limitations in the Trac wiki syntax API, the braces cannot span multiple lines. For multi-line formulas you still need to use the

{{{
#!latex
....
}}}


processor syntax.