Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: Unknown

====== Inline latex ======
Created Tuesday 24 March 2009

Need support for inline objects that render images on the fly

Object contains latex code, takes MD5, does a lookup in .zim/images/
If the image does not exist it is generated by calling latex and
dvi2png and saves under MD5

Same can be done for equation edited with the equation editor

Advantage is that copying an equation will do the copy on write for
the image automatically.

Define a cleaning action, e.g. when re-building the index, which
removes all these cached images
Also when editing with the editor it can clean up previous image (even
if it is used elsewhere it will be re-created anyway when needed)

Same appraoch can be used for e.g. for graphs and diagrams.
Abstract the generator such that same editor dialog can serve for
different inline formats
Editor should use gtksourceview when available...

Alternative the editor should allow saving as an external file by
specifying a name, link as object, not as image. But allow image link
for backward compatibility.

Also for external files we can save the image by MD5 sum.


* How to mark inline blocks in the wiki source ?
	* Support "$$ ... $$" for latex formulas ?
	* Support some block construct like "''{{{ latex\n ... \n}}}\n''"
		* distuinguise from block of latex for syntax highlighting ...
		* research wikipedia and creole syntax for such a block
* How to trigger image generation when rendering the page ?
* How to trigger image generation or copying when e.g. exporting to HTML ?


