share
TeX - LaTeXWord 2010 on typesetting math
[+14] [7] Luiz Borges
[2012-04-24 01:07:56]
[ math-mode msword learning comparison ]
[ https://tex.stackexchange.com/questions/53071/word-2010-on-typesetting-math ]

I tried to find that online, but all I found was: "Word bad, (La)TeX good! Word ugly, (La)TeX pretty!". I want an honest take from someone who used the new Math system in Word 2010, preferably who knows TeX/LaTeX/ConTeXt/etc, about how stable and reliable it is. Word also seems to import/export MathML, which is nice thing to have.

I tried the new equation system on Word 2010 and so far it seemed pretty reasonable. I have NO previous LaTeX (or TeX) experience. I tried to learn LaTeX and it was a living hell to make sense of all the packages. Now I'm taking on ConTeXt, it seems to be clearer and more to my taste, but it still is demanding a lot of work and the learning curve is still pretty steep.

I'm used to make proper Word documents (using styles, inheritance, etc), and even thought it is not a typesetting engine I can still make my documents look better than would be expected (maybe almost book level quality), so, if I can be assured that Word can handle Math nicely, I don't really see a point to moving to ConTeXt.

BTW: I don't really care how efficient is TeX justification algorithm.

EDIT: When I mentioned "steep learning curve", I'm not talking about the Math typesetting. I have tables from AMS packages telling me which symbols or commands to use. The problem is doing EVERYTHING else.

If I'm trying to find the text "SOMETHING ELSE" in a TeX document, and this happen to be like {bold something {em else}}, I will never find it.

(10) I am not entirely sure what sort of answer you expect from this. My take on it would be that if you are happy with the tool you are currently using and can do all you need and want to do with it, then why change. LaTeX is a very good tool which I personally prefer and would chose before any WYSIWYG word processing software. But it is just a opinion/preference and it doesn't mean that other solutions/software are bad. Your question doesn't have an answer, and only invites opinions. - ArTourter
(3) This doesn't seem like a constructive question to me. - Aura Everitt
@ArTourter, at the moment I'm not using any particular tool for writing math. Since I started a new undergraduated course focused on Math I want to know which path to take, specially since I also work and my time is limited (and learn a whole macro language will demand a lot of time). What I need to know, is if Word is 'up to the job", and most sites comparing the too are made by TeX lover and have a lot of bias. - Luiz Borges
(7) If you're trying to avoid bias, a website called "tex.stackexchange.com" might not be your best bet either. But I empathize with your frustration. It sounds to me like you are just waiting for someone to tell you will be all right if you go with Word. I guess it partly depends on what you intend to do in the future. For instance, do you intend to pursue graduate studies in math or some math-heavy science? - JohnJamesSmith
I think that I once saw a comment from @Philipp (I think), where he said that Word has more sophisticated use of OpenType math features. Unfortunately I couldn't find that comment now, so feel free to correct me if I remembered wrong. - morbusg
If you are looking to "be assured that Word can handle Math nicely", the microsoft word forums might be a more appropriate place to find support. - JohnReed
Ah, found it: tex.stackexchange.com/q/8308/1410 - morbusg
Given the quality of the respective answers, I vote for not closing this question. Luiz, you might consider editing your question and the question title, so that it better fits into a QA format. Something like "How does Word 2010 compare to LaTeX for Typesetting Math" - Daniel
@Daniel, I don't think the title is unfit. I don't really want a comparison, I want to know if Word (2010 specifically) can handle typesetting a graduate and posgraduate Math course. If not, what are the limitations. - Luiz Borges
@JohnJamesSmith, I'm not here to avoid bias, I'm here because this SE although named after a typesetting system is for people who use/need a typesetting system for math. People here are not causal Word users, that write mostly text. That why I here. - Luiz Borges
@LuizBorges No. This is an SE site for users of TeX. Not for people who use/need a typesetting system for math. There is a large intersection between the two groups, but they are not the same. You should ask this on a Word2010 support site. - Andrew Stacey
"I want to know if Word ... can handle typesetting..." Well, in that case the question is off topic and should be closed. - Daniel
(3) @LuizBorges I would also suggest look at what your peers do in your field and your institution. If a majority of people use TeX for their documents, it would be most beneficial for your to gain that skill since you will be most likely expected to use it sooner or later. And starting early is the best way to do it. If on the other hand, most people use MS Word, then use it. these things are tools which can mostly do what you need them to do. It is a question of know which tool is used in your environment. - ArTourter
[+32] [2012-04-24 01:56:41] Mike Renfro

Depends on who's defining "nicely". If you live within its constraints, you can get a lot done. But one major difference is how inline math is formatted, especially with single-spaced body text. TeX derivatives tend to handle that sort of thing much better.

Example: Word can't squeeze a Fourier series (a sum and a set of fractions) into a single baseline of text, while simpler equations are no problem. Word places some (in my opinion) odd constraints on the height of the summation symbol, apparently forcing it to be as tall as the summed items, including parentheses and other grouping symbols. (EDIT: Philippe Goutet's Word experience is broader than mine -- you can get a more TeX-like inline summation, but for whatever reason, that's not the default in the Fourier series inline template.)

Word single-spaced:

enter image description here

LaTeX single-spaced:

enter image description here

Word double-spaced:

enter image description here


(3) Great answer! And an empirical argument, no less. - Alan Munn
That's a very nice anwser... I'm still thinking about what route to take. On one side I will have to restrict myself to Word peculiarities, mostly in inline equations, on the other I won't have to face the steep learning curve and I will have niceties like spellchecking, easily incorporating tabulated data, etc. - Luiz Borges
(2) @Luiz Borges I am not getting the spell checking part and tabulated data part of your post. Spell checking is usually built into the editor or done by a specialized program (see my post about vi editor). Adding tabulated data can be easily scripted. Somebody even posted how you can use light mark up syntax to add tabulated data in TeX. Avoiding "steep learning" curve is personal choice. I like to learn things once in a way that I can use them the rest of my life. For example I am using TeX over 20 years and I am going to die using TeX for typesetting. - Predrag Punosevac
(5) @MikeRenfro: It's not true that Word can't squeeze a summation symbol into a single baseline of text, you just have to type \sum_(n=1)^(+\infty) then press space and the summation behaves as it should (automatic size depending on the context: inline or display). - Philippe Goutet
(1) @AlanMunn The deep empirical argument is \kant[4] from kantlipsum.sty ;-) - egreg
@PredragPunosevac, can you really be so sure that TeX will be here 20 years from now? And if so, will it be able to handle the ever increase need to accomodade new features? Just now Unicode is starting to get some support, the same is true for OpenType fonts, and those have been around for decades! Word (and OpenOffice for that matter) accomodate those things faster and better than TeX ever did. Backwards compability is a problem in some cases too, new features cannot be introduced without breaking old ones. - Luiz Borges
(1) @LuizBorges Actually, it's of no relevance whether TeX will be here 20 years from now or not. TeX is not a final format, it is an input format. So what we should care about is whether PDF or PostScript or DVI will be here 20 years from now. I don't know about that (rather, my contract with the Time Lords stipulates that I'm not allowed to say) but if asked to bet, I would bet on PDF/PS/DVI over MSWord2010. - Andrew Stacey
(1) (And even if not, it is possible to actually read the tex file directly and get the main points even without TeX the program.) - Andrew Stacey
(2) @LuizBorges: well, TeX has been around for a good 30 years already, and if you think OpenOffice/MS Office support OpenType, then you haven't seen a real OpenType-capable application yet :) (hint MS Office started supporting OpenType for Latin script only partially in 2010, OpenOffice not yet, XeTeX had it since 2005). - Khaled Hosny
There is also some comparison: nitens.org/taraborelli/latex - morbusg
@PhilippeGoutet: I added a version of your summation. The Fourier series still doesn't quite fit in a single-spaced line, but that's the fault of the fractions now, instead of the summation. - Mike Renfro
1
[+16] [2012-04-24 07:20:28] Philippe Goutet

Word's typesetting algorithm for math is currently better than is TeX's (the situation might change with LuaTeX); the main improvement is in the spacing (factorials are automatically spaced correctly, for example).

But that's only part of the picture as, when using Word, you are still stuck with (at least) three main flaws:

  1. Word handles the text badly. You say you don't care how efficient is TeX justification algorithm, but you should (especially if you want almost book level quality: Word is totally inadequate for that). Formulas are only a small part of the math document, so how the text is handled is very important. And I'm not even mentioning things like table of contents, bibliographies, index creation, automated numbering of theorems, etc. which are a real pain with Word and a great strength of LaTeX.

  2. Word handles the interactions between text and formulas badly. For example, obtaining a numbered formula in Word 2007 (I've not tried Word's latest version, so I don't know if it has improved) is a real pain (see Word's blog "Equation Numbering" post [1]). And that's just one example. Remember that TeX/LaTeX was conceived to be used with maths, whereas for Word, it was just an afterthought.

  3. If you want to do something complicated or which was not planned by Word's creators, you will be struck. For example, try to typeset a summation symbol with both a prime and sub/superscript. With LaTeX, you're sure it can be done and it's easy to find a package to do just that (googling "latex primed sum" gives the answer immediately).

LaTeX has a learning curve, of course, but you can get started in just one afternoon, and if you need help, it's easy to find. I made the transition from Word to LaTeX a few years ago and never regretted it. If you plan on writing one day a long report with maths (e.g. a PhD thesis), then choosing LaTeX is a no-brainer, and the sooner, the better for you.

[1] http://blogs.office.com/b/microsoft-word/archive/2006/10/20/equation-numbering.aspx

Could you please give me the link to the Word's typesetting algorithm as well as the Word's source code which implements the algorithm? I would like to study it a little bit. Thanks! - Predrag Punosevac
(1) @PredragPunosevac: Word's algorithm is not (as far as I know) described anywhere, you can only judge it on its results. From my understanding, it's just an update of TeX's algorithm using a more complete spacing table than the one given chapter 18, page 170 of the TeXbook; see the section about Math spacing in the link given in David Carlisle's answer and well as page 20 of the Unicode Technical Note 28, v2. - Philippe Goutet
Note, however, the logic is in the font (and its MATH table), eg, Cambria, not in Word. Maybe it adds a few nice features, but as a whole I think LaTeX is much better. - Javier Bezos
@JavierBezos: no, the spacing algorithm is not in the font. Word spaces formulas like n!m!/3 the same way whatever the font, just as TeX does. MATH tables only contain font-specific metrics (described for example in OpenType Math Illuminated). - Philippe Goutet
@PhilippeGoutet: I didn't make clear my point. I was not speaking just on spacing. While with TeX I can program almost any behaviour, even if the font has no math information at all, and even combine font more or less freely, Word requires (afaik) a font with a logic (like the MATH table), because it doesn't have it nor you can program it. At least, I couldn't see how to do it (the version I'm using is 2007). - Javier Bezos
2
[+15] [2012-04-24 09:20:36] David Carlisle

