Category Archives: LaTex

Displaying equations online without using images

This is an "additional information" page I have written for the forthcoming humanities statistics resource. I was going to use images, but was unsatisfied with the results. This solution took me a while to work out, but I thought I would share it here as well.

1. The easiest way to display an equation online is to use an image. If you create your equation in MS Word or Open Office you can use the snipping tool (In Windows 7) to make it into an image for website display.

2. The better (though much harder) way is to use LaTeX Math and it  requires some web development knowledge. This is not a comprehensive guide, but hopefully provides a good starting point.

LaTeX is used for preparing academic articles, mainly in the sciences. LaTeX is actually a language which can be understood with practice. If you plan to use a lot of equations online is probably worth investing some time in becoming familiar with LaTeX.

For example The LaTeX code for the correlation co-efficient is:

r=frac{{1}/{n}{(x_1-bar{x})(y_1-bar{y})+(x_2-bar{x})(y_2-bar{y}) ... + .... (x_n-bar{x})(y_n-bar{y})}}{SD_x SD_y}

Which rendered in LaTeX produces:

[ r=frac{{1}/{n}{(x_1-bar{x})(y_1-bar{y})+(x_2-bar{x})(y_2-bar{y}) ... + .... (x_n-bar{x})(y_n-bar{y})}}{SD_x SD_y}].

LaTeX looks complicated, but is actually surprising logical once you start to get the hang of it. A number of free open source LaTeX editors are available and the results can be exported into .pdf format. However, the editors are not needed when displaying equations online.

Unfortunately understanding LaTeX is not the only necessary step to publishing equations online. LaTeX is not html and will not work on a website without additional plugins.* The statistics website I am developing is built in Drupal and uses the add-on module MathJax to render the LaTeX online. It can be also used in WordPress (which I am using for this blog) and a variety of other applications.  See the MathJax, Drupal or WordPress websites to find details of the installation process. *[Added 23/10/2012] I've since learnt that supports LaTeX natively, but I have not checked this.

Short Math Guide for LaTex by Michael Downes (American Mathematical society website).


Mathjax drupal module

Mathjax plugin

Added 6th October 2012

As life would have it MathJax seems to have stopped working on my Drupal site. (It worked fine a couple of days back)  However, this code at the top of any page where you wish to use LaTex does seem to be working now.

I am grateful to the author of this website  for the code to place on the page.

<script src="" type="text/javascript">
        extensions: ["tex2jax.js","TeX/AmsMath.js","TeX/AMSsymbols.js"],
        jax: ["input/TeX","output/HTML-CSS"],
        tex2jax: {
            inlineMath: [ ['$','$'], [""] ],
            displayMath: [ [''], ["

"] ], processEscapes: true, }, "HTML-CSS": { availableFonts: ["TeX"] } }); </script>
  • Twitter
  • Digg
  • Facebook
  • Technorati
  • Reddit
  • Yahoo Buzz
  • StumbleUpon

The expanding ‘middle space’ between technological innovation and innovation in using technology

The expanding ‘middle space’ between technological innovation and innovation in using technology.
Part of my learning journey over the past year has been learning Drupal and A couple of years ago one of my web developer colleagues showed me a cartoon of the Drupal learning curve. The Drupal learning 'curve' is actually a cliff-face which is shown to claim many victims. Images of crosses and a runaway train have the potential to destroy even skilled and experienced developers. I understand that Drupal 7 is somewhat more user-friendly than its predecessor versions, but nevertheless there have been some false starts and issues continue to arise from time to time.

That said I consider myself something of a 'Route 1' learner. I learn what I want to know in order to achieve a specific outcome. I am actually proud of the fact I managed to build YazikOpen in my own time using Drupal. It wasn't that I set out to use Drupal from the beginning but attempts to use Joomla and WordPress (which I use for this blog) were unsuccessful. Most importantly an add-on biblio module is available in Drupal. It is this module which forms the backbone of my site.
I am not a web developer, at least not a professional one. Developing a website is not without its problems, but there is enormous potential for non-specialists to innovate in web development.

This innovation does not relate to the software itself, but the way it is used. Innovation is much about the content itself of course, but Drupal offers a half-way house between developing new software and applications on one hand and making innovative use of new technologies on the other.

Put simply Drupal is made up of two types of modules: core modules, the majority of which need to be activated to build any sort of website and optional modules which are being developed all the time. If there is anything you would like a website to do, the chances are that a module is available. This gives the opportunity for people like me who know little about programming build websites in ways that would have been very difficult for even the most talented web developers a few years ago. You might say that you can use the same pile of bricks in different ways to build a garden wall, a house or a cathedral. Behind the scenes it is unlikely that any two Drupal-built websites are the same.

Of course we will always need web developers, web designers and software developers of course and innovations in these areas will not stop. Just because we amateurs can do something does not always mean we should. Just because I can get something work does not mean I have found the best way to make it work.  It is ideal to have a website which looks good and is easy to navigate, though on some occasions this is more important than others. There is also the small matter of online security.

However I see a number of opportunities for see for those interested in this expanding ‘middle space’.

  • When I started to build YazikOpen I knew more or less what I wanted to achieve. Through learning online and buying a book or two I have more or less got where I what to go.
  • As an individual I have a high level of control over the technology as well as the content. If things are not working or I find a way to make it work better I can change things at the first point of convenience. I don’t need to wait until another person’s time becomes available and I don’t have to explain to other what I want to do.
  • I am currently putting together a website introducing humanities students to statistics. One of the technical challenges I have overcome is rendering LaTaX online* for the equations. I am able to make sure both the maths and appearance are working out.
  • Drupal, and many other packages are open source and free to the use. Premium services are available, but I don’t have to spend any money just to try something out.
  • Following on from above, if I want to buy a premium professional theme I can.
  • There is a strong online community of support for those new to Drupal, as well as more experienced developers.
  • New modules are being developed all the time. Although I don’t have the skills to build my own modules (at least not yet), finding another person asking the same question is only a google search away. And usually there is a module which can achieve it.

* I have written a section on this for the statistics website which I will make available on here as well.



  • Twitter
  • Digg
  • Facebook
  • Technorati
  • Reddit
  • Yahoo Buzz
  • StumbleUpon