## 3 Representing Mathematics  
The representation of mathematics is a common need in academic literature. Mathematical notation has grown from a requirement for a syntax that is highly expressive and relatively easy to write. It presents specific challenges because of its complexity, the difficulty of authoring and the difficulty of rendering, away from the chalkboard that is its natural home. Support for mathematics has had a significant impact on academic publishing. It was, for example, the original motivation behind the development of TeX[13], and it still one of the main reasons why authors wish to use it or its derivatives. This is to such an extent that much mathematics rendering on the web is driven by a TeX engine somewhere in the process. So MediaWiki (and therefore Wikipedia), Drupal and, of course, WordPress follow this route. The latter provides plugin support for TeX markup using the wp-latex plugin [14]. Within kblog, we have developed a new plugin called mathjax-latex[15]. From the kblog author's perspective these two offer a similar interface--differences are, therefore, described later. Authors write their mathematics directly as TeX using one of the four markup syntaxes. The most explicit (and therefore least likely to happen accidentally) is through the use of \"shortcodes\" [16]. These are a HTML-like markup originating from some forum/bulletin board systems. In this form an equation would be entered as [latex]e=mc^2[/latex], which would be rendered as \"\(e=mc^{2}\)\". It is also possible to use three other syntaxes that are closer to math mode in TeX: $%e=mc^2$$, $latex e=mc^2$, or \[e=mc^2\].  
From the authorial perspective, we have added significant value, as it is possible to use a variety of syntaxes, which are independent of the authoring engine. For example, a TeX-loving mathematician working with a Word-using biologist can still set their equations using TeX syntax; although Word will not render these at authoring time but, in practice, this causes few problems for such authors, who are experienced at reading TeX. Within an LaTeX workflow, equations can be both rendered locally with source compiled to PDF and published to WordPress.  
There is also a W3C recommendation, MathML for the representation and presentation of mathematics. The kblog environment also supports this. In this case, the equivalent source appears as follows:  
<math>  <mrow>  <mi>E</mi>  <mo>=</mo>  <mrow>  <mi>m</mi>  <msup>  <mi>c</mi>  <mn>2</mn>  </msup>  </mrow>  </mrow>  
One problem with the MathML representation is obvious: it is very long-winded. A second issue, however, is that it is hard to integrate with existing workflows--on recognising an angle bracket, most of the publication workflows we have seen in use will turn it into the equivalent HTML entity. For some workflows (LaTeX, ascidoc) it is _possible_, although not easy, to prevent this within the native syntax.  
It is also possible to convert from Word's native OMML (\"equation editor\") XML representation to MathML, although this does not integrate with Word's native blog publication workflow. Ironically, it is because MathML shares an XML based syntax with the final presentation format (HTML) that the problem arises. The shortcode syntax, for example, passes straight-through most of the publication frameworks to be consumed by the middleware. From a pragmatic point of view, therefore, supporting shortcodes and TeX-like syntaxes has considerable advantages.  
For the reader, the use of mathjax-latex has significant advantages. The default mechanism within WordPress uses a math-mode-like syntax $latex e=mc^25. This is rendered using a TeX engine into an image, which is then incorporated and linked using normal HTML capabilities. This representation is opaque and non-semantic; it has significant limitations for the reader. The images are not scalable--zooming in causes severe pixellation; the background to the mathematics is coloured inside the image and does not necessarily reflect the local style. Kblog, however, uses the MathJax library [17].