jump to navigation

LaTeX gives me headaches! February 27, 2008

Posted by gordonwatts in computers.
trackback

For those of you out in the real world: you use Word or something similar to write all of your documents. In Physics we use two typesetting packages, TeX. Unlike Word, TeX uses text input files to fully describe the document being produced. This is not WYSIWYG!!

TeX’s inception was in 1977 (the first released version was much after that). Many people in the field of physics will disagree with me when I say that the output that TeX produces is ugly and hard to read (partly because of the font family it uses), and is quite hard to use – especially if you are an infrequent user.

For example, I am editor of a note in ATLAS that needs an internal and external version. The internal version is the same as the external version along with a bunch of extra material. I needed the equivalent of an if statement to turn on and off sections of text depending on what version of the note I was producing. In Word it would take me about 5 minutes to create a new style that would do this – because of the user interface almost all the options are basically “in your face.” When it came to TeX, however, I spent about 2 hours searching the web and trying to create my own commands to do the job before I finally stumbled on a good web page. What a waste of time!

That said, before people in physics think I’ve totally lost it, there are two things I think that TeX does better than word: handles long documents (like a thesis) better than Word, and deals with figure placement better than Word.

TeX is a macro language – built to solve a specific set of typesetting problems. It’s macro language is amazingly flexible and gives you access to almost all parts of the layout engine from its code. But its power is also its weakness for someone like me: I almost never need advanced features – so I can never remember what or how to access them. And, in fact, the TeX macros are so low level there are numerous packages on top of it (LaTeX is probably the most popular). Word exposes a full object model that you can program against in easily in any dynamic language (like the .NET version of python or VB) and with a little more difficulty, C++. However, my impression is for really complex typesetting jobs TeX is a bit easier to deal with. Of course, that is just it: as a physicist I rarely, if ever, need or want that level of control. And that is just it: exposing all of that means the TeX macro language is prohibitively hard to use.

Comments»

1. Georg - February 27, 2008

You can use pretty much whatever fonts you want to with TeX. Formulas typeset with Word look hideous, whereas with TeX most formulas look nice even without tweaking. If you use LaTeX, there is the ifthenelse.sty package to do what you want to do (and lots more). Finally, there are various WYSIWYG editors for (La)TeX if the markup is too much for you (though I find them awkward compared with the pure brilliance of TeX markup, but maybe that’s why [or because?] I’m in a computation-heavy field of theoretical physics).

2. Dave Bacon - February 27, 2008

Gordon, you’re crazy! I think you’ve been living in Seattle in close proximity to Microsoft for too long!๐Ÿ™‚

The reason most physicists prefer TeX (or LaTeX…are you really using standard TeX!?!) IMHO is simply for the “ease” of equation editing. When I was in grad school I did some speed testing on my entry of equations using LaTeX and the Word equation editor and I was about 30 percent faster using LaTeX. Plus as a theorist, I find that when I’m doing a detailed derivation in my notes cut and past of LaTeX is far superior to copying the word equations and modifying them.

And also, if it weren’t for LaTeX how would we know what papers were crackpot๐Ÿ™‚

3. Gregory Crosswhite - February 27, 2008

