# Incorporating diagrams and equations into text when writing

I am looking to write a book on Physics/Mathematics.

Of course this book will need to include mathematical equations and diagrams. Are there any writing softwares that have devices such as TeX and LaTeX, which are typesetting systems? (see here for more on TeX: http://en.wikipedia.org/wiki/TeX)

Also, how would a writer approach the incorporation of diagrams into the writing of a book?

-
If you are asking especially for Tex (and probably tools like Lyx) then have a look at tex.stackexchange.com –  John Smithers May 20 '12 at 17:34
I'd say go for place holders. That might seem obvious but until you have the whole text on computer, don't try to add formulas or diagrams; just leave them some room then come back. Then, if you want to put TeX formulas in-line then your best bet is a complete TeX editor. That is, look for writing the 'whole thing' in tex not just the math text. –  Mussri May 20 '12 at 18:05

As a writer and a (former) typesetter/graphic artist/production manager I have to state that writing a book =/= designing a book. You can't write your book in Word or TeX and have it be sufficient for the printed element. (That part is opinion but based on experience. Dedicated hardcore users of TeX might disagree with me.)

If you're writing a book, just write the book. There are plenty of posts on Writers on how to do that. But I would highly recommend using a program designed for book building like Scrivener. That will allow you to organize chapters and sections and allow you to import formulas from TeX so long as they've been exported as images (for reference only, NOT composition.). All you need to do then is label the formula and make a reference to them in your work ("In Diagram 2.11, the Pythagorean theorem...").

If you sell your book to a publisher they will compose the book using their preferred methods. But you will want to make sure you have all of the formulas saved in Tex (or other formula able software).

But if this is a project you intend to write, design and publish all by yourself then you should really invest (and I do mean invest) in a proper pagination program like Adobe InDesign or Quark Xpress.

Regarding scientific and mathematical formulas, InDesign can import formulas directly from [shudder] Microsoft Word's equation editior. InDesign can also use formulas exported from Tex as images and there is also a plugin called MathTools that can create formulas right in InDesign. Similarly, Quark can import TeX formulas as images and there is a plugin (Xtension) called Math+Magic that will more easily import formulas from TeX.

The caveat is that even if you have the right tools, you still need the right training to make them work. That is why I strongly suggest that you keep your work very organized so that if and when you decide to outsource the design and pagination of your book, you can.

You might also want to check out the Tex and Graphic Design forums on Stack Exchange to see how other users tackle this problem.

-
>they will compose the book using their preferred methods - No, they won't. At least not the one I know. And that's a very big publisher in Germany for scientific books. They expect, that you send them the printable book with the finished layout. They spellcheck maybe, but that's it. Using Tex and send them the compiled manuscript is the best way to go here if you ask me. (And yes, you can write it in Tex and have it be sufficient. Honestly I wouldn't even consider another possibility. It's that easy.) –  John Smithers May 20 '12 at 19:16
@JohnS, Generally, it's that easy; yeah. But TeX is that easy? Nah. Especially not for a non-professional as I suspect the OP is (non-professional in TeX, that is). –  Mussri May 20 '12 at 20:17
@M.Na'el, well, Latex makes it a lot easier ;) –  John Smithers May 20 '12 at 20:19
@JohnSmithers, can you write a book and say where the diagrams should go, and then give the publishers the content of the writing and diagrams separately and ask them to incorporate the diagrams into the text or you? –  Olly Price May 21 '12 at 10:26
@OllyPrice: You "program" where the diagrams should be placed into your tex-document. Then you compile a dvi or postscript file where everything is included and that you hand to the publisher. You also can give the tex files and the diagrams separately to the publisher, but that depends on the publisher. As I already suggested, tex.se maybe the place for you. –  John Smithers May 21 '12 at 13:30