Configuration File: options.yml
Each report needs a configuration file, usually named as options.yml
(or any other name with a .yml
extension). Without it, NoTex will not be able to translate the report (made of various rST files) to PDF, LaTex or HTML. The file is written in the YAML standard, which is a human friendly way of describing a configuration.
In addition to the default YAML features, it supports string interpolation: That means, that once you define a left-hand side key
with a value
, then you can use this key on the right-hand side as a placeholder for the value to define other keys, e.g.:
author: 'AUTHORs'
copyright: '${date %Y}, ${author}'
One can set the key author
to the value AUTHORs
, and later on set the key copyright
to ${date %Y} ${author}
. Therefore copyright
will contain the value 2012, AUTHORs
. Using interpolation you can avoid repeating yourself and need to define keys like author
only once.
The example above demonstrates another feature, where you can use pre-defined tags, which represent dynamic content, to set the keys. So ${date %Y}
would be 2012
if the current year were 2012, or ${date}
would be 2012-05-03
if the current date were May 3rd, 2012. The supported tags are: date
, time
and datetime
whereas the optional argument describes the format you want the date/time to be in; see format options for further information.
Another feature are pre-defined filters that do some post-processing for a given value: quote
makes a value URL friendly and swap
exchanges a given argument with another one, e.g.
-
${My Project|quote}
will result inMy+Project
, -
${Your Project|swap Your His}
will result inHis Project
, and -
${My Project|swap My His|quote}
will result inHis+Project
.
In configuration files the quote
filter may be used, if the back-end cannot handle certain project name values (e.g. such containing a space). Filters can be combined with pre-defined tags and user-defined keys.