Next: , Previous: , Up: GNU libtextstyle   [Contents][Index]


3 The programmer’s perspective

As a programmer, enabling styling consists of the following tasks:

  1. Define the command-line options and environment variable that the user can use to control the styling.
  2. 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.
  3. Change the output routines so that they take an ‘ostream_t’ object as argument instead of a ‘FILE *’.
  4. Insert paired invocations to styled_ostream_begin_css_class, styled_ostream_end_css_class around each run of text with a specific text role.
  5. Link with libtextstyle. If your package is using GNU autoconf, you can use the libtextstyle.m4 macro from Gnulib.
  6. Prepare a default style file.
  7. Update the documentation of your package.

The following sections go into more detail.