LaTeX and Word

It’s OK. But it gets tedious when you have a lot of math symbols and equations in your document. Not just equations in separate lines, but a lot of snippets of equations scattered throughout the text. For example, take this sentence:

There are 4 equations in that one sentence alone. You just use the same font as the rest of the text, or italics (as I’ve done above), but formatting each one as an equation improves readability. It’s tedious to enter each one with a Word equation editor, much easier with LaTeX.

Exactly the kind of thing I was thinking Word or insert image of MathType sucks at, scr4. AFAIK, your example just can’t be done neatly with Word or an image insert from an external equation editor.

Also, to rub salt into Word X’s wounds, the tables or inserted/imported tables or spreadsheets are not clearly editable by using markup, instead of their little GUI interface. That’s just an aside – I don’t use that feature, but friends do, and they complain plenty about it.

Works fine for “college” math homework, Word does, but not for the kind of math that matters.

Tex and LaTeX documents always look so much better. People can and do publish books typeset in TeX and LaTeX at a professional level. Many test books are so published. After all that is the genesis of TeX. Knuth wrote it because he wasn’t happy with the inconsistent style his books on The Art of Computer Programming were published with.

Absolutely. Proper, industrial strength, version control. This isn’t just change tracking. It can cope with multiple authors, handle multiple source files, reversion to any version, selective reversion.

TeX and (and thus LaTeX) are at heart, programming languages. This makes them astonishingly powerful. You can paramaterise each run, with parameters that control any manner of questions. Different formats, different components, really anything.

You can auto-generate LaTeX. This is huge. Documentation systems can automatically generate manuals from external systems. And there are many systems that do just this. The Texinfo system will generate HTML, TeX, gnu info, and plain text documents from the same input. So you can browse on the web (will all hyperlinks in place), get beautifully formatted printed documentation, clickable PDF, and on screen navigable documents from the same source. Because these documents can come from the same source tree as the systems they document revisions to the underlying system can be automatically reflected in the final documentation.

Years ago I taught software engineering, which included a huge team project. We used to insist that all documentation was written in LaTeX, and was managed in the same source repository as the code for the project. There is no difference between any of the project components, they all require managing with the same level of care.

Probably the big win with TeX/LaTeX is the manner in which it forms part of very rich and powerful ecosystem of tools. Simple tools like sed and awk to do trivial (or not so trivial) massaging of the source, right through to major components that can generate entire documents. And all these documents, no matter what their genesis, whether auto-generated through to hand written, can be managed with the same overall formatting and branding as one another, forming a cohesive whole.

TeX can include embedded callouts to other programs, and it is possible to then script arbitrary creation of on the fly content. And again, this is all part of a single well understood tool set. It isn’t a private format or protocol that is specific to the one program, under one OS. One that may change at some arbitrary time at the whim of the vendor, rendering all your previous documents obsolete. A LaTeX document from 1985 will print exactly the same today as it did when written.

There are various complex page-layout chores that LaTeX does well and robustly automatically, but where Word is likely to need human assistance for best aesthetics whenever the document changes.

Yes !! And in the list of “standard text processing tools,” I’d have included “one’s favorite text editor.”

To appreciate such things however, one has to agree to invest a few hours adapting to the philosophy of simple tools, believing that the effort will repay itself many times in future. This is at odds with an instant gratification mindset.

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

:confused: Twenty years ago, I watched someone on a Macintosh get real-time feedback in a different window from his LaTeX editing in-process.

But I am not at all sure why you even need that in your “essay about Franco-Austrian literature.” I’ve written long papers and even books. Entering one’s text seems independent of layout considerations. True, one may need to optimize the locations of boxes and footnotes, but that’s an argument for LaTeX, since it does a good job at that automatically.

LyX is a GUI for LaTeX, available for practically all modern systems. (Another point in LaTeX’s favor: I can use it on a system where it’s possible to get things done, as opposed to constantly fighting with the registry or fighting the mouse behavior.) It may be good or bad, but the point is that LaTeX isn’t necessarily command line-only.

