LaTeX and Word

I’ve never seen anyone who requires it–again, like we said above, probably because I don’t work in a field that typically requires complex typesetting.

Stranger, we were getting along so well. You have zero reasons to think I don’t understand this.

Wow okay then!

Too bad the wikipedia article doesn’t explain that this is involved in the given example. But having seen the above, I am impressed–and mostly convinced that LaTeX (at least, much of it,) is not for me. But now I have some reason to think so, so I’m in a better position to explain why to my enthusiastic friends.

OTOH I really want to know how to interpret the above code, just for my own curiosity. Is there a good “dictionary” style explanation of LaTeX keywords somewhere online?

I’ve never experienced this problem. That I know of.

By “orphaning” do you mean putting an entire hyphenated word on a line without breaking it into two lines?

Wikipedia has a link to a pretty good deconstruction of the LaTex logo here

Okay, googling has explained this to me.

I’ve honestly never seen (or at least, noticed?) this happening when I work in Word. (My experience is with Word 2007 and Word 2010.)

But I don’t know, maybe I just didn’t notice it. Are there contemporary examples of a modern version of Word with widow/orphan control on, where it can be seen that Word fails at this?

Of course, this code doesn’t explain how to handle the final “TeX”… :slight_smile:

And furthermore, you can write your own macros for customizing the formatting of any text or object, and then reference them simply. I suppose it could be argued that you can write VBA scripts in Word to do the same thing, but with nowhere the level of simplicity and clarity. In the case of LaTeX, the macro is part of the formatting, and if you want to change it, you alter the macro and every object that references it changes, too. In Word, you would have to go in an reformat every object. (Don’t get me started on graphs in Excel.) If you want to see how seriously mangled the formatting in Word is, take a complex document and export it to HTML, and then start looking for orphaned tags and formatting isolates. It is generally just a complete mess.

You said, “…instead of formatting the thing myself in Word according to their specifications, I can just type the text, label its parts, and apply their template.” That statement appears to lack the comprehension that the formatting in a compatible typesetting language is part of the information that is required. It’s not enough just to give them text, even text that is visually identical on your screen to how the journal article should look; you need to provide all of the formatting data so that figures and citations are correctly referenced. This content is part of the paper, and the journal can’t do or fix this formatting for you, nor can they parse it from a Word file.


My understanding is that the LaTeX template provided by the publisher contains all the formatting data. I thought the idea was, basically, I use LaTeX code to say “this is a chapter heading,” “this is a bibliography entry,” etc, and the provided template can then be used to compile all this together with the content these labels have been applied to, to produce a finished document.

Not correct?

A publisher may provide a template for things like headers, columns and citations, or may just plug the submission (already in a LaTeX format) into their template. The author, however, needs to provide the formatting for figures, tables, and other objects. The point is that having the text and other readable content separate from the formatting allows the publisher to easily put it into a printable format.


I think the point should be made that you can indeed just about sit down with a blank file and “just write” text and have it formatted with TeX or LaTeX. There was a time when I used to write almost everything in TeX (this was pre LaTeX). It is just as simple as writing in word. The only difference is that if you want to add a style change, the code to do it is in-line, and visible. With little more than half a dozen TeX command a nice one pager with title, headings, signature could be created. A letter can be a file with nothing but the letter text and a single include statement, plus a couple of macros to define the recipient. Yet you would end up with a fully formatted letter with custom letterhead and signature ready to post to anyone. You can set similar things up in Word, but again you have all the Word cruft sitting there. The point here is that in TeX it is, if anything, much less work, and simpler. A stack of form letters can be automated with a simple script. Word provides for form letters, but you are again locked into a weird world of Word special operations that are opaque, and only operate with Microsoft components.

Trivial nice things.

I write a line of text within which I want to have words formatted in italics. I simply wrap the word in {\it foo} and the word foo becomes italicised. In Word of course I select the text and apply the italic operation. I can define my own macro to do what I want and use it. I can change the operation of that macro whenever I like, and it will only apply that changed formatting to those bits of text it applies to. For intsance, what if I have different reasons to italicise the words? LaTeX interestingly adds the \em (for emphasis) macro. By default it will italicise the text. (The difference is interesting. \it is defined to mean - switch to the italic version of the the current font - \em is more intelligent, and is tweaked to make the emphasied text look a little better than just a font switch, and what \em does is customisable to do whatever is needed - whilst the apply italic operation in Word is both not customisable, and not findable in your text.) But, depending upon the style sheet \em will do its work in different ways. And those different ways can be applied in local context. I could have a specially formatted paragraph which defines a region in which the formatting definitions are different, and all the modifiers to the text style automatically change in that region - with no need to touch the source text. I can cut and paste new text into the region and all the new definitions will apply. Can’t do that in Word. Again, Words closed view of what it will let you do. They designed a user level motif of how the system operates, and closed you into it. In many ways Word is astonishingly primitive. It is a stream formatter with invisible embedded formatting. Everything else is a kiuge to force that formatting into the stream. For instance, contemplate the meaning of the paragraph break. In Word that is where your format lives.

