Thursday, February 23, 2006

Latex + Emacs vs. MathType + Word

Recently I had to write two simple scientific documents. Their subject and structure was similar, so I decided to compare Latex + Emacs and Word + MathType.

Emacs was Aquamacs, standard version, configured to work with Texniscope. You can read my last two posts about Aquamacs w/th Latex and Texniscope. Aquamacs is itself almost configured: of course to use its extended capabilities you should already know Emacs. If you are a novice, you may want to try TextMate or BBEdit instead, or maybe TexShop (search google for them ☺).

Please notice than when I speak about Emacs, I assume Auctex is configured and working. This is the case with Aquamacs, which comes with Auctex bundled. Other Emacs installations already include it (and if you use GNU/Linux or FreeBSD it should be easy to install the package).

MathType was able to handle the equations: for example some equations used in computer science are really hard to express with MathType. So this is not a test intended to prove that latex is more powerfull. This is known.

While Word is a wordprocessor meant to write and quickly format texts (this is not perfecly true, since Word includes some functions that are part of a publishing software), Latex is a full environment meant to produce documents ready to be published.

We already know that Latex is more powerfull than word. We are now comparing Latex and Word on Word's own field: small simple documents.

Crashes

The main problem I found with Word + MathType were errors. MathType tends to crash in unexpected ways. This is not usually a problem: the rest of the document is not touched (and Word itself does not hang) and you lose only the last minutes of work.

The first thing you do is close Word and reopen it. Everything will work as usual. Unfortunately crashes anger me a lot, and I tend not to be able to continue working. I find overly annoyinh to redo the same job twice.

On the other side Latex and Emacs never crashed. In fact I have never seen Emacs crashing in my whole life.

References

Using references with MathType and Word is not difficult. You can create a numbered equation, then say you want a reference to an equation and double click the equation number. This is pretty simple: unfortunately if you have a long Word document, you have to manually find the equation you want to reference, and this is not quick. You have to manually find the equation.

With Emacs you can say you want to put the reference of an equation and it will present a list of all equation (you can read the label and the equation itself) from which you chose which equation to reference.

If you use Emacs(Auctex) facilities to create sections, subsections and such, the editor encourages you to label them. This way you can also reference theorems and sections. Moreover it's terribly simple to use, while Word's referencing facilities are less powerful and more complicated to use.

Symbols

This is not a problem, in this case: in this document we are using only basical symbols. If you need more symbols, while amslatex (which comes with standard latex distributions) provides them, MathType does not (well, you have to find a font that uses them, change the font and everything).

Bugs aka "Copy and Paste"

With MathType and Word you cannot copy equations. This is a known bug. If you just select an equation within Word and copy or cut and paste it, Word will say it's not able to save on "current volume". Changing volume does not help. You have to "convert" all equations. It is a command from MathType menu in Word, easy to call, but slow to complete, if you have many equations.

This bug usually does not apply if you drag n drop, but I'm afraid this is not always true.

If you want to copy and paste, you have to double-click on the equation to open it in MathType, copy the equation in MathType, create another equation in Word (and this opens it in MathType), paste the old equation in the new one. I don't like this.

Copying equations (or part of them) with Latex is simple and fast.

WYSIWYG

Of course Word + MathType is a full WYSIWYG environment. Emacs is too. You can "preview" equations and pictures in the document (that is to say inside Emacs buffer you see the rendered equations). Of course to do this you need an Emacs with graphic capabilities, for example Aquamacs or X11 GNU Emacs or XEmacs; it does not work with the textual version ☺.

Conclusion

Of course to use Latex you need to learn Latex (but to learn how to use advanced Word features, you have to study too). And to use Emacs, you need to understand a bit how it works, even if an environment like Aquamacs can be used with little knowledge about Emacs (don't know similar Emacs versions for Windows, still I suppose they exist).

But this allows you to be much more productive in the middle and long term. Moreover Aquamacs (or Emacs) is free and so it is Latex. Word + MathType costs a lot. Moreover Emacs + Latex is cross platform. You can work with people using Macs, Windows, Linux, FreeBSD, everything they like. You can edit their documents and you can easily publish your results in PDF on the web. You can also send your files to an editor, until some time ago Latex was one of the few formats accepted by scientific magazines.

No comments: