How to create or modify a style, add an html header or footer
Introduction to Styles
The html pages created by Cod2Doc rely entirely on
cascading style sheets (CSS). It allows
you to separate clearly the content of the html page and the style used for this page.
It means that you can change without limits the aspect of the documentation created
by Cod2Doc. You can for instance adapt the style to the one you have for your web page!
A complete documentation on cascading style sheets may be found
here in several languages. Please refer to these specifications
when you want to modify or to add a style for Cod2Doc.
If you have created
a new style, please contribute to Cod2Doc (see
this section for
more details).
Notice that the Cod2Doc and BlitzBasic styles are unfortunately not compatible with
the old version of
Netscape 4.06 (if you are able to create a style compatible with it, then
tell me ;). However these styles are fully compatible with Netscape 6+.
Style for Cod2Doc
All the style files (.css) are inside the
Styles\ directory located in the directory
where was installed Cod2Doc.
The style files consist of
different sections concerning the layout of the body, of the
tables, of the titles, ... Each section is commented carefully so that it shouldn't be too
difficult (after a few tries ;) to edit a section.
To modify these files, you have to edit them in a text editor. Please refer to the comments
inside these files for more help. In particular, you can:
- Modify the behaviour of links.
- Change the layout/colour/font of titles, tables, cells in tables, etc.
- Have a specific colour for every different categories (variables, types, functions, etc.).
- Modify the colour/size of function arguments or function/type variables.
- Modify the behaviour of lists (bullet, ...).
- Add new sections in the .css file like H1 { }, em { }, etc.
- And everything that CSS allows you to do!
See next section if you wish to include textures or images to the style.
If you have modified a style or have created a new style, then simply put this .css file
in the
Styles\ directory. Cod2Doc, at the next restart, will automatically recognize it and
list it in the
style section of the main window.
How to put images with style files
You can easily add images or textures to styles. You can use for example the property
background-image in the
.css file (see documentations on CSS for more details).
To add images in Cod2Doc, just put your image(s) in the
Styles\ folder and name it with the same beginning as
the .css file. For example, for the myStyle.css file, just name your image myStyleBkg.jpg or myStyle1.gif,
or whatever beginning with myStyle...
Add your own style to Cod2Doc
If you have
created a nice style in Cod2Doc or have improved an existing style
and would like to share it with other
Cod2Doc users, then please do!! Every contribution would be
very welcome. Of
course, your contribution will be mentioned in the credit (what a reward!). Please, be sure that your new style
is compatible with both
Internet Explorer and
Netscape 6+...
Send the .css file (and the images if present) to
repeatuntil@free.fr (if you wish, put a comment with your name/pseudo in
the first lines as a comment). If possible, let the comments describing each style section in
the .css files (as in the existing styles).
If your style is nice, it would be a pleasure for the author to include it in Cod2Doc!
Add an html header or footer to the documentation
You can add an html header and/or footer to your documentation. To do this, please use the
main window of Cod2Doc, under the
"Html" tab. The header will appear
at the top of all your documented files: it could be useful to insert some pictures, some general
links, etc. The footer will appear at the bottom of all your documented files, and could be used
to insert disclaimer, links, etc.
The header and the footer are in the
html format. Links, images, etc, should be written in
html (use an html editor if you don't know the html language ;).
In the interface, you could specify a .txt, .html file, or any type of file. If Cod2Doc detects
that the file is in html format, it will automatically extract all the html code between <body>
and </body> (so that you could use directly the result of an html editor).