Creating Nice ClaRa Documentation

Created Monday 07 January 2013

Layout


to be conform with the ClaRa colour scheme:

to use the ClaRa colors within the LaTEX equation environment:


Exporting a zim notebook to html

can be easily performed. For this html-Templeates are used.

The default ones are located in

Windows: <Path to Zim.exe>/share/zim/templates/html
LINUX: ~/.local/share/zim/templates

These are css style sheets together with a zim template wiki.
This defines how a wiki page is translated to html.

However upon exporting, one can also choose template-->other-->browse
in order to use an individual style. Such a style should be adapted from

"Path to zim.exe"\share\zim\templates\html\Default_with_index.html
or
"Path to zim.exe"\share\zim\templates\html\Print.html
or one of the other files in this folder.

ALWAYS export to separate files for each of the wiki pages. It enables prper navigation in the html file structure.

Exporting a zim notebook to pdf

To create nice LaTEX generated pdf documentation from a zim wiki the following steps are to be considered:

  1. ALWAYS export to a single tex file! Name the file as the Library is named, e.g. ClaRa.tex. The file ending is essential
  2. in order to ensure that the figures are scaled appropriately modify the Python function creating the LaTEX source code (which can be found under Linux in /usr/share/pyshareim/formats/latex.py )as follows:
    1. replace line 189 to 199. This will make all figures having a width of the half textwidth. Therefore arrange at maximum two figures next to each other
OLD: if 'width' in attrib and not 'height' in attrib:
options = 'width=%fin/1000*\\textwidth, keepaspectratio=true' \
% ( float(attrib['width']) / dpi )
elif 'height' in attrib and not 'width' in attrib:
options = 'height=%fin/1500*\\textheight, keepaspectratio=true' \
% ( float(attrib['height']) / dpi )
elif 'height' in attrib and 'width' in attrib:
options = 'height=%fin/1500*\\textheight, width=%fin/1000*\\textwidth' \
% ( float(attrib['height']) / dpi, float(attrib['width']) / dpi )
else:
options = 'width = \\textwidth, keepaspectratio=true'
NEW: options = 'width = 0.5\\textwidth, keepaspectratio=true'
  1. replace text in line 187. This will allow also non-equation elements in the ZIM equation elements to be compiled.
OLD: return ['\\begin{math}\n', equation, '\n\\end{math}']
NEW: return [equation]
  1. make sure that the \begin{align*} and \end{align*} are commented out as done in ./equationeditor.tex . This requires all equations to be within a math environment (\begin{math}... \end{math}) but also allow non-equation content within the equation objects.
  2. To allow longtables for nomenclature display make sure that the following lines are included in
./equationeditor.tex
  1. \usepackage{multirow}
\usepackage{longtable}
\setlength{\paperheight}{800mm}
\setlength{\textheight}{500mm}
  1. A template for creating appropriate long tables is included in the templates for the Function , Physical Model and Replaceable Model

Further Reading

Notice the dyncap color color scheme defined in ./Dyncap_Manual_2013_v2.pdf