I’m not a fan of Word, but they do have some controls and features that you might check out, like the hyphenation zone and non-break space character.

Which ends up garbling the formatting even worse than having to cope with orphaning, especially if you have figures interspaced within the text.


Microsoft offers a free Word viewer for Windows systems.

Forgot the pre-quote part from the last response, so here’s what it should’ve said:

Aside from all the other nice things about LaTeX–and don’t kid yourself, being able to use real version control is worth a king’s ransom–one of its key selling points is that you can define your own bits of the language. You can make individual symbols, new environments, or even whole new stylesheets. The extension that I’m most familiar with is Sweave, which allows you to embed R code in your tex files that’s run at compilation time. If you want to have a table that lists the output of some computation, you just write your code to output the code for that table, and hit go. If you want to do the same in Word, you’re going to be doing a lot of copying and pasting.

Or another example, to show that this stuff isn’t just useful for scientific papers. Suppose I’m writing a sourcebook for a role-playing game. I decide that I want the names of spells and magic items to stand out in the text, so I put all the spell names in italics, and all of the magic item names in boldface. OK, you can do that in either. But now suppose that after I finish the book and I’m looking through the first draft, I decide that I don’t like the way that looks, and I’d rather make them different colors instead. In Word, I’d have a big job ahead of me. But in LaTeX, if I’m smart, I didn’t actually use bold and italic tags, I defined \spell and \item tags, and all I have to do is change one reference near the beginning of the file to change all of the text. I could even, if the rules are being viewed on a computer rather than on paper, make all of the references to a spell links to the place where I describe the spell’s effects. You could probably do that using find-and-replace, but the name of a spell might be an ordinary word that shows up elsewhere, and might even show up in italics or color elsewhere.

Another great example.

And while I think I could do this in Word, I think that habitual LaTeX (or similar software) use is going to make a person more likely to have thought about defining these specific styles ahead of time.

Currently I don’t think you can. This is the difference between a format and a style. Formats are not first class objects, they don’t have names. Styles do, but you can’t apply a style to a single in-line word. And as I wrote earlier, there is no way to tell if a style or format applies to a bit of text without selecting it and interrogating it. Which is tedious at best, and makes more powerful operations impossible.

FWIW, this is incorrect; you can create “character” styles in Word.

(Granted, I’d personally be a bit nervous about it, and would prefer the LaTeX approach.)

One key point has only been hinted at. OP said he didn’t like just “hints,” so let me make it explicit.

With TeX/LaTeX all input comes via keyboard; a simple text file arises which is the record of your keystrokes, and which reproducibly creates your desired output.

With MS Word, mouse movements and clicks are used. Is it even possible to easily use the full power of Word without using the Mouse at all? (Fight my experience; I know very little about Word.)

The advantage of keyboard-only over keyboard-and-mouse may not be clear. Indeed some may think the latter is obviously better since it’s “more powerful.” But suppose that you’ve created a complicated document but now want to make major systematic changes to it. For example, you might want to change all italicisations to bold-facings and vice versa. Would that be easy to do in Word? With LaTeX it would be a straightforward task using your favorite text editor, or ‘sed’ program. (Maybe there is a special command to do it in Word, but with LaTeX you don’t need a special command; just routine use of a simple tool like ‘sed.’)

Or, you might see a nice-looking feature in a document and think “I want to do that.” With LaTeX, you Use the document source, Luke!. With Word … what? Is there a record of the mouse movements and clicks that led to the desired effect?

Reversing italic/bold may be a contrived example. The important thing is not whether that specific change is useful, but the fact the pure-text input is always amenable to operations like this, using simple standard tools.

(I’ve converted LaTeX text to Html text (though losing math formatting) with little trouble using only my own wits and fingers. The vice versa might also be straightforward. To do such a thing with a Word Doc might not be feasible except with proprietary software.)

Ha!! Quite correct. I had a feeling they had eventually worked out this issue, but I couldn’t see how to do it. I take that bit back. You can also turn on coloured highlighting of style application. That makes it a lot more useful. So at least those objection are mostly addressed.

I have both LaTeX and Word on my Mac. Sometimes life gives you lemons.