The math typesetting in Word (post 2007) is closely modeled on TeX. See for example this quote [1] from the person who lead the team responsible for the Math typesetting in Word:

The TeXbook is a user manual that includes a detailed specification for mathematical typography. We have used many of its choices and methodology in creating our solutions, which are appropriately enhanced with the use of OpenType tables and some additional constructs. Although the TeX source code is available, it cannot be used directly for several reasons. First the code is like a web rather than being hierarchical and uses many global variables. This makes it cumbersome to employ in the instance-oriented contexts used at Microsoft. Complicating this is that TeX is a complete document imaging system, not one limited to mathematics. As such many aspects of the program that are used for mathematics are used also for other kinds of layout like headers, footers, figures, and footnotes. Extricating the mathematical algorithms from this web of code would be significantly harder than recreating the desired display quality using our own methodologies and the specifications given in The TeXbook, especially in Appendix G. Furthermore we want to take advantage of our OpenType math fonts to obtain better positioning of subscripts, superscripts, and other symbols than possible by default using TeX. Another complication is that Office is an international environment and our math facility needs to be compatible with all languages that we support, potentially simultaneously. We also want to take advantage of contemporary methods to optimize screen displays.

Conversely, since that time, the OpenType Math tables that Murray mentions were added [to Cambria Math] to support the typesetting of Math in Office have been added to other free math fonts and are read by TeX systems such as XeTeX with OpenType font support, so technological advances move both ways.

