46

I've entertained the idea of writing a textbook for several years now. The idea has taken several forms - a set of course notes that I provide as pdf, a text that is printed at my institution, or possibly a text that I propose to a publisher and (hopefully) get accepted.

This question is a practical one - when writing a textbook, what format is it in? Is it just a big MSWord file? Separate files? Is there a specific "textbook editor" that people use? For example, in books with separate sections for examples, callouts, definitions etc, I can't imagine doing that sort of layout on my own. My guess is that the publisher figures that out for you. However, the author has to indicate "box X goes here" doesn't he? How does that work?

Edit: for clarity, the text will be used in a professional communications course for technical disciplines such as engineering.

4
  • 4
    Here you can find the evolution of a huge project by mathematician Ravi Vakil: math.stanford.edu/~vakil/216blog/index.html
    – user347489
    Commented Sep 26, 2019 at 5:28
  • 14
    At least in the sciences & technical fields, it is far more likely to be a set of LaTeX files. Searching for "LaTeX book template" returns about 36 million hits. Some publishers, like O'Reilly, appear to have their own templates...
    – jamesqf
    Commented Sep 26, 2019 at 6:19
  • 5
    "Is there a specific "textbook editor" that people use?" This question is, at heart, a shopping question. Also, it's very broad as David Ketcheson mentioned. Commented Sep 26, 2019 at 9:12
  • 2
    Very similar to a thesis, if written in LaTeX for a scientific discipline, though perhaps with a fancier laouy template is early versions are being used/tested supporting a course
    – Chris H
    Commented Sep 26, 2019 at 9:17

6 Answers 6

42

Before you spend a lot of time on formatting, contact a publisher or two and see if they want to work with you and publish your book. If they are excited enough then they will sign you up. You normally talk to an acquisitions editor at this stage.

But each publisher may have different preferred ways of working with your manuscript and it can affect how you work and the tools you use.

For the content of the book, work with whatever tools you prefer, but as you get closer to publication, the publisher will want its own formats.

Normally, for a textbook, you will be assigned an editor (in the sense of one who edits - a content editor). They will make suggestions about your wording and such. You will need to work with this person, using some mutually acceptable set of tools. It might be Word or something else. If LaTex is required, they might do that formatting themselves, and if not, will probably provide a required template for you to use. Even if they prefer Word, they will most likely have a template for you. Perhaps a required template.

You will have only limited control over placement of figures and other such things, and only limited control over layout. But the publisher will somehow prepare the manuscript for printing using its own preferred layouts: margins and such. They may even want you to use, or avoid, certain fonts.

I think that very few publishers will just print a photocopy of your manuscript. There is some processing done before production. So, don't obsess over formatting until you are working with a publisher.

Some publishers will want separate files for any figures (or even for chapters). High resolution images. Others will prefer to create the image files themselves. You may need permissions for any figures (or photos) that you don't create yourself. If the permissions need to be paid for then that may be your responsibility, or you may be given a budget by the publisher for that.

Once the manuscript is reasonably complete the acquisitions editor (or a representative) will probably send your manuscript out for review to a few people they trust. You will get suggestions for improvement of the text, possibly a lot. Especially for a first time author. Your book could get rejected at this point, but I think that is very unlikely. But you will be expected to respond appropriately to all suggestions, usually by modifying the text. This stage can be maddening for a first time author and there may be several rounds of review.

Once they have a printable version, they will send you galley proofs for your approval. These might just be pdf files and you can usually make minor edits, but a lot of money has been spent at this point, so too many changes will be problematic. But your prior work with the content editor should make this moot.

They will try to accommodate you, but you need to work with them as well.

2
  • 6
    Did you publish a textbook yourself? A lot of what you write doesn't mesh with my experience from the other end, e.g, the content editor doesn't need Word or Latex because they usually print out the manuscript on paper and do the editing on hardcopy; the publisher can change the fonts during production quite easily, and so on.
    – Allure
    Commented Sep 26, 2019 at 3:20
  • 7
    @Allure, yes, several. And with several academic publishers. Content editors I worked with all worked electronically.
    – Buffy
    Commented Sep 26, 2019 at 10:56
19

