Warning: Parameter 1 to wp_default_scripts() expected to be a reference, value given in /www/sites/d9f/541/www.monkeyshines.co.uk/web/blog/wp-includes/plugin.php on line 600

# Monkeyshines

## Introduction

I’ve resisted learning TeX/LaTeX for years; I appreciate the principle, but I baulk at the idea of learning another language, particularly one which requires a bunch of opaque commands at the top of each file. I like a nice GUI, and Word, for all its faults, does give you lots of control if you use the styles correctly. And the EndNote Web plugin allows you to sort out referencing without too much pain.

And yet, and yet… LaTeX is the right way to do things, from a typesetting viewpoint, and also because it correctly places the emphasis on content. What’s a graphically minded chap to do? I recently discovered LyX, which claims to fill this gap in the market. I thought I’d see how easy it was to turn out a nice looking document with LyX by replicating a Word doc that I was intending to post on this blog (on tree comparison).

## Citing References

To make life a bit easier for myself, I shelved sorting out a BibTeX library, and just copied the references from the Word doc. Getting the citations to appear correctly was trickier than I thought it should be; it was easy enough to change the document settings so that the bibliography was ‘natbib’ format. But then I had no control over the precise display of the citation, e.g. (Mackenzie, 2011) versus Mackenzie (2011). I resorted to writing the TeX tags directly, aided by an excellent Natbib reference sheet. But then I got some errors when compiling the LyX document in PDF format. After a bit of digging, I determined that the `\usepackage{natbib}` had disappeared from the LaTeX preamble – other than entering it manually, I couldn’t figure out how to get it back.

Getting a header was also somewhat convoluted, and again involved dipping a reluctant toe into grimy TeX-infested waters. I had an intermediate problem in that the help within LyX is not searchable, which seems odd; but the interwebs told me that I needed to switch on fancy headers in the page layout settings, and then amend the preamble again (grrr) with `\lhead{}`, `\chead{}`, and `\rhead{Tree Comparison - James E. Allen}`. You need the empty definitions to suppress default headings, which seems more annoying than useful.

## Results

I used Word’s built-in PDF-saving (it’s version 2007, btw), and created two versions, with and without automatic hyphenation. (I also switched on kerning in the hyphenated doc, but I couldn’t see that it had any effect…) For the LyX document, I used the XeTeX PDF exporter, since I wanted to use my favourite Windows font, Georgia.

## Verdict

LyX wasn’t as straightforward as I’d hoped, but now that I’ve sorted a few teething issues, I think I could use it in future with a minimum of fuss. As to the results, I think the LyX-based document looks the best; the Word version without hyphenation looks quite gappy, and the automatic hyphenation isn’t great. The LyX file has too much whitespace above the title for my liking, and I’d prefer gaps between the paragraphs rather than indentation, but I daresay I can find a different layout that I like better. The wider margins make the text more readable, but it is odd that “weighted” juts out into the right margin; I couldn’t figure out why, but I could fix it by adding `{sloppypar}` tags around that paragraph. (The LaTeX wikibook is excellent for figuring out stuff like that.)

 Name (required): Email (required): (will not be published) Website: