The Joys Of Edge Cases

I use the word processor LyX to write my books in, and have done for several years. I’ve recommended it to everyone I can — I believe it’s the best word processor, by far, I’ve ever come across.
However, I’ve just hit on an annoying bug while formatting the California Dreaming book.
In previous books, and even in the original drafts of this, I’ve been italicising song titles, but in this one I’m trying to use Oxford style, just because I use that at work and it’s easier for me to do proofreading if I don’t have to context-switch so much. So song titles are going in quotes, so where before I’d have “One song they came up with was a variant on the formula Brian and Mike had hit upon with Surfin’“, now I have “One song they came up with was a variant on the formula Brian and Mike had hit upon with “Surfin’”.”

Or at least, that’s what I type.
You see, LyX uses LaTeX as a backend, and LaTeX was designed for seven-bit character systems. So LyX converts the apostrophe and double quotes into three single quotes, sends that to LaTeX, and then LaTeX converts that back into double quotes and an apostrophe. In that order.

So every time I have an apostrophe followed by a double quote in my text, I now have, in the output, a double quote followed by an apostrophe.

In a book full of writing about songs like “Surfin'”, “California Dreamin'”, “Everybody’s Talkin'”, and “Willin'” (which has been annoying me anyway. What IS it with 60s songwriters and dropped gs in titles?!). Oh sorry, make that “Surfin”‘, “California Dreamin”‘, “Everybody’s Talkin”‘, and “Willin”‘

This isn’t something that would come up normally, because in normal situations you don’t end something in quote marks with an apostrophe — there’d be a full stop or a comma before it — so it’s a bug I’ve never hit before. But it means I’m having to go through and do a workaround, pasting in a little bit of LaTeX code every time there’s an apostrophe followed by a quote mark (and I can’t even do it programmatically, because for some reason LyX’s search is borked when it comes to quotes).

(The code to use, BTW, is \textcompwordmark if anyone else is having this problem).

I finally discovered the cause of the problem and the workaround when I found the one other person on the Internet who’d ever had this problem, which took a *LOT* of googling (because you can’t use quote marks to search for an exact phrase when the exact phrase you’re using has quote marks). The problem was reported to the LyX-users list, and the response eventually came back:

I do not know whether the problem is worth fixing now, but I’ll add it on the bug list.

That was in June 1999, so I don’t expect a fix any time soon…

NB, I still think LyX is the best word processor I’ve ever come across, bar none. This is the first actual bug I’ve ever experienced in it, and that’s after intensive use for five years. And the number of obstacles it removes when compared with Word or LibreOffice or their ilk make it an utter joy to use overall. Please don’t let this put you off using it.

But I had to vent. Most Word processors are fine for 90% of documents but fail horribly for the other 10% — including most of the documents I want to write. LyX is fine for 99.9% of documents, but failed horribly here because of people who think dropping gs in their song titles makes them look cool.

This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

9 Responses to The Joys Of Edge Cases

  1. bzfgt says:

    No Gene Clark in the book?

    • Andrew Hickey says:

      No solo Gene Clark, but he features in the discussions of Mr Tambourine Man and Eight Miles High. I considered covering his later stuff, but he doesn’t really interact much with the “story” after leaving the Byrds — he was doing his own idiosyncratic thing rather than part of a scene — and I’m including things as much because of the way they illustrate relationships between different artists as because of musical quality.

  2. cruth01 says:

    Fair enough, I just asked because I dig him more than because I think he needs to be in your book…

  3. cruth01 says:

    I have no idea why I’m someone else sometimes.

  4. Wm Keith says:

    If only LyX insisted on double spaces after a full stop. I can’t work any other way.

    • Andrew Hickey says:

      You can still type two spaces, it’ll just not register the second one — it actually typesets a large space, about one and a half times the size of an interword space, after each full stop.

      • Wm Keith says:

        Yes, but that’s just not the same – unless it has the options of displaying a (double) space after a full stop as a special character on screen and typesetting a double space rather than the large space. Oh dear, I think my ability to learn new wordprocessing skills peaked with WordStar and Locoscript and juddered to a halt after WordPerfect.

  5. Craig Smith says:

    Small world Mr Hickey! I have recently met one of the major contributors to the Lyx project who asked me to review a couple of code changes in the GIT repository. On a wider google search I found this blog and then you. Several Google searches later I established that you ‘are’ you and apparently we were good friends at school together :-). I will have a look at this double quote issue as I think I might have a way to resolve while I’m playing in the code base.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s