Next: Remote programming customization, Previous: Adding stock icons, Up: Customizing through XML files
GPS has support for textual (as opposed to binary format like PDF) documentation format. A textual documentation format can be described using external template files. This way, it is possible to add support for new textual documentation format by providing a set of templates files.
The node name to define a new documentation format is docgen_backend.
The attributes for this node are:
name (string)format (string)There are two categories of children. One is to describe the format
itself, the other is to specify the set of template to use. In the
latter case the children's name are ending with _template:
extensiondescriptionfile_header_templatefile_footer_templatecomment_templatekeyword_templatestring_templatechar_templatesubtitle_templatepackage_desc_templatepackage_templatewith_templatevariable_templateexception_templatetype_templatetagged_type_templatecalls_references_templatecaller_references_templateentity_templatesubprogram_templateheader_templatefooter_templateprivate_header_templatemain_frame_templateunit_index_header_templatesubprogram_index_header_templatetype_index_header_templatetagged_type_index_header_templateitem_index_templatetagged_type_index_templateprivate_index_header_templatepublic_index_header_templateindex_footer_templateblock_templatelink_templatedescription_templateAll template files are given as relative path. GPS will first look for the
template file under share/gps/docgen and if not found it looks
under $HOME/.gps/docgen.
A template file is a file that contains tags and commands. Those files
are parsed by the Templates Parser module as found in
AWS. We give hereafter a short description of this format, for
a complete description see the Templates Parser User's Guide.
simple tag@_ and _@ like in
@_NAME_@. The templates engine will replace @_NAME_@
with the value associated with the tag named NAME.
vector tagTABLE command tag.
For example, if the vector tag COLOR contains the three values Red, Green and Blue then:
@@TABLE@@
> @_COLOR_@
@@END_TABLE@@
Will be expanded as:
> Red
> Green
> Blue
filterUPPER filter in the previous
example.
@@TABLE@@
> @_UPPER:COLOR_@
@@END_TABLE@@
Will be expanded as:
> RED
> GREEN
> BLUE
It exists many filters, see the Template Parser User's Guide for a complete description.
Note that each HTML template files, provided with GPS, contains a complete description of the usage of each tag in the header comments.