Ticket #1507 (closed enhancement: fixed)

Opened 12 years ago

Last modified 12 years ago

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

comment:1 Changed 12 years ago by jukka

  • Owner changed from anonymous to jukka
  • Status changed from new to assigned

comment:2 Changed 12 years ago by jukka

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

Feature implemented.

Note: See TracTickets for help on using tickets.