Typographical tools for control over the appearance of printed text
Most scholars of course use a wordprocessor or commercial desktop publishing tool to format works for publication in print, and the control over appearance and layout is usually adequate for these needs. Free and open source tools such as OpenOffice and its successor LibreOffice also exist in this space.
Some scholars prefer the flexibility and platform independence combined with fine, submillimenter text placement and styling control offered by the typographical programming language LaTeX. This is generally not a wysiwyg solution, and so preferred by technically advanced users.
Transformation from underlying XML/database data
Data that has been prepared in a non-visual, usually semantic format, such as TEI XML, a relational database, or Linked Open Data may be transformed at a publication stage into human-readable format for publication. This transformation is usually into online (i.e. HTML) display or individual pages, indexed serializations of data, or search result pages, but most of these might also be transformed into PDF or other print-ready formats.
For examples, an XML corpus of texts can be transformed using XSLT to web pages or LaTeX, or via XSL:FO into PDF or Postscript files with specific, millimeter-perfect dimensions and so forth.
(to be added)