DE AutoDoc - Part III   Creating Individual Layouts With Templates

Contents

  1. Cascading Stylesheet (CSS) Definitions
    1. General Settings
    2. Settings for Documentation Components
    3. Settings for the Tree View
    4. Settings for IFrames and ITreeFrames
  2. Header and Footer Insert Files
  3. Template Files
    1. Introduction
    2. Templ_File.htm and Templ_File_Epub.htm
    3. Templ_Index.htm
    4. Templ_List.htm
    5. Templ_Frames.htm
    6. Templ_IFrames.htm
    7. Templ_LaTeX.tex
    8. Templ_PDFLaTeX.tex

 


Cascading Stylesheet (CSS) Definitions

The standard Cascading Stylesheet (CSS) file Autodoc.css is located in the program directorie's sub-folder templates. If you want to apply individual changes, you might copy it into a folder of your choice and use the -template command line parameter or the css parameter in the configuration file to set your copy as the stylesheet to be used by the program.

For ePub output, the slightly modified file Autodoc_Epub.css is used, which contains relative measures, like em, ex instead of fixed measures, like pt, px. This enables scaling in an ePub reader.

 

General Settings

The first section of the CSS file contains the general settings. Here is defined, how the standard HTML elements, like <body>, <p>, tables and headings, etc., should look like.

 

Settings for Documentation Components

In the second section of the CSS file, the elements of the documentation are defined. The following CSS classes are used:

ClassElements
footerThe div containing the footer insert file (if specified).
docsectionFormats for a new document section, like headers, etc.
fileheadingFormats for a new file within the documentation. Used for page break.
indexFormats for the index at the beginning of a file and the index summary.
paramFormats for the sub-tags table output.
structFormats for the structure output (default).
structdetailFormats for the structure detail output.
structSectionFormats for the structure output of section tags (@progsection).
structIncludeFormats for the structure output of the @includes tag.
subtagFormats the enclosing div element of sub tags (see example below).
varsumFormats for the variable summary table output.
varsumFormats for the variable summary table output.
funcsumFormats for the function summary table output.
funcdetailFormats for the function detail output.
blockFormat for @code tag in block mode.
inlineFormat for @code tag in inline mode.
listFormat for left frame of the "frames" and "treeframes" output.
logoFormat for img tag formatting the output of the logo image.
sub-tag-nameFormats the enclosing div element of a certain sub tag (see example below).

Also, it is possible to change the output of every sub tag or each sub tag indivisually. The sub tag output is wrapped into a div element, which gets the class name "subtag" and additionally the sub tag name as second class. For example a CSS definition like:

div.attention
{
    border-left-style: solid;
    border-left-width: 5px;
    border-left-color: #ff0000;
    padding-left: 5px;
}

will add a tick red border at the left of the @attention tag's output. And

div.subtag
{
    border-left-style: solid;
    border-left-width: 5px;
    border-left-color: #ff0000;
    padding-left: 5px;
}

would do the same with all sub tags.

 

Settings for the Tree View

In the third section, the tree view in the left frame of the "frames" and "treeframes" output are defined. The CSS class is "indexTree" and is an unordered list (<ul>).

 

Settings for IFrames and ITreeFrames

In the fourth section, there are special settings for the "iframes" and "itreeframes" output are defined. These classes are used:

ClassElements
FramesThe settings for the html and body tags.
MainTableThe settings for the main table div of the main iframe file, containing the head and body.
HeadThe settings for the head div of the main iframe file, use for the header.
BodyThe settings for the body div of the main iframe file, which encloses the left list and the content.
LeftlistThe settings for the left frame div of the main iframe file, where the index tree appears.
ContentThe settings for the right content frame div of the main iframe file, where the actual documentation appears.

 


Header and Footer Insert Files

Via the headins and footins command line of configuration files parameter, you can specify a header insert file and/or a footer insert file respectively.

The content of the header insert file is, per default, placed between the <head> and </head> as the last entry. Here, you can define meta tags, java scripts, own styles, etc.

