From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/69448 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: setuplist inherit margin and width Date: Thu, 23 Jun 2011 18:08:29 +0200 Message-ID: <3930CD66-BEA3-45C4-B1E1-15B949FA0516@googlemail.com> References: <41AEACB6-83E9-4EE1-B6FE-312A20D1C9EC@st.estfiles.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1308845341 6300 80.91.229.12 (23 Jun 2011 16:09:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 23 Jun 2011 16:09:01 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 23 18:08:57 2011 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 1QZmSe-0003E6-Qp for gctc-ntg-context-518@m.gmane.org; Thu, 23 Jun 2011 18:08:56 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 98EB6CAE30; Thu, 23 Jun 2011 18:08:53 +0200 (CEST) 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 f6Wrg9ZCs2q7; Thu, 23 Jun 2011 18:08:53 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A2531CAE2B; Thu, 23 Jun 2011 18:08:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 68C07CAE2B for ; Thu, 23 Jun 2011 18:08:45 +0200 (CEST) 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 PcALRWpUW84T for ; Thu, 23 Jun 2011 18:08:34 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 8870ACAE22 for ; Thu, 23 Jun 2011 18:08:34 +0200 (CEST) Original-Received: from mail-fx0-f41.google.com (mail-fx0-f41.google.com [209.85.161.41]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p5NG8Xtj029563 for ; Thu, 23 Jun 2011 18:08:34 +0200 Original-Received: by fxm18 with SMTP id 18so1972094fxm.14 for ; Thu, 23 Jun 2011 09:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to :x-mailer; bh=4QJ/6ks+CE4O7aG81H64AXLvfwwVroe66sYTcoHiUcM=; b=I0qfdYHMcNb0Bd1NrhkcuPdRRZ4ktsRz19UAt34tIallwtYsvM/aYM2tnUJBB4Pjri Y/v66B8CjuZVS0t2cem2Q3qo7yUNECB7yjuQvSGmk06iM+t0Cpo0B9NsarxAaBWazAI9 OzrzOq12Dy4LrWPIYIGL6S8tlK6q8b6oi3ocI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=ayoaxoCGYg0TZYkQLZitzzQN0+Vq5lgwIsquOTnTm2p0HexYfjIRBVnVq3mrP0djga LfzUc4aLPKBpJ9WvbewbLUHgOQcOyc4KgBnM5pwnuYMVLAcVS7fsKyrbw0YFP1XkU+5k O2Mp+PqM1bujWxsOWVmKxwf/hfPdBVTFF/TMM= Original-Received: by 10.223.144.129 with SMTP id z1mr2993130fau.57.1308845313655; Thu, 23 Jun 2011 09:08:33 -0700 (PDT) Original-Received: from [192.168.2.34] (p5B0EF7D8.dip.t-dialin.net [91.14.247.216]) by mx.google.com with ESMTPS id m26sm1074766fab.34.2011.06.23.09.08.31 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Jun 2011 09:08:32 -0700 (PDT) In-Reply-To: <41AEACB6-83E9-4EE1-B6FE-312A20D1C9EC@st.estfiles.de> X-Mailer: Apple Mail (2.1084) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.161.41; 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: 0rEXs8xkD - e60e4a618c6c - 20110623 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:69448 Archived-At: Am 23.06.2011 um 16:49 schrieb Steffen Wolfrum: > Hi, > > say, I want to design the TOC. Now I would write: > > \setuplist[LevelFour] [margin=1.20cm,width=0.5cm,...] > \setuplist[LevelFive] [margin=1.70cm,width=0.5cm,] > > > But is there some clever command that makes a calculation like this: > > \setuplist[LevelFour] [margin=1.20cm,width=0.5cm,...] > \setuplist[LevelFive] [margin={\the\dimexpr\measure{margin[LevelFour]+width[LevelFour]}\relax},width=0.5cm,] > > Any idea? Variant 1: \definemeasure [chapter:width] [0.4cm] \definemeasure [section:width] [0.7cm] \definemeasure [subsection:width] [1.0cm] \definemeasure [subsubsection:width] [1.3cm] \definemeasure [chapter:margin] [0cm] \definemeasure [section:margin] [\the\dimexpr\measure{chapter:margin}+\measure{chapter:width}\relax] \definemeasure [subsection:margin] [\the\dimexpr\measure{section:margin}+\measure{section:width}\relax] \definemeasure [subsubsection:margin] [\the\dimexpr\measure{subsection:margin}+\measure{subsection:width}\relax] \setuplist [chapter] [margin=\measure{chapter:margin},width=\measure{chapter:width}] \setuplist [section] [margin=\measure{section:margin},width=\measure{section:width}] \setuplist [subsection] [margin=\measure{subsection:margin},width=\measure{subsection:width}] \setuplist [subsubsection] [margin=\measure{subsubsection:margin},width=\measure{subsubsection:width}] \starttext \placecontent \chapter{One} \section{Two} \subsection{Three} \subsubsection{Four} \stoptext Variant 2: \setuplist [chapter] [width=0.4cm,margin=0cm] \setuplist [section] [width=0.7cm,margin=\the\dimexpr\namedlistparameter{chapter}{margin}+\namedlistparameter{chapter}{width}\relax] \setuplist [subsection] [width=1.0cm,margin=\the\dimexpr\namedlistparameter{section}{margin}+\namedlistparameter{section}{width}\relax] \setuplist [subsubsection] [width=1.3cm,margin=\the\dimexpr\namedlistparameter{subsection}{margin}+\namedlistparameter{subsection}{width}\relax] \starttext \placecontent \chapter{One} \section{Two} \subsection{Three} \subsubsection{Four} \stoptext 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 ___________________________________________________________________________________