The documentation system tenet of decoupled rendering states that the documentation system should generate documentation in multiple formats automatically, from a single canonical source, without forcing authors to reauthor documents for each format. This tenet supports the principle of truth proximity by promoting the generation of documents from a single canonical source.

While a tenet like this could be expressed as something more mundane such as ‘content/layout separation’, this would confuse the means with the end. It is most definitely useful to use document formats that separate content structure from its presentation, but the ultimate goal is to be able to treat rendering as a discrete stage which produces—as required—multiple document file formats. For example:
The point of decoupled rendering is not the thoughtless generation of the target file format in the quickest way possible, but embracing the advantages, capabilities, and best practices inherent to each format.
Let’s now spend some time looking at the peculiarities of some of the most widespread file formats.
In a contemporary documentation system we assume that HTML is the primary, or ‘default’ format. All documentation is rendered—not necessarily authored—in HTML by default. In fact, we use the term the documentation platform to refer to the primary web-based application in a documentation system.
However, the fact that our documentation platform renders its content as HTML doesn’t mean that we necessarily have much control over its HTML rendering process. For example:
<div class="heading-1"> rather than <h1>. We may also want to apply responsive web design and accessibility best practices which may not be directly supported by our documentation platform.
Portable Document Format (PDF) is the de facto file format for documents whose ultimate destination is paper. However, most PDF documents are visualized directly on the screen and never printed—good for the ecology, but not always the ideal document format for this use case.
PDF is an interoperable file format which can be opened on Windows, Linux, MacOS, mobile phones and pretty much any modern computing device, without the need to install third party software. As just mentioned, users and enterprises use this format for a variety of reasons which might be unrelated to the explicit choice of the paper medium:
Simply converting an HTML document to PDF results in, at best, in unprofessional results, at worst in a broken document. Instead, what we may need is to translate the documents to a format whose native medium is paper-oriented—such as LaTeX—as an intermediate step rather than ‘printing’ a web page onto a PDF file directly. Why go through this trouble? Because paper works differently than computer screens:
Paper directives can also be expressed in HTML/CSS itself using @media directives, but they are different directives than those that apply to screen-bound use cases. In other words, screen and printer render targets require separate considerations and strategies.
It is a pity that most enterprises assume that PDF suffices as the sole ‘offline’ documentation file format. Given that most PDFs are never printed, e-books offer several advantages over PDF, for offline use cases:
Popular word processors include Microsoft Word, Google Docs, and Open Office’s Writer. The problem with these formats, unlike HTML, PDF, and E-Books, is that they are authoring formats which entangle both content and presentation properties, making it inconvenient to treat in a programmatic manner.
The reason as to why such formats may still be necessary is because there might be a legacy business or engineering process which demands documents in these formats, or simply because they might serve as an offline ‘backup’ editable version of online documents—unlike PDFs in which copy paste does not always work consistently.
© 2022-2025 Ernesto Garbarino | Contact me at ernesto@garba.org