I'm not going to recommend a particular program to use, but instead suggest considerations:

  • For any project that goes beyond 20 pages, it is no longer practical to change the formatting of things by hand. As a consequence you will want to use a workflow that (i) allows you to define styles for everything: headings, margins, placement of figures, fonts, etc; if you change your mind later on on how a second-level heading should be formatted, you only have to change that in one place, because it's going to be impossible to do consistently in a hundred different places if you use mark-up by hand. (ii) a workflow that allows using the same style file for each separate document that defines the book; so, if you use Word, and choose to have one file per chapter, then the style needs to be defined in an external style file that can be separately edited, rather than defined in each chapter's Word file.

  • Make cross-referencing easy. You will want to reference sections in other chapters and other chapter's figures. If you keep each chapter in a separate file, this is going to be difficult because you can no longer reference a tag -- and writing "see Section 5.5" is sure to become wrong very quickly if you decide to add another section before that. It must be "see Section < reference a tag>" where your word processor automatically inserts the section number that corresponds to the tag. That's most easily done if you keep everything in the same document, which also guarantees that your page numbering is always correct. I don't know MS Word well enough to know whether that requires you to keep everything in one file; in LaTeX, you can keep each chapter in one file and then just have one master file that "\include"s the individual chapters.

  • In your choice of word processor, anticipate what publishers in your area will likely accept. I know that you could write a book in troff, but you're unlikely going to make publishers happy with that choice.

  • Anticipate working with others on the project. A book is a big undertaking -- there may be areas where you want feedback from others, or simply enjoy working with a co-author. Choose a workflow that allows you to do that. A particularly bad way of collaborating, in my view, is to send files around by email. You are sure to cross paths at one point, and only one person is allowed to make changes to the file at any given time -- and it's not always clear who that is. Instead, consider a workflow that allows multiple people to make changes at the same time. An example is google documents, but you can also use github with formats that allows merging multiple people's changes to the same file (in particular, for latex). If you configure dropbox right, then that can also work: You need to make sure that the person who has a file open in a word processor locks the file so that others can't edit it at the same time.

My personal system of choice is to use LaTeX, and either share the files with my collaborators via github (if version control is useful) or via overleaf (if version control is not important). But I understand that LaTeX is not for everyone. For things that don't involve a lot of formulas, I've also happily used google documents.

1
  • 1
    It's also possible to use version control along with Overleaf, as it now allows easy syncing with GitHub.
    – GoodDeeds
    Commented Sep 27, 2019 at 14:33
11

While I'm sure that there are many ways to do this, the short answer is that if you contact a publisher about whether they would be interested in publishing a textbook based on your text, they will let you know how they would like the text to be delivered. I expect that they would tell you to use either Microsoft Word or LaTeX.

I personally have experience with writing a Springer textbook on computational physics together with five other co-authors. As the book is quite mathematical and every author was comfortable with LaTeX, the choice to use Springer's LaTeX template to write our book was an obvious one. With LaTeX, you can focus on content and let it handle the layout for you (helped by a little bit of markup from you). In the end, your publisher will take the the text and reformat the layout according to their standards. Still, the markup that you provide is very useful as it will let them know how you want the book to be — especially if you used a template from the publisher. For our book, the final layout was almost identical to the one we had while writing it.

You will also want to have some version control system for backing up older versions of your book, and perhaps also for collaborating with other authors. We used git for our book, though I must say that it's not easy to learn for non-programmers. These days, the online LaTeX editor Overleaf is a much simpler and more natural choice, as it handles version control and multiple authors very smoothly. With Word, I don't know of any half-decent version control system unless you also have access to Sharepoint, so you may be stuck with having to back up older versions manually.

2
  • There is some sort of vcs built into Word itself, but I have no idea how well it works.
    – TRiG
    Commented Sep 26, 2019 at 9:26
  • 1
    @TRiG: I have actually used it myself and it works OK, but I think it requires access to OneDrive for Business or Microsoft Sharepoint. I may be wrong about that, though. Commented Sep 26, 2019 at 9:30
9

Answering this from the perspective of the publisher: basically, you can write using whatever text editor you want. You can even hand-write the textbook and expect the publisher to convert it into digital form (although of course the less of a big name you are, the less likely the publisher is to agree to the project).

However: obviously, some text editors are easier to work with than others, and different publishers will have different preferred styles. Therefore publishers indicate a so-called preferred "style file". Using that style file & text editor makes it easier for them to perform the typesetting. This in turn lowers costs, and means that they can give you a higher author royalty rate.

As for positioning of figures, yes, you can indicate where you want them. It's standard practice to try to position figures such that they are within two pages of where they are first mentioned in the text (this is actually why it's quite common to see author queries of the form "this figure isn't referenced in the text" - the publisher doesn't know where to position it). You don't have to position it yourself however, and it might even not be good use of your time, because by the final manuscript is not likely to look anything like the raw manuscript.

8

