# Ticket #1507 (closed enhancement: fixed)

## TeX implementation to formulas

Reported by: | tarmo | Owned by: | jukka |
---|---|---|---|

Priority: | blocker | Milestone: | 2.0rc1 |

Component: | generic | Version: | |

Keywords: | Cc: | ||

Time planned: | Time remaining: | ||

Time spent: |

### Description

Add support for TeX formulas in text chapters. Any string that is contained between \(...\) like

\(\Large c=sqrt{a^2+b^2}\)

should (when rendering) be replaced by

<img src="[TEXLOCATION][FORMULA]" alt="[FORMULA]"/>

for example:

<img src="/cgi-bin/mimetex.cgi?\Large c=sqrt{a^2+b^2}" alt="\Large c=sqrt{a^2+b^2}"/>

The location TEXLOCATION should be a site-wide property that by default points to

http://www.forkosh.dreamhost.com/mimetex.cgi?

and can be changed to a local installation of the mimetex binary (or any method that can render an image from some tex formula.

Details for finding the tex formula:

- the formula begins after any sequence of "\("
- the formula ends right before a sequence of "\)"
- several formulas can be on the same line
- the starting sequence without the ending sequence is ignored

Do this with regexps so that it's fast enough.

## Change History

**Note:**See TracTickets for help on using tickets.