0024269: Content of occt documentation should be formated
[occt.git] / dox / dev_guides / documentation / documentation.md
CommitLineData
72b7576f 1 Documentation {#dev_guides__documentation}
2=================
3
4@section OCCT_DM_SECTION_1 Introduction
5
6This document provides practical guidenes for generation and editing of OCCT user documentation.
7
8@section OCCT_DM_SECTION_2 Prerequisites
9
10<b>Tcl/Tk</b>
11The lates version: http://www.tcl.tk/software/tcltk/download.html
12
13<b>Doxygen</b> ( >= 1.8.4 )
14The latest version: http://www.stack.nl/~dimitri/doxygen/download.html
15
16<b>MathJax</b> (used for rendering math formulas in browser). Download it for local installation or use the MathJax Content Delivery Network. \(read
17@htmlonly <a href="#OCCT_DM_SECTION_A_9">Formulas</a> @endhtmlonly paragraph for more detailed description\).
18The latest version: http://www.mathjax.org/download/
19
20<b>MiKTeX</b> or equivalent tool (used for PDF document creation)
21Latest version: http://miktex.org/download
22
dba69de2 23**Note**: to generate pdf documentation with MiKTeX you should execute gen.bat with MiKTeX environment
24(e.g. into MiKTeX command promt)
25
72b7576f 26@section OCCT_DM_SECTION_2_1 Documentation Generation
27
28Run gendoc.bat from OCCT directory to generate all articles are defined in FILES.txt:
29
30gendoc.bat options:
31
32 * -html : To generate HTML files (cannot be used with -pdf);
33 * -pdf : To generate PDF files (cannot be used with -html);
34 * -m=<modules_list> : Specifies list of articles to generate. If it is not specified, all files, mentioned in FILES.txt are processed;
35 * -l=<document_name> : Specifies the article caption for a single document;
36 * -h : Prints help message;
37 * -v : Specifies the Verbose mode (info on all script actions is shown).
38
39If you run the command without arguments (like example above) it will generate HTML documentation
40for all articles are defined into FILES.txt.
41
42**Note**: the generation process generates PDF files for each article,
43but in html case it generates common Html page with references to the ones.
44
45For generation of specific article you need:
46 * have it's name with relative path (from \%OCCDIR\%/dox/ to the file) contained in FILES.txt
47 (is located into \%OCCDIR\%/dox/ directory).
48
49@verbatim
50devs_guid/documentation/documentation.md
51@endverbatim
52
53where documentation .md is name of article and devs_guid/documentation/ is relative path of it
54
55 * use this name with -m option in the generation process:
56
57@verbatim
58% gen.bat -html -m=devs_guid/documentation/documentation.md
59@endverbatim
60
61Multiple files are separated with comma:
62
63@verbatim
64% gen.bat -html -m=MD_FILE_1,MD_FILE_2
65@endverbatim
66
67To sepcify a article name with -l option, use tcl list to prevent whitespaces incorrect interpretation:
68
69@verbatim
70% gen.bat -pdf -m=MD_FILE_1 -l=[list MD File 1 Label]
71@endverbatim
72
73@section OCCT_DM_SECTION_3 Documentation Conventions
74
75This section contains information about conventions in the field of OCCT documentation file format,
76structure of documentation directories, etc.
77
78@subsection OCCT_DM_SECTION_3_1 File Format
79
80It is proposed to use MarkDown file format for easy maintainance of generic text documents.
81The MarkDown files have a "*.md" extension and are based on rules desribed in
82@htmlonly <a href="#OCCT_DM_SECTION_A">Document Syntax</a> @endhtmlonly section.
83
84@subsection OCCT_DM_SECTION_3_2 Directory Structure
85
dba69de2 86@image html /dev_guides/documentation/images/documentation_image001.png
87@image latex /dev_guides/documentation/images/documentation_image001.png
72b7576f 88
89Every separate article has own folder if images are used in it. These images
90are stored into "images" subfolder.
91
92If you want to use the same image for several articles, you can place the one into "dox/resources" folder.
93
94**Note**: Every article can use any image that is used by others articles. To avoid incorrect image
95displaying, use relative path to the image (starting from dox folder). For instance
96@verbatim
dba69de2 97@image html /dev_guides/snv/images/snv_image001.svg
72b7576f 98@endverbatim
99
100Result of generation of the documentation is:
101
102%OCCT_DIR% / doc - a folder for generated articles;
103 * html/ - a directory for generated HTML pages;
104 * pdf/ - a directory for generated PDF files.
105
106@section OCCT_DM_SECTION_4 Adding a New Article
107
108 - Place a new article into folder that is chosen taking into account the place of the article
109at the hierarchy of the documentation. For instance the article about "using SVN working with OCCT
dba69de2 110source code" (svn.md - the file of the article) might be placed into /dox/dev_guides/ . If the article has images then you may create
72b7576f 111the own folder of the article and subfolder in it for images. For instance
dba69de2 112*/dox/dev_guides/svn/ - for svn.md file
113*/dox/dev_guides/svn/images/ - for images
72b7576f 114
115 - Update dox/FILES.txt to add relative path to svn.md. For instance
116@verbatim
dba69de2 117dev_guides/snv/svn.md
72b7576f 118@endverbatim
119
120**Note**: the place of the relative path to an article is connected with the place
121into treeview of html version.
122
123
124Note, that you should specify a file tag, not the document name.
125See <a href="#OCCT_DM_SECTION_A_1">Header section</a> for details.
126
127@section OCCT_DOC_SECTION_5 Additional Resources
128
129More information about OCCT can be found at http://www.opencascade.org
130
131The information on formula syntax can be found at:
132http://en.wikipedia.org/wiki/Help:Displaying_a_formula
133
134More information on MarkDown and Doxygen syntax can be found at:
135http://www.stack.nl/~dimitri/doxygen/manual