The footer insert file is, per default, placed in a div block between the pages <address> and </address>. Here, you can insert copyright notices, etc.

 


Template Files

Introduction

Since version 1.0.3 the of the documentation files is not hard coded into the program, but instead inserted at certain positions in template files. This allows the user to define own template files and influence the look of the documetation. For example, a company can change the templates to match it's coprporate identity look.

The template files are located in the programs templates directory and, as with the CSS file, can be copied into another directory and changed. This directory can be specified using the templatedir command line parameter or configuration file parameter.

To enable more flexibility, you may create a res folder within your templates folder, in which you can place additional files. These files are all copied into the output directory. This way you are able to add additional components, like stylesheets or images to your output, which you can also use in your own user defined templates.

There are four types of template files in AutoDoc:

Template FileDescription
Templ_File.htmThis is the template for the output of each individual file's documentation.
Templ_Index.htmThis is the template for the output of the documentation summary. (In a framed output shown in the right frame.)
Templ_List.htmThis is the template for the output the index tree in the left frame (frames and treeframes output type only).
Templ_Frames.htmThis is the template for the output the frame set (frames and treeframes output type only).
Templ_IFrames.htmThis is the template for the output the iframe set (iframes and itreeframes output type only).

 

Templ_File.htm and Templ_File_Epub.htm

The documentations content will be inserted into these template files at the points specified by replacement variables. For the Templ_File.htm these replacement variables are defined in the template:

Replacement VariableDescription
%TITLE%Here the title specified by the title parameter is inserted.
%HEADINS%Here the content fo the header insert file is inserted.
%CONTENT%Here the documentation's content is inserted.
%FOOTINS%Here the content fo the footer insert file is inserted.

For ePub output the template file Templ_File_Epub.htm is used, since ePub format requires special document types. The replacement variables are the same.

 

Templ_Index.htm

For the Templ_Index.htm these replacement variables are defined in the template:

Replacement VariableDescription
%TITLE%Here the title specified by the title parameter is inserted.
%HEADINS%Here the content fo the header insert file is inserted.
%INDEXCONTENT%Here the documentation's index is inserted.
%FOOTINS%Here the content fo the footer insert file is inserted.

 

Templ_List.htm

For the Templ_List.htm these replacement variables are defined in the template:

Replacement VariableDescription
%TITLE%Here the title specified by the title parameter is inserted.
%JSTREELIST%Here the JavaScript part for the TreeView is inserted.
%LISTCONTENT%Here the documentation's index tree is inserted.

 

Templ_Frames.htm

For the Templ_Frames.htm these replacement variables are defined in the template:

Replacement VariableDescription
%TITLE%Here the title specified by the title parameter is inserted.
%HEADINS%Here the content fo the header insert file is inserted.

Templ_IFrames.htm

For the Templ_IFrames.htm these replacement variables are defined in the template:

Replacement VariableDescription
%TITLE%Here the title specified by the title parameter is inserted.
%HEADINS%Here the content fo the header insert file is inserted.
%LOGOIMG%Here the logo image defined by the logo parameter is inserted.

Templ_LaTeX.tex

For the Templ_LaTeX.tex these replacement variables are defined in the template:

Replacement VariableDescription
%TITLE%Here the title specified by the title parameter is inserted.
%AUTHOR%Here the authors are inserted.
%CONTENT%Here the documentation's content is inserted.
%HEADINS%Here the content fo the header insert file is inserted.
%FOOTINS%Here the content fo the footer insert file is inserted.

Templ_PDFLaTeX.tex

For the Templ_PDFLaTeX.tex these replacement variables are defined in the template:

Replacement VariableDescription
%TITLE%Here the title specified by the title parameter is inserted.
%AUTHOR%Here the authors are inserted.
%CONTENT%Here the documentation's content is inserted.
%HEADINS%Here the content fo the header insert file is inserted.
%FOOTINS%Here the content fo the footer insert file is inserted.