I love the idea of TeX, I really do. However, when I try using it I am always met with frustration and obstacles.

My latest frustration has come with using Emacs to author my prospectus. I’ve been using org-mode (which, has been awesome through and through), but when trying some quick latex exports, my unicode characters are absent.

Exporting the raw tex and compiling it myself reveals the problem, tex/latex don’t handle unicode input well at all and complains about the characters. I did some searching and the only answers I could find were to a) Use pure ASCII tex files or b) use xelatex. However, while xelatex doesn’t complain about unicode input, it doesn’t output it well at all. The inputenc package does give me errors about “not a keyboard character”, but not using it gives me the wrong characters.

I ended up just going through and switching all my unicode characters to their proper TeX escape sequences, but I wanted to avoid this. Then again, the only way I could get sub/super scripts was to use the latex escape sequences, so perhaps this won’t be so bad, but only because org-mode can pretty print them…

On a side note: Document types. Switching to “achemso” seems to require the \title, \author, etc tags to be before the \begin statement, which at the moment requires me to edit them manually after export. There might be a way to make a custom latex export function or something in Emacs, but at the moment I’m burnt out on tex formatting (which is why I love org-mode at this moment, whatever I do I can worry about formatting later, all my writing is neatly packed in enough info that I can export it to whatever I need to if anything goes wrong)

Addendum: I’m mid-prospectus (just shy of a draft) and have learned a few things.

1) The newest version of org-mode (7.5) does not play as nice with the pretty-printed latex sequences. Trying to edit them or append text after them (mostly with sub/super script) puts the text into the superscript and litters my file with unseen “^{}” sequences. I have since turned the pretty printing off. I will probably file a bug after this is all over

2) I don’t know how/why/whatever, but after switching from the pdflatex to just plain latex command (I need it for auto-pst magic) stops any trouble I had with characters.  After the switch, I noticed I had a slew of unicode characters being inserted from my bibtex file, and latex with inputenc handled them fine.

3) As much as I tried to avoid it while writing the initial draft, I did need to use some raw LaTeX sequences in my documents, and I have found http://en.wikibooks.org/wiki/LaTeX to the be the greatest resource I have found for LaTeX. It definitely helps me make sense of it and get less frustrated with it.

Also, the chemstyle, chemscheme, and mhchem packages are really cool. I’ve also used chemscheme to make my labmates jealous about what their word processors can’t do (and to justify the headaches I’ve given myself with LaTeX…)