Contents Previous Next

Defining a Setting for a Specific Target

All the settings (except %!target) can be glued with a specific target using the %!key(target): value syntax. This way user can define different config for different targets.

This is specially useful in the pre/postproc filters, but is applicable to all settings. For example, defining different styles for HTML and LaTeX:

%!style(html): fancy.css
%!style(tex) : amssymb

For the options setting it's very useful to adjust the converted document:

%!target: sgml
%!options(sgml): --toc
%!options(html): --style foo.css
%!options(txt ): --toc-only --toc-level 2

In this example, the default target is Sgml and it will use TOC. If the user run txt2tags -t html file.t2t, only the HTML options will be used, so the converted file will use "foo.css" style file and will have no TOC.


Contents Previous Next