3 The programmer’s perspective ¶
As a programmer, enabling styling consists of the following tasks:
- Define the command-line options and environment variable that the user
can use to control the styling.
- Define the CSS classes that the user can use in the CSS file. Each CSS
class corresponds to a text role; each CSS class can be given a different
styling by the user.
- Change the output routines so that they take an ‘ostream_t’ object
as argument instead of a ‘FILE *’.
- Insert paired invocations to
styled_ostream_begin_css_class
,
styled_ostream_end_css_class
around each run of text with a
specific text role.
- Link with
libtextstyle
. If your package is using GNU autoconf,
you can use the libtextstyle.m4
macro from Gnulib.
- Prepare a default style file.
- Update the documentation of your package.
The following sections go into more detail.