# LaTeX and Word

**URL:** <https://boards.straightdope.com/t/latex-and-word/589198>\
**Category:** Factual Questions\
**Created:** [July 15, 2011, 11:25pm UTC](https://boards.straightdope.com/t/latex-and-word/589198 "2011-07-15T23:25:43Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [July 16, 2011, 7:49pm UTC](https://boards.straightdope.com/t/latex-and-word/589198/61 "2011-07-16T19:49:11Z")

</div>

> [@Stranger\_On\_A\_Train](#):
>
> No. The point is that many journals _require_ submissions in LaTeX format so that they can dump them directly into their typesetting system without having to completely reformat them.

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.

> [@](#):
>
> Nobody takes a Word file and just prints it into a book or journal; there is just no way for a commercial publication system to parse that formatting.
> 
> Something you don’t seem to understand that the text you see on the screen in your Word document is only a fraction of the actual data that is in the file;

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

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [July 16, 2011, 7:51pm UTC](https://boards.straightdope.com/t/latex-and-word/589198/62 "2011-07-16T19:51:35Z")

</div>

> [@Capt.Ridley\_s\_Shooting\_Party](#):
>
> The \LaTeX macro is not a keyword, it’s a macro. It’s defined as:
> 
> ```auto
> 
> \def\LaTeX{%
> L\kern-.36em
> {\setbox0=\hbox{T}%
> \vbox to \ht0{\hbox{	he\scriptfont0 A}\vss}}%
> \kern-.15em
> \TeX
> }
> 
> ```
> 
> So yes, you can do the same thing with any other word if you so wish.

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?

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [July 16, 2011, 7:53pm UTC](https://boards.straightdope.com/t/latex-and-word/589198/63 "2011-07-16T19:53:52Z")

</div>

> [@Stranger\_On\_A\_Train](#):
>
> Really? Do you use hyphenation in Word? Because it is one of the most absolutely broken, piss-poor defects in Word that most other word processors have actually learned to cope with. In fact, sometimes I think that Word has an intentional anti-feature to deliberately orphan hyphenated words. You spend ten minutes adjust text to get the orphan word on the next line, and then it jumps back to the previous one in toto, and then breaks when you try to print it. I can write a soliloquy that rivals Richard of Gloucester about the vengeance I would care to wreck on Microsoft for the lost hours of fixing craptastic hyphenation.

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?

---

<div class="post-metadata">

**Author:** ![MilTan](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@MilTan](https://boards.straightdope.com/u/MilTan)\
**Post date:** [July 16, 2011, 8:00pm UTC](https://boards.straightdope.com/t/latex-and-word/589198/64 "2011-07-16T20:00:34Z")

</div>

Wikipedia has a link to a pretty good deconstruction of the LaTex logo [here](http://www.tug.org/pracjourn/2005-3/walden-travels/)

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [July 16, 2011, 8:00pm UTC](https://boards.straightdope.com/t/latex-and-word/589198/65 "2011-07-16T20:00:46Z")

</div>

> [@Frylock](#):
>
> 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?

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?

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [July 16, 2011, 8:06pm UTC](https://boards.straightdope.com/t/latex-and-word/589198/66 "2011-07-16T20:06:35Z")

</div>

> [@Capt.Ridley\_s\_Shooting\_Party](#):
>
> The \LaTeX macro is not a keyword, it’s a macro. It’s defined as:
> 
> ```auto
> 
> \def\LaTeX{%
> L\kern-.36em
> {\setbox0=\hbox{T}%
> \vbox to \ht0{\hbox{	he\scriptfont0 A}\vss}}%
> \kern-.15em
> \TeX
> }
> 
> ```
> 
> So yes, you can do the same thing with any other word if you so wish.

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

---

<div class="post-metadata">

**Author:** ![Stranger\_On\_A\_Train](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@Stranger\_On\_A\_Train](https://boards.straightdope.com/u/Stranger_On_A_Train)\
**Post date:** [July 16, 2011, 8:22pm UTC](https://boards.straightdope.com/t/latex-and-word/589198/67 "2011-07-16T20:22:12Z")

</div>

> [@Capt.Ridley\_s\_Shooting\_Party](#):
>
> The \LaTeX macro is not a keyword, it’s a macro.

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.

> [@Frylock](#):
>
> You have _zero_ reasons to think I don’t understand this.

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.

Stranger

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [July 16, 2011, 8:34pm UTC](https://boards.straightdope.com/t/latex-and-word/589198/68 "2011-07-16T20:34:19Z")

</div>

> [@Stranger\_On\_A\_Train](#):
>
> 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.
> 
> Stranger

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?

---

<div class="post-metadata">

**Author:** ![Stranger\_On\_A\_Train](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@Stranger\_On\_A\_Train](https://boards.straightdope.com/u/Stranger_On_A_Train)\
**Post date:** [July 16, 2011, 8:59pm UTC](https://boards.straightdope.com/t/latex-and-word/589198/69 "2011-07-16T20:59:29Z")

</div>

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.

Stranger

---

<div class="post-metadata">

**Author:** ![Francis\_Vaughan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/francis_vaughan/32/3093_2.png) [@Francis\_Vaughan](https://boards.straightdope.com/u/Francis_Vaughan)\
**Post date:** [July 17, 2011, 12:01am UTC](https://boards.straightdope.com/t/latex-and-word/589198/70 "2011-07-17T00:01:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Musicat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/musicat/32/20189_2.png) [@Musicat](https://boards.straightdope.com/u/Musicat)\
**Post date:** [July 17, 2011, 2:05am UTC](https://boards.straightdope.com/t/latex-and-word/589198/71 "2011-07-17T02:05:44Z")

</div>

> [@Stranger\_On\_A\_Train](#):
>
> Really? Do you use hyphenation in Word? Because it is one of the most absolutely broken, piss-poor defects in Word that most other word processors have actually learned to cope with. In fact, sometimes I think that Word has an intentional anti-feature to deliberately orphan hyphenated words.

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.

---

<div class="post-metadata">

**Author:** ![Stranger\_On\_A\_Train](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@Stranger\_On\_A\_Train](https://boards.straightdope.com/u/Stranger_On_A_Train)\
**Post date:** [July 17, 2011, 3:15am UTC](https://boards.straightdope.com/t/latex-and-word/589198/72 "2011-07-17T03:15:53Z")

</div>

> [@Musicat](#):
>
> 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.

Stranger

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [July 17, 2011, 3:23am UTC](https://boards.straightdope.com/t/latex-and-word/589198/73 "2011-07-17T03:23:55Z")

</div>

> [@septimus](#):
>
> Another advantage of LaTeX over Word is the advantage of free and public versus paid and proprietary. My laptop came with (bootleg?!) Word installed, but it was zapped by a virus. Whenever I get a Word doc attached to e-mail I’m tempted to reply that some computers don’t have Word, but I don’t reply – it’s a lost cause.
> 
> (Yes, I know OpenOffice can read old Word documents, but you can bet MicroSoft is racing to obsolete such. If any ignoramuses want to defend MicroSoft please take it to BBQ Pit. In another recent thread where the topic of MicroSoft-Linux differences came up a Doper told me I was wrong; then in follow-ups admitted she knew nothing whatsover about OS’es.)

Microsoft offers a [free Word viewer](http://www.microsoft.com/download/en/details.aspx?id=4) for Windows systems.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [July 17, 2011, 3:29am UTC](https://boards.straightdope.com/t/latex-and-word/589198/74 "2011-07-17T03:29:45Z")

</div>

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](http://en.wikipedia.org/wiki/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.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [July 17, 2011, 3:52am UTC](https://boards.straightdope.com/t/latex-and-word/589198/75 "2011-07-17T03:52:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [July 17, 2011, 5:05am UTC](https://boards.straightdope.com/t/latex-and-word/589198/76 "2011-07-17T05:05:59Z")

</div>

> [@Chronos](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![Francis\_Vaughan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/francis_vaughan/32/3093_2.png) [@Francis\_Vaughan](https://boards.straightdope.com/u/Francis_Vaughan)\
**Post date:** [July 17, 2011, 6:06am UTC](https://boards.straightdope.com/t/latex-and-word/589198/77 "2011-07-17T06:06:46Z")

</div>

> [@](#):
>
> And while I think I could do this in Word,

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.

---

<div class="post-metadata">

**Author:** ![Hunter\_Hawk](https://avatars.discourse-cdn.com/v4/letter/h/50afbb/32.png) [@Hunter\_Hawk](https://boards.straightdope.com/u/Hunter_Hawk)\
**Post date:** [July 17, 2011, 7:14am UTC](https://boards.straightdope.com/t/latex-and-word/589198/78 "2011-07-17T07:14:56Z")

</div>

> [@Francis\_Vaughan](#):
>
> you can’t apply a style to a single in-line word.

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.)

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [July 17, 2011, 8:37am UTC](https://boards.straightdope.com/t/latex-and-word/589198/79 "2011-07-17T08:37:16Z")

</div>

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.)

---

<div class="post-metadata">

**Author:** ![Francis\_Vaughan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/francis_vaughan/32/3093_2.png) [@Francis\_Vaughan](https://boards.straightdope.com/u/Francis_Vaughan)\
**Post date:** [July 17, 2011, 8:47am UTC](https://boards.straightdope.com/t/latex-and-word/589198/80 "2011-07-17T08:47:43Z")

</div>

> [@](#):
>
> FWIW, this is incorrect; you can create “character” styles in Word.

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.

[Previous page](https://boards.straightdope.com/t/latex-and-word/589198.md?page=3)

[Next page](https://boards.straightdope.com/t/latex-and-word/589198.md?page=5)