Another big point in LaTeX’s favor is that old LaTeX documents keep working. Unlike Word, where MS has a distinct financial incentive to force upgrades, LaTeX is extremely stable at this point and most documents using most features are going to keep working on into the foreseeable future, and documents that worked a decade or more ago are very likely to work the same way now.

It’s the dominant publishing tool in mathematics, computer science and theoretical physics, and finds some use in philosophy, so much so that some have seriously suggested that one way to spot a quack in these fields is if they don’t use LaTeX. I have never come across a journal in theoretical computer science that will accept anything other than a LaTeX (or maybe ConTeXt, if you’re lucky) generated PDF or PS, for instance. Further, most mathematical text books are typeset with LaTeX. It’s pretty easy to spot them, as LaTeX has some pretty distinguishing features.

It’s easier to manage the document when you can just work on a chapter as if it was a completely separate document. Further, you can rearrange chapter by just changing the order of the lines that include the files, and can remove chapters just by commenting out a single line.

Word’s “version control” to SVN, Mercurial or Git is like a child’s Tonka truck to a piece of mining machinery.

Yes, usually changing the appearance of a document completely is as simple as changing which style it uses, a single line change. Further, every journal and conference in mathematical fields provide their own style to use with LaTeX.

It’s pretty true, or at least about as true as it probably can be. Sometimes LaTeX does something stupid and you need to hand correct it, or you need to hand tweak the document to get it under a page limit without deleting content. Most of the time you just use the standard macros and let LaTeX worry about spacing and figure placement.

Anything? Given a table of data in XML format massage it into LaTeX format and then insert it into the document in the correct place using Awk. Find all occurrences of the \rightarrow glyph and replace them with the \Rightarrow glyph apart from when they are used as a subscript or superscript? Find all strings with “fine” as a substring, etc. Anything way you can possibly think of to transform a text document is possible with the likes of Awk.

But as you can see, I’m asking questions about more complicated documents. It’s also easy to generate a simple document in Word, of course.

What I’m asking is, can someone describe for me how you do something in LaTeX, in such a way as to make it clear to a Word user that it’s better to use LaTeX for that purpose than Word. Or at least point me to the place(s) in the LaTeX documentation that describe how to accomplish that task.

What does this mean, “LaTeX chooses an appropriate place to insert it.” How does LaTeX know where to put it? What if I don’t like where it put it?

Word does this as well. How does LaTeX do it better?

Word does this as well. How does LaTeX do it better?

I’m starting to get the feeling that Word took several cues from LaTeX-type programs in 2010. Because Word does this as well.

Have developments in Word made LaTeX obsolete for many purposes?

Guess what?

I think I can understand how this would be a good idea.

Sorry if I sound a little argumentative here–what’s going on is I keep hearing from smart people who are friends of mine who work in my area that LaTeX is teh awesome, and I can’t get a clear story from them as to what’s supposed to be so great about it. If anything, whenever I look at LaTeX in any detail, it appears hopelessly arcane and unnecessarily complex.

So there’s a little out-of-Dope frustration leaking through here, probably.

Another friend of mine who has had a similar experience writes thus:

This basically matches my impressions as well, but so many people who’s opinion I value are in fundamental disagreement with this so I’m trying my best to become convinced.

(I’ve never experienced a need for “hours of formatting” to be done in Word, though. Basically, I find the formatting happens as I’m doing a final-but-one readthrough or so anyway. I’m tweaking the content and the format at the same time so I guess I just don’t notice the distinction. I’m thinking about what I’m communicating, and one communicates both by putting words in order, and by formatting them on the page. So for me, it’s all of a piece anyway, AFAICT. Maybe this is what makes me not understand what is good about LaTeX? Maybe other people make a more firm distinction, when working on a paper, between content and format?)