I've written several mathematics texts and one cs text. Each grew from class notes.

I think the only sensible formatting tool for a technical book these days is LaTeX. I've used it twice. While the book was under construction I generated PDF to distribute to students. In each case I did most of the writing before I had a publisher. When I found one they were delighted to take my LaTeX source and format the book with their own class and style files.

Separating form from function is one of LaTeX' major strengths. It's possible but unpleasant in MS Word. If you need equations there is nothing even close to the beautiful TeX typography.

Treat this as a serious software project. Use version control. Write lots of small macros that wrap LaTeX constructs, so you or the publisher can change the look without changing the content. Folks at TeX & LaTeX Stack Exchange will happily answer questions as you come up to speed. Check out the workflow tag there. There are standard ways to keep each chapter in its own file, create a table of contents and an index, put the answers to exercises at the end of the book, ...

1
  • Word's equations look much better since they revamped their equation editor to have typesetting more similar to TeX in Word 2007. At this point, most equations from Word's built-in equation editor are almost indistinguishable from LaTeX equations. Word still lacks some math basics, though, such as numbering equations without workarounds. Commented Apr 30, 2020 at 14:12
4

Since you don't seem to definitely need to publish this with a commercial or academic publisher for all your goals, I highly recommend making your book an "open educational resource". Whether or not you do, I still recommend trying out the new(ish) tool PreTeXt to write it.

One of the challenges of modern publishing is trying to synchronize web, print, pdf, e-pub, and/or other outputs. PreTeXt allows you to write one XML document (or rather set of documents, typically one per chapter that are included in a master file) that then handles all the output types. There are starting to be more and more custom html styles, and some LaTeX style info as well.

Some of the better-known mathematics texts using it are Active Calculus and Judson's Algebra, and the tool is certainly still math-centric in some ways, but it is already really quite flexible, including support for poetry and a fair amount of musical notation. Certainly for your purposes it sounds ideal, because you could use the best of showing web resources while still having full access to complex diagrams and mathematical notation done right. For reference, here is source for another reasonably well-used book using it.

One of the best parts (full disclosure: I have used this tool myself for some time and given some workshops on it) is that cross-referencing, video input, and many other VERY tedious related things are handled more or less automatically if you do them right the first time - for print and html. For my own project I now have to make only one character of edit for the LaTeX file to compile perfectly with xelatex using four different character sets, for instance.


No matter what tool you use, I do strongly suggest the following:

  • Put every biblio item in early on. Don't wait until later; it's horrible to do it later.
  • Cross-reference early and often, and then choose a tool that supports that being done easily and automatically.
  • Plan for multiple output formats. I have students using phones, tablets, computers, and print. And it really depends on the institution and the particular demographics, so if you want it to be usable many places, plan for that and use a tool which supports it.

You now know which tool I think works, but I think any tool which can do this is fine, and I imagine both some MS product combination and certain TeX-only tools may do so as well.

9
  • 3
    PreTeXt appears to be even more painful to type than LaTeX (I mean, it's an XML derivate...), and I'd be very surprised if it allows for even the simplest of LaTeX's macros and packages. Are there any tricks to it? Are there WYSIWYG editors around? Commented Sep 26, 2019 at 1:50
  • 1
    As for macros ... you'd be surprised, it is pretty flexible along those lines if you want LaTeX-only stuff. For web you may need to keep with MathJax-supported things, but that is still quite a bit. List at [email protected] is quite responsive.
    – kcrisman
    Commented Sep 26, 2019 at 1:54
  • 4
    As to git: I found the single-person part of the git workflow (commit, checkout and the likes -- basically, using git as a backup and history tool) extremely easy to grasp, but perhaps that's because I'm a combinatorialist. My impression is that git becomes ugly when you get to complicated (non-automatic) merge commits, which are however easily avoided if you have 1 or 2 contributors or more but with well-defined zones of action. Commented Sep 26, 2019 at 1:55
  • 1
    @darijgrinberg Given your interests, I will point out it also supports pretty good code example markup as well as live Sage, R, and presumably even Macaulay code ... but that seemed a bit beyond what the OP was asking about.
    – kcrisman
    Commented Sep 26, 2019 at 1:56
  • 1
    Git can be worth it, and the flow is good, but nowadays even "productivity suites" allow for things like checkpoints and reviewers, so it wouldn't be strictly necessary to start that additional learning curve, though it's not a bad idea to get used to. For instance, the difference between staged and unstaged changes takes quite a while to get used to even if you are familiar with VC in general.
    – kcrisman
    Commented Sep 26, 2019 at 1:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .