t-motivator /

Filename Size Date modified Message
303 B
2.1 KB
387 B
5.6 KB

Motivators

This module serves instructional purposes mainly. Its goal is to demonstrate, employing a fun and broadly known theme, the basic components of a ConTeXt MkIV module. It does not add new functionality but rather combines existing facilities as provided by the ConTeXt core.

Usage

The user interface follows the standard ConTeXt way of macro programming: Firstly, a motivator will have to be defined via \definemotivator[name]. After that it can be customized by means of \setupmotivator[name][...=...]. Now the command \name (corresponding to its definition) is generated and configured, so it is ready to be employed in the document.

The sample file mtext.tex shows the default and two further motivators in action. A minimal usage demonstration would look as follows

\usemodule [motivator]
\definemotivator [mymotivator] [
image=mill,
maintext=mills,
subtext=can’t stop fighting ’em,
]

\starttext
\mymotivator
\stoptext


The parameters for \setupmotivator are:

1. image, for the image to display;
2. maintext, for the topic, typeset in a larger font; and
3. subtext, for the comment, typeset in a somewhat smaller font (unrelated to musicals).

Home

If all goes well, the code for this module will be accessible on BitBucket. The Motivator module is maintained by Philipp Gesang, sprintf(mail, "%s@stud.%s.de", "gesang", "uni-heidelberg"). Mail me if you have any trouble getting it running or understanding the code.

Happy TeXing!