On the rare occasions I have attempted to use Word, I have found it very annoying. Doubtless I could learn it better, but why bother. How easy something is has two meanings: ease of learning and ease of use. Latex is hard to learn, but easy to use. It is possible to have complex layout (e.g. flow around a picture) in latex, but it is not easy. To see what latex does best, look at this paper: http://tac.mta.ca/tac/volumes/25/1/25-01.pdf (chosen at random as the first paper in the current volume), and look especially at the diagrams that appear from page 15 to the end. Can that even be done in Word? For the most part, the tools latex provides for making them are somewhat hard to learn, but easy to use.

Someone suggested above that you give latex the text, table of contents, bibliography and it does the rest. Even better, latex actually prepares the table of contents, internal references and, best of all, index (or even multiple indexes). Usually authors wait till the end to make an index and usually miss some things. When I wrote a book, I added an index entry as soon as I wrote something that should be indexed. The index was then prepared automatically (using a specialized tool called makeindex).

ONe thing that hasn’t been mentioned above (I think) is that documents prepared 25 years ago can still, with minor tweaking, be used today. Can you use a 25 year old Word file? My feeling is that it is so much dead electrons. And even if you don’t want the minor tweaking, the old latex source is still avaliable. But when I wanted to make available online a book published using a beta version of latex in 1984 (it was released in 1985} it was the work of a few minutes to upgrade it to current latex. Except I redid all the diagrams since I wasn’t happy with how they looked and macro files used to compile them were unavailable.

The fact is that latex produces book quality output and I don’t think Word even claims to do that.

Frylock, with respect, in the time it’s taken you to post multiquote rebuttals in this thread you could have learnt how to use LaTeX with at least some degree of proficiency.

There is a fundamental difference between Word and TeX/LaTeX that goes to the core of the utility. Word is first and foremost a WYSIWYG system. The motif is menus, selection of regions, direct typing - to see what you get. This means that under the hood the work occurs, and hidden subsystems of undocumented and proprietry code perform perhaps powerful actions. The external interface to those capabilities are what the designers decided to let you have. And they are often not well chosen.

There is another thread running - how do I put text ahead of the bullet? This is a perfect example of the problem. You can’t. In Word bullets are not characters - they are something that appears in the formatted text as an attribute of an lump of text that is annotated with a hidden set of formatting to be a “bullet point”. Word knows what a bullet point is. Sadly that is all it knows about bullet points. You can’t change what it thinks the semantics of a bullet point is. In TeX you could build a special bullet point that allowed text before the bullet. An unlike the kluge in Word to get something that looks about right, but that doesn’t behave like other bullet points, the new type in TeX would inherit all the attributes and capabilities of bullet points.

It is possible to get some reasonable flexibility out of Word, but it requires significant discipline, and a lot of setting up. You have to aggressively use styles. Right from the start. Every thing you type has to be carefully set to the appropriate style. If you do, you can make global style changes by modifying the style. And since styles can inherit from other styles it is possible - if you are careful, to make global format changes that do correctly cascade. However Word has some idiotic rules about formats. Again this bit about you get what they give you. You can’t tag inline text as a format. Want to modify the font some text? Sure, select it and apply the modifications. Now go do that to some other snippet. You can’t name those changes, and you can’t globally modify them. Formats and styles apply separately, and interact in strange and inexplicable ways. Again there is no underpinning model, and no access to the mind of the designer.

Further - styles are out of band - you can’t see them in the text. You might see two bits of text that look similar, but without selecting them and interrogating them, you don’t know if they are or not. Since the styles are not visible it is hard to control them. In TeX you can control the styles and other macros just like any other bit of text. And use all the standard tools to help you do this. You can set up clearly visible control structures that exactly specify style inheritance and operation, visible right in front of your eyes. In Word this is all invisible unless you go digging, and you would need to separately document it - and keep the documentation up to date with any changes made.