Personally I find a WYSIWYG word processing system a scary and hostile environment for editing documents, but apparently that feeling is far from universally shared, so in the end it comes down to personal preferences, which are hard to measure objectively.

[1] https://web.archive.org/web/20160217131240/http://blogs.msdn.com:80/b/murrays/archive/2006/09/13/752206.aspx

I do share! - Stephan Lehmke
And the dedicatory of a leaflet published by Microsoft in 2007 about “Mathematical Typesetting” reads “Dedicated to Donald E. Knuth”. - Javier Bezos
@Glorfindel I let the edit go through even though I'd spell modelled in UK English normally:-) - David Carlisle
@DavidCarlisle oops - feel free to roll that part back. I'm from the Netherlands and don't have a preference for either UK or US English. - Glorfindel
@Glorfindel no it's OK;-) I may ask Murray if there is a more authoratitive link for his blog than rely on web.archive.org. The archives in his current blog don't go back that far. - David Carlisle
3
[+10] [2012-04-24 10:59:40] Paulo Cereda

I had a very traumatic experience with Microsoft Word + mathmatics in the past. :( That said, I think newer versions of Word are getting more intuitive and it seems the equation editor has now support for a subset of LaTeX commands.

Maybe you could investigate what's the general rule for typesetting documents in your university department. Since you will probably have to share your documents with colleagues and advisors, it's very important to discover your environment. I know professors that are quite feral with editors - bring a document format other than doc/docx and you are doomed. Yes, they exist in academia.

Sadly, I don't see any strong TeX tradition in Brazilian universities (thankfully a few mathematics and computer science departments are still in la résistance, but even there it's only a few people that use TeX). That might be a barrier. Take a look if your deparment has any TeX templates. A friendly warning: our crazy ABNT format is a pain, specially for TeX.

