![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Sat, 10 Sep 2011, Wolfgang Schuster wrote:
Am 22.02.2010 um 15:25 schrieb Roger Mason:
Hello,
I'm working on a project to set up exams, basing the work on Aditya's asignment class that was published in Practex in 2006.
I have a problem getting title information printed correctly. This is a cut-down version:
[…]
I'm processing this with Mark II. The problems are that
(1) The literal 'Examcourse' is typeset; (2) Today's date is typset, not the one entered in the interface; (3) The start and stop times are typeset as literals 'Examstart' & 'Examstop'
You forgot the backslash in front of your values.
It’s also bad style to misuse the \title command for your document title because \title is only the unnumbered version of \chapter, nothing else.
OK. That style was my first real project with ConTeXt, so it some non-canonical setups. These days I use: \definehead[assignment][...] \setuphead[assignment][...] \startassignment[...] ... \stopassignment which gives a much better control over the exported xhtml file.
Another way to create your document title is the following code:
\setupcolors [state=start]
\definecolor [colorone] [r=0.625,g=0,b=0] %dark red \definecolor [colortwo] [b=0.625,g=0,r=0] %dark blue
\startsetups examtitle [...] \stopsetups
\setvariables[exam][set={\setups[examtitle]}]
\starttext
\setvariables [exam] [ title=Mid-term 2010, course=ES2917, date={d=17,m=2,y=2010}, start={9:00 am}, stop={11:00 am}]
\stoptext
Nice, I didn't realize that set key could be used this way. If one is also interested in a usable XML export, then some \starttag..\stoptag must be added to the setups. Aditya