Table of Contents
On this page, we explain how you can compile this documentation on your own and give some basics and hints on how to document in markdown pages as well as inside your code (especially when commenting longer sections).
Building this Documentation
Requirements
- Rights to write inside the
docdirectory - common bash tools (
egrep,sed, ...) - Doxygen and graphviz (for graph visualizations)
- PHP (for FAQ generation)
- Python 2.7 or newer with
re,sysandargparseimportable (for FAQ generation) - a working LaTeX installation (for formulas inside the use cases)
- a fully linked and functional default installation of the most recent GCG (used to read the current interactive menu and settings file)
- a javascript-enabled browser
Additional Notes
For macOS Users (tested with Catalina):
To compile the SCIP documentation, please install gnu-sed and add it to your path. (For the GCG documentation, this is not needed.)
Instructions
The documentation for your installed GCG version including its code can be generated using a simple
make doc
inside the GCG root directory. Alternatively, one can also navigate to the folder doc and execute the corresponding script
./builddoc.sh
Please always make sure that the Requirements (as mentioned above) are met for your installation.
Important Information
Subpage Indexing
Subpage indexing for Howtos (use and add), as well as all classifiers and detectors is being built automatically. If one is added, it will be made a subpage of the respective parent page and automatically linked on it upon the next make doc.
FAQ
The FAQ are generated using PHP. The questions can be added in the file /doc/resources/misc/faq/faqtext.txt.
Documenting in this Documentation
How to add new pages
Folder structure
You can move and create folders and pages (see below) as you like inside the folder resources, but remember to add new folder paths to INPUT in gcg.dxy (vicinity of line 787). Note that the pages will not automatically be subpages of the containing folder's main page. To make this the case, you have to add a tag \@subpage to the containing page.
.md files
The first line has to be of the form
in the right folder.
Important: For all pages that are referenced by the subpage indexing scripts (see above), the filename has to match the page identifier (xy.md <-> \{\#xy\}).
Some of the main features of .md files are explained in the following.
HTML compatibility
The Markdown format is based on HTML, with more restricted, but better readable functionalities. Thus, most HTML tags (such as iframes, anchors, embeds, etc.) can be used in the .md file. If you intend on only adding HTML code, use the tag \htmlinclude HTMLFILE.
Referencing
You can reference other pages using @ref.
Adding Pictures
Copy your picture to doc/pictures/. If used in a md file, it will automatically be moved to the html/ folder. Add a tag . If you need to control the image size, use HTML: \image html picture.png "caption width=50%</tt>
@section autotoc_md62 Markdown Basics
In the following, you will be presented code snippets and their result after compiling
the markdown code.
Code:
@verbatim
```C
int main()
```
@endverbatim
Result:
@code{C}
int main()
@endcode
\n
Code:
@verbatim
`cd ..`
@endverbatim
Result: <tt>cd ..</tt>
\n
Code:
@verbatim
## Title 1
### Subtitle 1
#### Subsubtitle 1
@endverbatim
Result:
@subsection autotoc_md63 Title 1
<h3>Subtitle 1</h3>
<h4>Subsubtitle 1</h4>
\n
Code:
@verbatim
**This is the title of a section**
@endverbatim
Result: <strong>This is the title of a section</strong>
\n
Code:
@verbatim
@ref doc "Title of the link to this page"
@endverbatim
Result: @ref doc "Title of the link to this page"
\n
Code:
@verbatim
[This is the title of the link to Google](https://www.google.com)
@endverbatim
Result: <a href="https://www.google.com" >This is the title of the link to Google</a>
\n
Code:
@verbatim
<a href="https://www.google.com">Another Link to Google</a>
@endverbatim
Result: <a href="https://www.google.com">Another Link to Google</a>
<strong>For more information on Basic Markdown Syntax, visit <a href="https://help.github.com/en/articles/basic-writing-and-formatting-syntax" >this page.