mkogg.py: Fix 'self.get_mp4_metadata(self, source)'
[blog.git] / posts / mdwn_itex.mdwn_itex
1 [[!template id=gitrepo repo=ikiwiki]]
2
3 In my [[last post|MathML]] I plugged Jason Blevins' [mdwn_itex
4 plugin][plugin].  It turns out that it was harder than I'd expected to
5 get the plugin working with ikiwiki, so I'm recording the steps I took
6 here in case other ikiwiki users find this useful.
7
8 * Install [itex2MML][]
9 * [Install][install_plugin] my updated `mdwn_itex.pm` plugin
10   (`mdwn_itex.patch` against Jason's version).
11 * Patch your ikiwiki [templates][] to use a `DOCTYPE` supporting
12   MathML (`mdwn_itex-templates.patch`).
13 * Create a script wrapping `itex2MML` for escaping UTF-8 and named
14   entities (e.g. [[itex2MML.sh]]).
15 * Add config options along the lines of:
16
17         # plugins to add to the default configuration
18         add_plugins => [qw{ ... mdwn_itex ...}],
19         # plugins to disable
20         disable_plugins => [qw{... htmlscrubber htmltidy ...}],
21
22         # location of template files
23         templatedir => '/path/to/patched/templates',
24
25         # mdwn_itex plugin
26         # path to the itex2MML binary
27         itex2mml => '/path/to/your/wrapper/itex2MML.sh
28         # autonumber display equations?
29         itex_num_equations => 1,
30
31 * Create new files with the `.mdwn_itex` extension, and start
32   including [itex][]:
33
34   Euler's identity
35
36   \[ e^{i \pi} + 1 = 0 \]
37
38   has lots of fun constants: $e$, $i$, $\pi$,
39   $1$, and $0$.
40
41 Which will render as
42
43 Euler's identity
44
45 \[ e^{i \pi} + 1 = 0 \]
46
47 has lots of fun constants: $e$, $i$, $\pi$, $1$, and $0$.
48
49 The `htmlscrubber` and `htmltidy` plugins must be disabled because
50 otherwise they [strip][scrubber_strip] [out][tidy_strip] the MathML
51 markup.
52
53 Update: current versions of my patched files can be found in the
54 `mdwn_itex` branch of my ikiwiki git repository.
55
56 [plugin]: http://jblevins.org/git/ikiwiki/plugins.git/plain/mdwn_itex.pm
57 [itex2MML]: http://golem.ph.utexas.edu/~distler/blog/itex2MML.html
58 [install_plugin]: http://ikiwiki.info/plugins/install/
59 [templates]: http://ikiwiki.info/templates/
60 [scrubber_strip]: http://ikiwiki.info/todo/svg/
61 [tidy_strip]: http://lists.w3.org/Archives/Public/html-tidy/2006JanMar/0052.html
62 [itex]: http://golem.ph.utexas.edu/~distler/blog/itex2MMLcommands.html
63
64 [[!tag tags/blogging]]