Category Archives: open source software

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 wordpress.com supports LaTeX natively, but I have not checked this.

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

Mathjax

Mathjax drupal module

Mathjax WordPress.org 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="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript">
    MathJax.Hub.Config({
        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
  • del.icio.us
  • 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 WordPress.org. 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
  • del.icio.us
  • Digg
  • Facebook
  • Technorati
  • Reddit
  • Yahoo Buzz
  • StumbleUpon

Drupal: overcoming problems with unexpected page errors... Views, CTools, Panels

Been frustrated that I was having problems with Drupal's Choas Tools, Views, Update and Panels on YazikOpen. I kept getting "unepected page errors"  Today I eventually found a solution  online which worked for me.

  1. Went into file-manager on my webhost and moved (did not delete) the CTools module from the sites<all<modules folder.
  2. Disabled all contributed modules.
  3. Moved the CT tools module back to sites<all<modules folder.
  4. Views panels and update now works!

Very pleased about this as I can actually use the Views module now!

  • Twitter
  • del.icio.us
  • Digg
  • Facebook
  • Technorati
  • Reddit
  • Yahoo Buzz
  • StumbleUpon

Refreshing YazikOpen

Picture of YazikOpen website

I've spent much of today refreshing the look of my YazikOpen website an online directory of open access research into teaching and learning modern foreign languages.  I think that the new revision looks a lot cleaner and less cluttered that my previous effort. In the spirit of sharing and open access the bookcase banner is cropped from a wonderful picture from Flicker user Morgaine under a Creative Commons Attribution Share-Alike license.

  • Twitter
  • del.icio.us
  • Digg
  • Facebook
  • Technorati
  • Reddit
  • Yahoo Buzz
  • StumbleUpon

Get accessing to UK postal code data for use in MapWindow.

The relationship between postal codes and latitude and longitude has only recently come into the public domain (see www.freethepostcode.org). This has been something of problem for users of GIS software.

Here are two ways to plot UK postcode data on a map in MapWindow.

  1. Method 1 is probably the easiest.
    1. Add the google Geocoder plugin by clicking on Plugin in MapWindow and selecting google geocoder.
    2. Add addresses and the points should be generated on your map. A bit more detail here. http://www.mapwindow.org/phorum/read.php?2,7770.
    3. Generally seems to work quite well, but was hanging when coping with larger amounts of data. The main problem is that it is limited to 2000 postcodes a day. A bit of a problem if you have a very large dataset.

Method 2: A work around using a free utility called batchgeo.com www.batchgeo.com

    1. Paste your data from excel into the area indicated on their website.
    2. (Optional) Validate data—good idea to check that the part it thinks is your postcode data really is.
    3. Press ‘Map Now!’
    4. You will be given the option of a public map or a private one just for you. If you give your email address you can edit your map later.
    5. Scroll to the bottom of the page and click on save as google earth .kml file. NB: It took my ages to find this bit!
    6. Save the .kml file to your hard drive.
    7. Map Window does not read .kml or. kmz, so you will need to convert your .kml file to a shapefile (.shp).  You can do this online at http://www.zonums.com/online/kml2shp.php, but I’m sure that there are other converters.
    8. Save you .shp (and the partner files it generates to your hard drive.
    9. Go back to MapWindow and Add layer selecting the shapefile you have just created.

 

I’m sure that someone has been able to find another way of doing all, but these are the ways I managed to get it done.

Map Window. Click to enlarge

The yellow symbols on the map above are the locations of the Links into Languages lead universities. Click to see it more closely.

  • Twitter
  • del.icio.us
  • Digg
  • Facebook
  • Technorati
  • Reddit
  • Yahoo Buzz
  • StumbleUpon