[[TOC]] = Submitting Documentation = When submitting documentation to GRASS SVN repository, please take care of following rules: There are two types of documentation - Libraries programmers docs: we [http://grass.osgeo.org/programming7/ use doxygen and document the functions] directly in the source code. See lib/gis/*.c and lib/gis/gislib.dox for examples - User manual: we write it in simple HTML, storing the manual in a file '.html' within the subdirectory of the module. The file contains no header nor footer. The complete HTML file is autogenerated during the compilation process (indeed, it is generated in a virtual session directly after compilation of the module). In this virtual session the module is called internally with --html-description which generates the parameters/flags list in HTML format, along with '.html', HTML header and footer the final HTML manual page is created and stored in the target binaries directory. In a separate process, the MAN format is generated from the complete HTML files. See also http://grass.osgeo.org/wiki/Updating_GRASS_Documentation == HTML Pages == Editing of HTML pages To avoid insertion of too complicated HTML tags (see also below), we strongly suggest to use a plain text editor rather than a HTML editor for editing. === Module Manual Pages === Module manual page: Place the documentation in HTML format into '.html', where is the name of the module. E.g. if the module is named r.example, the documentation file should be named r.example.html. The easiest way to do this is to study an existing HTML page (to get the page style, e.g. vector/v.to.db/v.to.db.html). With a few exceptions, header and footer are NOT allowed. You can add figures (PNG format); the figure name prefix should be the module name. See raster/r.terraflow/r.terraflow.html for an example. A number of major sections should be present in each help page. * = Required ! = Suggested . = Optional In recommended order -------------------- *

DESCRIPTION

!

NOTE

,

NOTES

!

EXAMPLE

,

EXAMPLES

.

TODO

.

BUGS

.

REFERENCE

,

REFERENCES

*

SEE ALSO

*

AUTHOR

,

AUTHORS

Note that the parameter information is auto-generated upon compilation. This is done by running the module in a virtual session after compilation (see the output of 'make'). To subsequently verify the final HTML page, check the resulting HTML pages which will be stored with the name of the module. Examples (please add some) should be coded like this:
   v.to.db map=soils type=area option=area column=area_size unit=h
   
The online WWW man pages is updated every Saturday (from SVN repository). === Supported HTML Tags === Usage of limited HTML tags Since the MAN conversion of g.html2man is limited, please use no other HTML tags than:


    1.   
      <tr> <ul> Note that all tags has a closing tag except for <hr/>, <br/> and <p>. Use lower case forms. (The MAN converter is here: tools/g.html2man/) === Markup Protocol === Suggested HTML markup protocol: Module names (i.e., v.category) should be emphsized with <em>, and boldface <b> for flags and parameter names. Shell commands, names, values, etc. should use <tt>. Empahsized phrases should use italics <i>. The SEE ALSO section of each page should also be alphabetized. == SVN Properties == When submitting new files to the repository set SVN properties, e.g. for HTML file svn:mime-type : text/html svn:keywords : Author Date Id svn:eol-style : native See http://svnbook.red-bean.com/en/1.4/svn.advanced.props.html You can also simply use this script: http://svn.osgeo.org/grass/grass-addons/tools/module_svn_propset.sh == Images == Compress PNG images with optipng -o5 file.png