From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/56464 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Exams Date: Mon, 22 Feb 2010 12:36:15 -0500 (EST) Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1266860225 1710 80.91.229.12 (22 Feb 2010 17:37:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 22 Feb 2010 17:37:05 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Feb 22 18:37:01 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NjcDG-0002Oa-UT for gctc-ntg-context-518@m.gmane.org; Mon, 22 Feb 2010 18:36:55 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AED47C9D12; Mon, 22 Feb 2010 18:36:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id aI-hoW6pRhBq; Mon, 22 Feb 2010 18:36:54 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3E102C9D0E; Mon, 22 Feb 2010 18:36:27 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 10CC0C9CFE for ; Mon, 22 Feb 2010 18:36:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id HFVJ0rvIPtXl for ; Mon, 22 Feb 2010 18:36:22 +0100 (CET) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by balder.ntg.nl (Postfix) with ESMTP id A9230C9D0E for ; Mon, 22 Feb 2010 18:36:21 +0100 (CET) Original-Received: FROM [192.168.2.8] (c-76-28-91-31.hsd1.ct.comcast.net [76.28.91.31]) By hellskitchen.mr.itd.umich.edu ID 4B82C090.AB67C.10811 ; Authuser adityam; 22 Feb 2010 12:36:16 EST In-Reply-To: User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:56464 Archived-At: On Mon, 22 Feb 2010, Roger Mason wrote: > Hello, > > Sorry, I sent this message to the list without a subject earlier today. > > 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: > > \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 > > \def\exam[#1] > {\getrawparameters > [Exam] > [ title= > course=, > date=, > start=, > stop=, > #1] > \title{\Examtitle}} > > \definefont [BigFontOne] [RegularSlanted sa 2.5] > \definefont [BigFontTwo] [Regular sa 1.5] > > \setuphead[title] > [ style=\BigFontOne, > command=\examtitle, > before={}, > after={\blank[big] \bgroup \colortwo > Date: \expanded{\date[Examdate]} ^^^^^^^^ This should be \Examdate > \hfill > Start: \expanded{Examstart} No need for \expanded here. Just \Examstart is enough > Stop: \expanded{Examstop} \Examstop > \egroup\blank}, > ] > > %D This macro does the actual typesetting of the title > \def\examtitle#1#2% > {\framed[ > width=broad, > frame=off, > align=middle, > foregroundcolor=colortwo, > % I want a shadow around the title frame > background=shadow] > {#2\\{Examcourse}}} Again, \Examcourse > > \exam[ > title=Mid-term 2010, > course=ES2917, > date={d=17,m=2,y=2010}, > start={9:00 am}, > stop={11:00 am} > ] > > 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 need to use \Exam... to access the values. Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________