The comparison between TeX and Word is an apple and orange comparison. (BTW, LaTeX is the markup language, TeX is the system which applies the language to format data in a document.) As others have already stated, TeX is designed from the ground up as a digital typesetting/structured document system for desktop publishing, similar to Adobe FrameMaker or QuarkXPress. That means that it controls the format as the primary feature and treats text and other objects as data to be inserted into the defined template. Word (and other word processors) are really WYSIWYG (“What You See Is What You Get”) text editors with formatting tools. The formatting is mingled with the text data, and your primary control is via the graphical display, which may differ from how it is displayed when printed or transported to another media. Microsoft has added some low grade document control features that allow it to function as a poor man’s desktop publisher (e.g. simple tables, handling picture/data objects with crude format control and captioning, et cetera) but these are features that are glommed on, not inherent functionality. It is noteworthy that Microsoft also provides Microsoft Publisher with the Office Suite, which is an actual (if simplistic) desktop publishing application, so they don’t even consider Word to be a structured document system.

Functionally, the difference is this: with a structured document system, you have to start out by defining a template for your document/data, e.g. where titles go, how pages are marked, borders, frames for text and images, bibliographic format (if you have that information) et cetera. Before you ever start entering text you have a screen full of boxes that define how the content will be displayed in the intended media. If you’ve ever seen a news or magazine copyroom, you’ll see screens with big blank boxes with "X"s across them where the text and images will go once the entire document is compiled. This frees the format editor from having to deal with the actual text, and any possibility that formatting will be applied arbitrarily or contrary to intent.

With a word processor, you don’t have to define any format in the document. (Word starts by defining a default font and borders, but again, what you see on the screen may be different than what is on the printed page.) You don’t generally apply any pre-formatting to the document; you just start entering text and pasting in objects. Everything that isn’t an object is by default text–in other words, the document is a big formatted text box with other objects in it. This formatting within formatting is considered very bad form in desktop publishing, and most packages don’t even allow it.

An analogy is the difference between ASCII text files and HTML “pages”; your browser can display both, and you can put links and some limited formatting (tabs, page breaks) in your ASCII text file, but you have no real control as to how it will be displayed in the browser, i.e. the font will display at the size and type defined as the default by the browser for unformatted text, text may run off the edge of the screen, et cetera. An HTML file controls the display of the page data by default; everything has a tag that gives it format and location properties, and (at least in a well-designed page) the content will be displayed in a controlled fashion without data going off the side of the frame, fonts and colors are as defined in the HTML code, et cetera.

Arguing which one is best is missing the point; you wouldn’t use TeX to write a short essay, or notes, or an e-mail, as you would spend more time messing with the formatting of a document for which display control is relatively unimportant. All you care is that the text is clear, and that line spacing, borders, and tabs are okay. However, if you are writing a long paper with a lot of citations that is to be submitted to a publisher, or generating a repeated report with a lot of data, and so forth, spending the time to set up a digital typesetting system may be worthwhile or even required. This allows the data to be conveyed as intended without any misinterpretation due to formatting. For instance, when Word creates a caption for an image object, it makes it plain text that is actually part of the body of the text. This means that if you add text above, and it shoves the image object to the bottom of the page or if printer margins are adjusted to move the object from where it is displayed, the caption may actually appear on the next page, separated from the image. This would never happen in TeX because the typesetting rules don’t permit it (unless you force it to place the image across the page break). The caption is attached to the object, not the document body.

I’ll provide a practical example: we have a system that does semi-automatic data reduction and then runs a comparison between an analysis model and the data. It dumps out formatted text files and images, which can then be directly referenced by a LaTeX template, such that it would then be possible to write a remarks/conclusions section into a text file and print the entire document to a PDF file, without ever touching the formatting. Of course, our customer wants reports in Word format, so instead, we have to laboriously cut and paste pictures and data into a Word document, and then adjust all of the formatting that gets farked up no matter how careful we are. (We did have a set of VBA scripts to try to import the data automagically, but they never seemed to work flawlessly no matter how much tweaking we did, and then Microsoft came along and broke the functionality they used with a new release of Office, so we’re back to dumb monkey formatting.) Worse, the customer then tries to take the content and plug it into their Word documents, virtually assuring that the formatting is going to go crazy. I guess we’re lucky they don’t ask for the report on punchcards, but it turns what should be a fifteen minute process of turning the crank, popping out a professionally formatted report in a structured document, and copyediting the results to make certain that the entire data set was reduced is instead several person-days of effort to generate this kludgy report in Word that never seems to print the same way twice. It isn’t really the fault of Word; it is just using the wrong tool for the job.

