Today is Sunday, exactly a week since I realised that my referencing application broke my PhD by mixing the thousands of footnotes that I have. It was around 8am. I had waken up a few minutes before E., made us some coffee and turned on the computer. The plan was to keep editing until the bloody PhD is done. The night before, I was editing the “Conclusion” chapter and I noticed that its only reference was misplaced. I assumed that I had made a mistake, corrected it and called it a night.

The morning after, on Sunday, sitting at my home desk drinking coffee at 8am, I decided to go over the references to catch similar mistakes. It was during that time that E. entered the room, right about the time I realised that all my footnotes (more than a thousand) were messed — they were both wrongly numbered and wrongly located. I was already in a lot of pressure before that. I had set myself a deadline to send the corrected draft to my supervisors by Wednesday night. I teach all day on Mondays, therefore I could only work on the thesis on Sunday, Tuesday and Wednesday. A corrupted document was quite literally the last thing I needed.

It taken me around three hours to locate the problem. Having eliminated all other possibilities, it became obvious that the issue was either caused by the track changes feature of Microsoft Word or by Endnote. If it were the former I could possibly find a solution since other people would have already dealt with similar issues and a likely remedy could be found online. If it were the latter then the situation would be more difficult, because there are a lot of additional — external — steps involved and considerably less customer base for troubleshooting, and therefore less information available online. Unfortunately, by noon, it became obvious that the problem was caused by Endnote. I then tried to rearrange the footnotes by using a small programme within Word (a macro) in order to restore them to their correct location but, as these things go, it didn’t work.

It was afternoon and I was becoming increasingly aware that my day was being wasted. What was supposed to be a very productive day became one of anxiety and frustration — “how could this happen to me?” I kept thinking. I have more backups than one can imagine and my document follows judiciously all the good practices of Word. Three and a half years everything worked smoothly; how could this happen to me, and why, oh why now? E. was no cooler than I was. She was upset and worried, eager to help. When she is stressed she gets aggressive. So my raw anger and her aggressiveness made a rather explosive mix — and the document was still corrupt, no actual work was done and the clock was ticking for the Wednesday evening deadline. By then it was afternoon. I wanted to try a few more things, send an email to Endnote and plan my week factoring in the new obstacle. I decided to cut my losses. I only gave myself a few hours to try whatever could be tried. By then it was evening. I decided to stop attempting to fix the document, leave it aside, and deal with the issue after Wednesday. In the meantime I would keep editing the document with the messed up footnotes.

In the evening we went for dinner. Throughout the dinner I was thinking whether I should keep the PhD in a Word document using Endnote, or move it to LaTeX using BiBTeX. I understood that no matter what, I could no longer trust my current — Word and Endnote — setup. I had no guarantees that the same thing would not happen again a few days later. LaTeX and BiBTeX it was then.

The LaTeX solution had problems of its own. For one, it requires more technical skill. That wouldn’t be a massive issue because I used LaTeX extensively in the past. But, until then, I had almost no experience with its referencing system (BiBTeX) and I didn’t know how much time it would take me to move the text over from Word. Still, I decided that it was a gamble worth taking.

On Monday I spent my breaks between seminars and the whole of the evening trying to make LaTeX play well with BiBTeX. I also coded the design (the .sty files) of the new LaTeX document. On Tuesday morning I moved my references over to BiBTeX using a small shell script, and in the afternoon I continued editing the thesis for the Wednesday deadline. On Wednesday evening I sent the corrupted and edited Word document to the supervisors and had a beer at the pub before resuming work on the LaTeX document.

The plan was to complete the migration as soon as possible in order to have time to proof read the whole PhD before submission. The migration was completed on Saturday afternoon. The PhD is now in LaTeX and all the references work. It even looks better now — the typography and document design are much more elegant. This means two things. Firstly, that I can actually start reading the text rather than just move it around (remember that I had to reinsert each footnote one by one). Secondly, that today I can take a couple of hours off to watch the final F1 race (the only sport that I actually enjoy watching) and maybe cook Cypriot beans with parsley and smoked fish, which need time. Tomorrow will all be gone to teaching and “advice and feedback” but from Tuesday until the next Sunday I should finish (and submit?) the PhD. Then I will take a beer bath.

In all this, the official support from Endnote was amazing. They volunteered to sort the document out, and when they realised that it would take them more time than initially estimated, they emailed me to reassure me that they were working on it. Nevertheless, by the time they returned the document to me, I had already completed the migration.

If there is anything to take from this is that open and tried formats and applications are always better for troubleshooting, and that plain text will live forever and won’t get messed by a crappy word processor or a buggy third-party programme. Word is fine for small documents, but it doesn’t scale well. If you are someone working with large text, then do invest some time learning how to write in LaTeX and how to use sophisticated text editors like Emacs (calling Emacs a mere “text editor” sounds like a sacrilege, but you get the point).