Have you ever tried using LyX? (http://www.lyx.org/) It essentially lets you edit a LaTeX document using a WYSIWYG front-end. I don’t use this myself, but many people seem to like it.

4. gordonwatts - February 27, 2008

Hee hee. I knew this entry was going to get lots of comments!

First off — as I said in the post: I totally agree that the way you enter equations in TeX is much more natural than what you do in Word. In the latest release of word, 2007, it became a lot easier than it used to be — but TeX just feels natural if you have to enter lots of equations – and is faster, I think.

The other thing is word just doesn’t seem to handle floats well (figures, tables, that move from where they are inserted). Especially when you try to attach a caption or similar.

Finally, TeX seems to be better at handling a long document.

For these reasons I continue to use TeX and I am likely to do so for the forseable future for anything technical. However, I will use Word whever I can otherwise: it takes seconds to start a new document. TeX is never that fast; always need to grab an old file, gut it, and start again. My big problem with TeX is that when I need to do something slightly out of the ordinary I have a fight on my hands.

Next: I am an experimentalist, not a theorist. I’m sure if I was, I’d be much more familiar with the inner workings of TeX.

Georg, thanks. I was not aware of the ifthenelse package – I discovered the comment package and that seems to work rather well. I don’t totally agree with your comment about the markup being brilliant (I also find it interesting that you call it markup; I don’t think of TeX as a declaritive language, the way most markup languages are, like HTML – it is more like a real programming languages with if/then/else statements, etc.).

I first started using Word when I was a postdoc, Dave, back in Providence, RI.๐Ÿ™‚ But it totally agree with your comment on equation editing.

I’d not tried LyX. I took a quick look — I’ll try it, but it looks like it may not allow me to use custom packages and styles, which are required by the journals and also the ATLAS experiment. But thanks!

5. Dave Bacon - February 28, 2008

In a related note I see that the arxiv is accepting word documents: http://arxiv.org/new/#feb2008

6. D - February 28, 2008

Word is generally better than TeX.
TeX is good at image placement.

I’m finding it remarkable anyone would hold even one of those views. To see them both held by the same person is amusing๐Ÿ™‚

7. gordonwatts - February 28, 2008

Greg — thanks for the suggestion of LyX. I tried it out — unfortunately, it looks like it takes a .tex file and imports it into its own format, and then later it can emit a new .tex file. Unfortunately, the layout of this document is already defined – there are about 5 of us working on it and we have all the source files in cvs – so we have to keep the layout structured to edit it that way rather than the LyX way. But if I need to do something on my own this might be good to look at!

D – what do you mean?๐Ÿ™‚

Dave – really! Wow!

8. arXiv Accepts OOXML!? « Life as a Physicist - February 28, 2008

[…] Posted by gordonwatts in computers. trackback This just floored me. Dave mentioned this in a comment in one of my last posts. It looks like the major pre-print archive accepts the OOXML format now. I […]

9. MIke M - February 29, 2008

Lovers of latex/cvs be forewarned: After writing a multi-author review paper and typesetting it to perfection in latex, the first thing the journal did was to send it back as a word document with the instructions to “track changes.” Long story short, even merging our individual comments required an install of Parallels and XP on my mac. As much as I hate to say it, I fear that the days of tex are numbered.

10. gordonwatts - February 29, 2008

Bummer!

Many journals use a typesetting tool of some sort, internally, to layout the actual magazine. I suspect many of them are setup to import common formats – and TeX isn’t one of them.

So, how did the formuli come out in the conversion? Ok?

I like Word’s track-changes features, but I have to say that when multiple people send me changes it doesn’t always work well.

11. MIke M - February 29, 2008

We survived the merging of changes, and the formulas came out great, although we couldn’t edit them ourselves in the end (painful). What I would like is a plugin for word that allows you to type tex on the fly and then latex within the document. Double click a formula and go back to the raw tex commands, etc. Pages/LatexIt has this on my mac and it’s wildly efficient. I’ve never looked into what object interface (if any) Office exposes, but somebody’s probably already written this plugin for word and I just don’t know about it.

12. gordonwatts - February 29, 2008

I’ve seen formula plug-ins for PowerPoint. The problem is the object interface that is exposed by Word doesn’t work inline — it inserts things as if they were figures, I think. But you are right; someone has probably written something already.

For PPT I see: http://users.ecs.soton.ac.uk/srg/softwaretools/presentation/TeX4PPT/

(a search latex powerpoint turns up a bunch).

http://latexinword.sourceforge.net/ is something for Word, it looks like. I’ve not tried any of these, but now that I’ve publically complained, I guess I should.๐Ÿ™‚

13. carlbrannen - March 1, 2008

Well I’m a crackpot and I wouldn’t dream of using anything other than LaTeX. Furthermore, if you are having trouble remembering the stuff, a WordPress blog is a great place to practice because it is available here.

Uh, e^{i\pi} = -1

14. gordonwatts - March 2, 2008

That is pretty neat — it comes in as a figure. Of course, the background doesn’t match the blog’s background (i.e. it isn’t using transparency). But that is pretty nice.

15. Norman - March 10, 2008

Gordon, why don’t you just upgrade to the professional version of Equation Editor? You get everything you’ve asked for, and more, for $57.
http://www.dessci.com/en/products/MathType

I’ve always considered the placement of figures one of the weaker points of LaTeX.

16. Xav - September 3, 2008

If you know LaTeX, you might find this link useful:
http://sites.google.com/site/tex4ppt/

17. HC - September 4, 2008

My opinion is that Latex allows for total control over the document content and structure. WYSIWYG word processors are not quite living up to the promise of what you see is what you get either! A backspace in the wrong position may result in a large amount of document changes regardig margins, font attributes etc.

In the end I presume each has his/her own preferences according to their style of work. After 20 years using word, I changed to latex a few years ago, and now even letters are faster to produce in Latex than word. My suggestion is, switch to Kile, take some time learn to use Latex with the huge amount of packages available out there, and enjoy life. But if your idea of fun at the computer includes Word, so be it! ๐Ÿ™‚

18. HC - September 4, 2008

O yes, Powerpoint – I switched to using pdf’s for presentation. I can not do “inline” movies, but the documents are really small, full featured Latex documents, and display or every computer that has a pdf reader. Great for academic presentations.

19. Gordon Watts - September 4, 2008

Hmmm.. I wonder what has caused the sudden interest in this post – more than 6 months old? At any rate – thanks for the updates!! I didn’t realize that tex4ppt had been updated for 2007. That is great. I’ll be trying that out.

HC — your basic message is right — whatever set of tools you are comfortable with to get the message (and the science) out you should use!

And you mention the backspace. I was just working on a 15 page paper and we added several words and suddenly TeX was crashing — ran out of memory because too many floats had accumulated. For some reason (that we could never figure out) it wasn’t setting the figures until the end of the document. Adding a clear page fixed it. But the point that a small change can have global consequences is true for just about all of these programs. I think it has more to do with the nature of the problem they are trying to solve. LaTeX I’ve always found does better at typesetting figures and forumuli than does Word. But Word is a lot simpler to use (I suspect the other WYSIWYG are similar). I tend to use LaTeX for the science papers, and Word for just about everything else.๐Ÿ™‚

And PPT. I have never been able to effectively use LaTeX for my talks. Everything is bullets – sort of the worst of PPT. In order to do something different — a different layout, or draw arrows on top of figures, etc., you have to go to a lot of extra work!

20. Niek Tholen - October 14, 2008

My simple way of excluding part of the material (your original question was about that?) is to define a command like \opt, that normally simply prints its argument, unless you switch it off:

\newcommand{\opt}[1]{#1}
\newcommand{\tidy}
{\renewcommand{\opt}[1]{}}

You can of course ask \tidy to do more fancy things as well.

21. Alpheus Madsen - February 1, 2009

I’m a mathematician with a strong computer programming background, and I have a love/hate relationship with LaTeX myself.

I find it’s very easy to use if you want to write a letter, or a simple document; as with you, though, I sometimes want to do more complex things, and it can take a while to find out how to do it!

On the other hand, whenever I try to use anything else for equations, LaTeX is clearly superior! (And, with the exception of WordPerfect 5.1, LaTeX is better at writing standard-format business letters, too.)

22. legend of mir - February 13, 2009

Use microsoft word for sure.

23. no one important - August 31, 2009

I can’t help myself….there is a LaTeX package called beamer that makes slides for presentations that are much nicer and easier to modify than PPT.

24. Gordon Watts - August 31, 2009

ha! I think this thread will be alive for years to come. I’ll check out the beamer package – but I have to say I can’t imagine anything making TeX easier that PPT unless you are heavy on equations!

25. Ander - March 14, 2010

6 or more months….

Open Office instead of MS Office. Somethings like presentations I believe are actually better. You can save on ppt for others.

I recently discovered LaTeX and am growing tired of WYSIWYG. I am actually learning on my free time almost as a hobby. I’m an experimentalist with little know how in programming.

Recently learned tu put background images for thumb indexing with \wallpaper (or similar), you can also use \fancyhdr for doing movies on the pages… So many nice things to do! Maybe you can do thumbindex with word but I’m just tired of word after 20 years of fighting with moving figures and heavy documents…


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

%d bloggers like this: