# Tag Archives: LaTeX

General

## Writing...

I've been reading a couple of blog posts about other students' writing environments (both digital and physical) and the I've been really interested in the approaches they take when it comes to software selection but I've really been struggling to follow why they go to such extraordinary lengths to set up bespoke writing environment.  We have a few mathematicians associated with our course and they all swear by how LaTeX, for example, saves them days and days of typing equations and how they couldn't possibly write any of their materials without it.  But the part I'm really struggling to understand is that it was created about 40 or so years ago to overcome typesetting problems and surely there must be something more effective available now after all this time?

Whilst I have a copy of Scrivener and I'm used to writing large batch files in Vi and ViM from my days using SPARC SunOS stations, I still choose to do most of my writing in Word.  It has an outlining tool which I find useful, but the deal sealer for me is that I can make it dance when it comes to large documents with regards automation.  Through simply using styles and captions, I can have a simply written and elegantly cross referenced document up and running in seconds.  Whilst scrivener is intended to get your ideas down on a page and get writing, I just don't feel that it's quite there for technical documents, as figures should be numbered and cross-referenced, as should equations and I'm far too lazy to do this myself and I've sort of gotten used to Word doing the donkey work for me for the past 20 years on these elements.

Admittedly the equation editor is dreadful in Word and is to type-setting what I am to men's ballet.  I've overcome this though by using MathType 6.7 which makes all of my equations look uniform and well typeset, with the added bonus of having numbering macros and scripts embedded into Word that allows me to automatically number equations and cross reference them in my writing.

Another boon for using MathType is that I can colour code equations, something that might sound trivial, but actually can be really useful in presentations to grey out parts of the equation that you're not interested in for the minute or for making critical terms bright red to make them pop out on the slide whilst you discuss them with the students.  I know you can do this too with LaTeX as that's the technique that I use for embedding equations in this blog, but I create the equations first in MathType and then after I've pasted them into here I simply edit a few colour tags.

To be clear, I'm not criticising anyone's writing setup, the key to writing is finding something that works for you.  But there does seem to be a trend on several social media sites to push for methods of writing that avoid mainstream packages.  I understand that money is tight nowadays and every penny counts, but I've managed to get myself a copy of MS Office and Mathtype together for about £60 all in, I'm sure that it can be done cheaper using something like LibreOffice that comes pre-installed with Ubuntu, but I take the view that £60 is less than an hour of my charge out rate when I was in industry and doing it this way will save me countless hours.

I do like peeking into other student's writing environments, both physical environments and their digital environments, but I'd love someone to explain to me why I should adopt LaTeX over Word and MathType, particularly given that I'll be embedding a lot of vector graphics from OmniGraffle and Visio and I'm really struggling to see how these other sorts of environments will help me write more efficiently, but then I guess it's horses for courses...

## Equations...

Turns out that my web provider now provides a SQL and PHP server with my base package and this was all the incentive I needed to give a self hosted WordPress blog a whirl.  To get a basic blog system up and running literally took me 5 minutes with the free WordPress software and using the export function I was quickly able to copy the few posts over from my free WordPress blog.

Now I have my own hosted service this presents me with several advantages over the free wordpress accounts, but there are two in particular that are attractive to me.  The first one is that I can now embed proper equations into a blog post using LaTeX and MathML by linking it into my equation editor MathType...

By adding in the 'LaTeX for WordPress' plug in for the hosted WordPress, I can now copy equations straight from MathType and paste them directly into my blog by following this procedure.

1.) Open MathType and prepare your equation.

2.) Go to MathType -> Preferences -> Cut and copy preferences; and then select MathML or TeX; then LaTeX 2.09 and later

3.) Highlight the equation in MathType 6.7d and then right click and select copy or press (⌘ + C)

4.) Find the position in your blog post where you want the equation to appear, then paste (⌘ + V)

Following this means that I can embed equations like the one below pretty easily, the only downside that I've found is that if you've colour coded your equation in MathType, none of this formatting will carry over when pasting, but the equations should work and be visible in any browser, certainly the main three and on the iPhones and Android devices that I've worked on so far.

With minimal tweaking and a little trial and error with the LaTeX code I was able to apply some colour tags to get the equation to look the same as it does in my lecture notes.

This might initially appear to be quite a minor thing, but I've found that colour coding my notes like this really helps the students follow the equations when I'm talking them through various parts of the equations and so I was keen to keep the high quality formatting on my blog.  One thing that I have noticed however though is that the equations appear much much sharper on mobile devices and Apple machines, whereas on windows machines they appear slightly pixelated.

As to the second advantage this is that I can now embed Wolfram Mathematica CDF files into my blog directly, which will help me share some of my examples with anyone interested in my research.  I'll write another blog post on this over the next few days...