This output format is used an intermediate step in automatic ID from title, that unlike the regular HTML output does not have any tags.
It does not have serious applications to end users. We decided to expose it from the CLI mostly for fun, as it posed no extra work at all as it is treated internally exactly like any other conversion format.
The
id
output format conversion is very simplistic: it basically just extracts the content
argument of most macros.An important exception to that behaviour is the first argument of the
\x
macro: see \x
id
output format.For example, converting:with the instead of the HTML output:
\i[asdf]
id
output format produces simply:asdf
<i>asdf</i>
This conversion type is useful in situations that users don't expect conversion to produce any HTML tags. For example, you could create a header:and then following the automatic ID from title algorithm, that header would have the more commonly desired ID
= My \i[asdf]
my-asdf
, and not my-<i>asdf</i>
or my-i-asdf-i
.Similarly, any macro argument that references an ID undergoes which is equivalent to:
id
output format conversion. E.g. the above header could be referenced by:<My \i[asdf]>
\x[my-asdf]
Besides being more intuitive, this conversion also guarantees greater format portability, in case we ever decide to support other output formats besides HTML!
Macros that don't have a
content
argument are just completely removed, i.e. typically non-textual macros such as images. We could put effort in outputting their title argument correctly, but meh, not worth the effort.The
id
output format also serves as a good start generalizing OurBigBook to multiple outputs, as this is a simple format.