From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/56937 Path: news.gmane.org!not-for-mail From: Hans van der Meer Newsgroups: gmane.comp.tex.context Subject: Re: smaller-bigger fontsize Date: Wed, 10 Mar 2010 17:10:34 +0100 Message-ID: References: <7C09EF7C-E9B8-4785-972B-78A4AFF613C5@uva.nl> <4B97AF47.1050507@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1268237447 11773 80.91.229.12 (10 Mar 2010 16:10:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 10 Mar 2010 16:10:47 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Mar 10 17:10:43 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 1NpOUc-0006T5-Ho for gctc-ntg-context-518@m.gmane.org; Wed, 10 Mar 2010 17:10:42 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 486B7C9CE2; Wed, 10 Mar 2010 17:10:42 +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 fD+9DZLxUm3D; Wed, 10 Mar 2010 17:10:39 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 851D7C9CDF; Wed, 10 Mar 2010 17:10:39 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EE39DC9CDF for ; Wed, 10 Mar 2010 17:10:37 +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 wtpuTk3UIIZR for ; Wed, 10 Mar 2010 17:10:35 +0100 (CET) Original-Received: from smtp-vbr7.xs4all.nl (smtp-vbr7.xs4all.nl [194.109.24.27]) by balder.ntg.nl (Postfix) with ESMTP id ADB23C9C73 for ; Wed, 10 Mar 2010 17:10:35 +0100 (CET) Original-Received: from Mindolluin.fritz.box (a82-95-102-36.adsl.xs4all.nl [82.95.102.36]) (authenticated bits=0) by smtp-vbr7.xs4all.nl (8.13.8/8.13.8) with ESMTP id o2AGAZE4038140 for ; Wed, 10 Mar 2010 17:10:35 +0100 (CET) (envelope-from H.vanderMeer@uva.nl) In-Reply-To: <4B97AF47.1050507@googlemail.com> X-Mailer: Apple Mail (2.936) X-Virus-Scanned: by XS4ALL Virus Scanner 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:56937 Archived-At: Thanks Wolfgang. This works. See below for some refinements I find usefull. On 10 mrt 2010, at 15:40, Wolfgang Schuster wrote: > Am 10.03.10 13:39, schrieb Hans van der Meer: >> ConTeXt fontsizing has \tx to make the current font style one step >> smaller, then another \txx does that again. For makeing the size >> bigger I cannot see anything other than the series \tfa \tfb \tfc >> \tfd. It would however be nice to also have a similar cumulative >> effect here. >> >> Can there be something like "\tsmall" available to reduce the font >> size one step (to a certain minimum, not just \tx\tx = \txx)? And >> similar \tbig to enlarge the font size one step? It will make the >> equivalent of HTML's and tags easy to implement for >> typesetting my xml data. >> >> Or are there already such things? > \startxmlsetups big > \bgroup > \switchtobodyfont[\the\dimexpr\bodyfontsize+2pt\relax] \switchtobodyfont[\the\dimexpr\bodyfontsize+\xmlattdef{#1}{step}{2pt} \relax] > \xmlflush{#1} > \egroup > \stopxmlsetups > > \startxmlsetups small > \bgroup > \switchtobodyfont[\the\dimexpr\bodyfontsize-2pt\relax] \scratchdimen=\the\dimexpr\bodyfontsize\relax \advance\scratchdimen-\xmlattdef{#1}{step}{2pt}\relax \ifdim\scratchdimen<\xmlattdef{#1}{min}{4pt}\relax\scratchdimen= \xmlattdef{#1}{min}{4pt}\fi \switchtobodyfont[\the\scratchdimen] > \xmlflush{#1} > \egroup > \stopxmlsetups > > Wolfgang > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ ___________________________________________________________________________________ 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 ___________________________________________________________________________________