From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81296 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: "Missing number, treated as zero" error when using \definefont with \define'd dimension Date: Thu, 21 Mar 2013 21:03:17 +0100 Message-ID: References: <514B667F.6000202@sil.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1363896213 25042 80.91.229.3 (21 Mar 2013 20:03:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Mar 2013 20:03:33 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 21 21:04:00 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UIliR-0007Ku-Si for gctc-ntg-context-518@m.gmane.org; Thu, 21 Mar 2013 21:03:59 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 88890101E8; Thu, 21 Mar 2013 21:03:36 +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 2LIk9+XTuyqm; Thu, 21 Mar 2013 21:03:34 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id A0A21101E5; Thu, 21 Mar 2013 21:03:34 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3AB9D101E5 for ; Thu, 21 Mar 2013 21:03:33 +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 OB8123zgtczC for ; Thu, 21 Mar 2013 21:03:31 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id E117A101E3 for ; Thu, 21 Mar 2013 21:03:31 +0100 (CET) Original-Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com [74.125.83.47]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r2LK3IkS006414 for ; Thu, 21 Mar 2013 21:03:25 +0100 Original-Received: by mail-ee0-f47.google.com with SMTP id e52so1912373eek.34 for ; Thu, 21 Mar 2013 13:03:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=iQTMDK+N82TWXKlyciNcajhEEjnz9/lZQ2aG6v592R0=; b=FbQj1uNP8VooNldi/1GjMoFaL9vNKtIAGBrGTGoLVKjChvzUQFLkv5Fr/EgWihnwXa 80TlNslmIvJdSzcUvmDq3dNgidxnqAAQ8BRoInTWDQHoFsB9uvZ3+o7qF4mWS3IS3MiY bagfyfHRZGjPeWAZ7tFS8gY4BonOVFa30XAOW9YmhR/1IFs68+Z9Gbm+VjxMTzuBgmMB 8odIqsS3wR3nYoFyMlVka6Q18/vz5IPf0G/FDuolicMV+Am/P81ZQ1BzUAV6xCIldwFA h64dSWyoA4aqf32oQ2AsKSkevEipl/gKydQgPVfJrF7Cb7YermPYc7XzRUlMbJ2fC450 jI8g== X-Received: by 10.14.202.71 with SMTP id c47mr85178301eeo.39.1363896198703; Thu, 21 Mar 2013 13:03:18 -0700 (PDT) Original-Received: from keima.localdomain (nrbg-4dbf996c.pool.mediaWays.net. [77.191.153.108]) by mx.google.com with ESMTPS id ca4sm10449386eeb.15.2013.03.21.13.03.17 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 13:03:18 -0700 (PDT) In-Reply-To: <514B667F.6000202@sil.org> X-Mailer: Apple Mail (2.1503) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.83.47; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06Jek3ikF - 15dfc056071b - 20130321 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:81296 Archived-At: Am 21.03.2013 um 20:58 schrieb Lars Huttar : > Hello, > = > I reported a Missing Number error back in December (thread at > http://www.ntg.nl/pipermail/ntg-context/2012/070471.html) but got > sidetracked on another issue before finding a resolution. > Now I'm back to the Missing Number error, and I have a short example > that reproduces it: > = > \define\largefontsize{13pt} > = > % Works fine: \definefont[SerifL][Arial at 13pt] > % Leads to error: > \definefont[SerifL][Arial at \largefontsize] > = > % "Missing number, treated as zero" error thrown on the following line: > \starttext \SerifL{Hello} \stoptext > = > Note that the SerifL font definition works fine (no error) if I > hard-code in "13pt" instead of using an intervening \largefontsize > definition. But if I hard-code the point size, it would hamper the > modularity of our font configuration and the use of modes in which > different size fonts are used. > = > Maybe \define is just the wrong command to use when creating an > identifier for a specified dimension? > I tried changing it to \def and the error went away! > = > I looked up the documentation of \define > (http://wiki.contextgarden.net/Command/define) and \def, and couldn't > find any obvious difference, except that \def is TeX and \define is > ConTeXt. The wiki page I just linked to mentions differences between > MkII and MkIV, but this error occurs in both (in XeTeX and LuaTeX). > = > Can someone help me understand why I should not use \define for this > case? (Or in general, when I should not use \define?) Or does the > problem lie somewhere else? Commands created with \define aren=92t expandable, i.e. when the content of \definefont is passed to Lua \largefontsize remains a TeX macro and isn= =92t converted to the dimension. To get a expandable macro use \defineexpandable to create \largefontsize (untested). Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________