For simple cases, all that is required is a package name
and a preamble that just contains a \usepackage
command.
See the example below.
More complex cases may involve adding a prefix
and
a suffix
that, for example, begins and ends a 'LaTeX'
environment.
Advanced cases may involve writing functions init
,
special
, and final
, which are called to handle DVI
specials. The predefined
support for 'TikZ' is a particularly complicated example.