Regarding tables and bibliographic references, the advantage of LaTeX is that you define the format and provide the data in raw form. If you have to change references or the order in which they appear, the formatting is done automatically by the TeX interpreter, and it won’t let you make an error (or at least, it will highlight that you didn’t cite the page number, or the volume, or whatever is missing from the format). Word just treats this all as dumb text and lets you enter anything you want. If you are just citing a few articles it isn’t a big deal to control the formatting yourself, but if you have three pages of citations–not unheard of in long technical papers that make take months or years to write–having a system to update all of this automatically may save you from making errors that will delay submission. As for tables…Word just doesn’t do them well, to the point that I’ll create tabular data in Excel and import it as an HTML object rather than muck about with Word “tables”.

Back when I was involved in screenwriting, I saw numerous fledgling writers either trying to set up their Word templates to follow script format (film, television, and theatre all have very specific and controlled formats for submission, and they all differ slightly.) While it is doable, there is usually some finagling to get the formatting just right. I wrote a simple LaTeX template that lets you write out the dialogue and instructions in plain format and plunks it into the correct script format automagically. It was a huge timesaver, and also makes it a lot easier to actually read and write straight dialogue.

Word processors are fine if you’re going to bash something out in a couple of drafts without any complicated formatting beyond tabs and a few images interspaced in the text. A structured document package is necessary, however, if you are generating content that has to be in a precise, controlled format.

Stranger

:confused: :smack: :confused: You have no idea whatsoever what the Captain and I were trying to explain, do you?

I think Capt. Ridley’s Shooting Party and others here have done a good job at hinting at the reasons for LaTeX’s superiority. If you don’t get it, we can agree to disagree and call it a matter of “taste.” (I, for one, however, will think it a matter of good taste vs. bad taste. :smiley: )

@ Stranger on a Train who wrote “you wouldn’t use TeX to write a short essay.”

While it might seem like “overkill,” the necessary {pre,post}face to convert plain text to LaTeX is trivial, so there’s no reason not to use it for short essays; indeed there is a good reason to do so: keeping one’s toolkit small and simple.

In the same vein as equation editing: Word has rather dismal “float” control. That is, if you are writing a novel (text only), Word is fine. If you have any figures or tables, you have to worry about their placement carefully as you change text. LaTeX lets you say, for example, “I want my floats to appear near the top (or bottom, or near the reference), so try your best to accommodate that.” And, it essentially always does what you would have wanted. (In the rare occasions when it cannot, it will tell you why, and you can override.)

LaTeX can deal with PostScript and PDF vector graphics (not sure if Word has caught up on the latter yet; definitely not the former.)

Someone mentioned the breaking out of pieces of the document into multiple files. The place I find that particularly useful is when I have a table or diagram that interrupts the flow of the text, making it hard to read or edit around there. In LaTeX, I would do something like:



...and the monkey flew up to the moon, as shown in Fig.~\ref{monkey}.
\input{monkeygraph}
As you can see, the monkey is happy.


The file “monkeygraph.tex” would have all the content related to that graph (source file and caption mostly, plus a tag \lable{monkey} for the in-line reference.) Notice something else that I typed without actually realizing it at first: the tilde. That says “Do no break this space at a line break.” I’m sure Word can muster up a non-breaking space, but there’s no way it’s easier than replacing the space with tilde. (One can also “escape” the space: “Fig.\ \ref{monkey}.”)

If I have a complex in-line expression that I want to type a lot, I can define a command for it at the top of the document just with:

ewcommand{\foo}{do whatever I want here, even complicated math}

The definition is not hidden away in some macro table, and it’s a simple text substitution, so there’s no question about how it will be formatted when used. Then I can just \foo.

