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. 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 \startframedtext [ width=broad, frame=off, align=middle, foregroundcolor=colortwo, background=shadow, ] {\definedfont[RegularSlanted sa 2.5]\getvariable{exam}{title}} \blank \getvariable{exam}{course} \stopframedtext \blank[big] \startcolor[colortwo] \doifelsevariable{exam}{date}{\expanded{\date[\getvariable{exam}{date}]}}{\currentdate} \hfill Start: \getvariable{exam}{start} \space Stop: \getvariable{exam}{stop} \stopcolor \blank \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 Wolfgang