Anyway, I should advocate for TeX too, so here's a blog post I wrote in our community blog: More than typesetting [1]. Hope it helps. :)

[1] http://tex.blogoverflow.com/2011/07/more-than-typesetting/

Another brazilian that understand the problem. I don't care if Latex do "all the work for me" typesetting the document, if it does wrong. In Brazil I must conform with ABNT, and in TeX that seems to be impossible. ConTeXt is a bit closer, but still is harder to make a coherent document in (La/Con)TeX(t) than it is in Word using styles. - Luiz Borges
(1) @Luiz: I'm a happy TeX user, it's been 5 years now. :) But I know it might be very complicated and frustrating when you are in a hurry and with a deadline. Thankfully biblatex, geometry and other packages can help us with the ABNT standards, but it's not so easy for a newbie or casual TeX user to figure out. I had to come up with my own class file from scratch and fix/improve it while I was writing my thesis. It can be done, but it might be challenging. :( Don't give up on TeX, but for now, I think you should opt for an easier workflow. :) - Paulo Cereda
(1) I haven't give up, but I will try to learn ConTeXt. Unicode support out-the-box and no "package hell" are a must for me. I'm graduated in Computer Science (never needed to write on computer anything hard on math), and now I'm on a second graduation in Math Teaching (licenciatura). - Luiz Borges
4
[+4] [2012-04-24 07:19:44] yo'

To be honest: If you want to do maths, to some more extent than making your taxes right, you should learn LaTeX. Sooner or later you'll find that it's unavoidable.

You can start with the LyX system [1] that can help you with your documents and it can provide sufficient result, surely much better than Word does, even Word 2010, as Mike Renfro points out in his answer. LyX is based on LaTeX and allows many its features, while it is mostly a WYSIWYG editor. It is a good bridge from "pure WYSIWYG" like Word to "pure larguage" like LaTeX.

You will see that it is not that difficult and for basic documents (like scientific articles, your thesis or an extended homework) you don't need anything special generally, neither in LyX or in LaTeX itself.

[1] http://www.lyx.org/

(2) Good point, but please do not sell Lyx as an "editor", it really is a text system in its own sense that uses LaTeX as backend: See Can I think of LyX as a LaTeX IDE @LuizBorges: You really should give LyX a try. Especially when typesetting math, the learning curve is less steep, as you can mix interacting visual formular editing with typing the math macros you already know. For me, LyX was an important and (long-lasting) step for migrating from Word to LaTeX – and I still prefer LyX for simpler documents. - Daniel
I have never used LyX personally, so thanks for information! - yo'
5
[+3] [2012-04-24 09:20:34] Keks Dose

One advantage of using LaTeX is: we cooperate a lot. If you get stuck, go and ask. The method of a minimal working example will most probable guide you to a solution. There is no MWE with word.


6
[+1] [2012-04-24 11:45:04] Leeser

Well a simple reason for using (La)TeX over Word is not simply restricted to mathematics display. A lot of faffing about (i.e. time consuming minor changes) is often required in Word to keep the "look" right so you are not spending time on the content. Look how badly word handles placement of figures and their associated captions.

I use both Word (for interaction with my colleagues) but usually typeset my reports (for industry) using PDFLaTeX. The reason for using LaTeX for the reports is that I get a direct PDF output that the end user can't change. (I know I can print to a pdf printer from Word but sometimes the characters don't print as good/consistent...)

That's my tuppence worth...


7