Here’s a random document I got on the arXiv preprint server. (Happened to be the latest one in the random topic I clicked on.) This simple document shows a lot of features that would be hard to do in Word. That banner along the left? Simple plug-and-play: it’s one line to do that. The citations are completely mindless. (I’ve vigorously attempted to use Word citations when forced into it a couple of times, and you have very little control over the formatting, and the ordering is a disaster. If one is a lawyer or a doctor, perhaps the automatic styles Word offers are okay, but anyone else is screwed.)

Hyphenation is brilliant in Latex. I am regularly dissatisfied with Word’s attempts.

Anyway, the root of it all is its simplicity connected to its power. It helps you concentrate on content and worry very little about the meta stuff. Word can make any document, eventually (modulo the stipulation that math is rendered very ugly). But, it’s sort of like noting that plaintext HTML can do anything that CSS can, so why use CSS? Or, MS Paint can do anything that Adobe PhotoShop can, since at the end of the day, it’s all pixels.

Evidently not, if you’re just going to argue against all suggestions.

I only said I’ve found it easier to do those things on LaTeX. This was mainly back when I first started writing papers; I haven’t spent time trying to find out whether later versions of Word have caught up with LaTeX and acquired those functionalities. I’ve also noted these problems on papers written by other people using Word, but that may be because they didn’t know how to use appropriate functions (automated numbering, etc).

Since you’ve answered every suggestion this way, you’re evidently proficient enough with Word to do everything you need. I suggest you stick with Word and stop wasting our time.

Let me amend that statement; there is no advantage to using TeX to write a short essay. The amount of formatting you do for either is minimal, and it is easy, as the o.p. suggests, to perform any format cleanup in the final draft with just a few menu picks or hotkey strokes. You could use TeX for basic word processing, but that’s sort of like bringing a water cannon to a squirt gun fight.

But for a long document with objects, tables, citations, footnotes, et cetera, Word is wholly inadequate, and formatting and exporting a document it in a form suitable for publication in anything beyond the family holiday newsletter, it is totally dysfunctional. There are many commercial desktop publishing applications that can do a lot of object typesetting functions (and in terms of graphic layout, are superior to TeX in ease of use) but for technical or extensively referenced papers and documents there is really nothing that compares to TeX and LaTeX.

Stranger

I use LaTeX for everything. Letters, reports, essays etc. I don’t have Word installed, other than a Word viewer for when somebody sends me a .doc format file. My sister requested that I typeset her undergraduate thesis in LaTeX after seeing me use it as it looked so much better than her Word effort.

Don’t underestimate the power of typesetting macros. Here’s a simple concrete example from one of my recent papers. I was typesetting function calls. Some times I wanted just the function name; other times I would want a function with arguments; still others, I would want functions that were called in a particular state, marked with a subscript. I wanted formatting that looked sort of like this:

Functions: foo
Functions with arguments: foo(x)
Functions with arguments in a particular state: <foo(x)>[sub]s[/sub]

But I also want the flexibility to change the formatting of the functions (in fact, I eventually switched from fixed-width fonts for the function names to sans serif). To set this up with styles in Word is tedious, especially when I want the typesetting of all three styles to be related to each other. Not to mention adding in the subscript for the state name in the third case. In LaTeX, I added the following three macros:



ewcommand{\met}[1]{\ensuremath{{\sf {#1}}}}


ewcommand{\meth}[2]{\ensuremath{\met{#1}(#2)}}


ewcommand{\methr}[3]{\ensuremath{\langle \meth{#1}{#2} \rangle_{\sigma_{#3}}}}

That way, I could change the formatting of functions by changing how \met was styled, which would automatically change the formatting of the other styles, as well. I could also just specify the state, and the subscripting would be taken care of for me. I could now typeset the three functions from above as:


\met{foo}
\meth{foo}{x}
\methr{foo}{x}{s}

Because of this thread, I may investigate TeX for assembling a book out of independent chapter files. I do not have FrameMaker here, though I have used it extensively; and though I mananged to make InDesign do what I wanted in a very kludgy way, it was awkward and required extensive documentation so that I didn’t overwrite the wrong file.

How well does TeX handle illustrations?

To include an image you just do \includeimage{filename.jpg}.