From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79065 Path: news.gmane.org!not-for-mail From: Marco Patzer Newsgroups: gmane.comp.tex.context Subject: Re: Highlight current chapter in list Date: Thu, 8 Nov 2012 11:06:21 +0100 Message-ID: <20121108110621.1944bf2c@homerow> References: <20121108002930.20b7f349@homerow> <5D6E4FB4-9C56-49FE-8592-ACBB3F278D77@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1352369200 19244 80.91.229.3 (8 Nov 2012 10:06:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Nov 2012 10:06:40 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 08 11:06:48 2012 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 1TWP0Z-0000LO-J8 for gctc-ntg-context-518@m.gmane.org; Thu, 08 Nov 2012 11:06:47 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0C30A10268; Thu, 8 Nov 2012 11:06:38 +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 xAtAjyzZdfBc; Thu, 8 Nov 2012 11:06:31 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id ADE841020B; Thu, 8 Nov 2012 11:06:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 366211020B for ; Thu, 8 Nov 2012 11:06:30 +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 q98dGr14lC3C for ; Thu, 8 Nov 2012 11:06:29 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 2089110209 for ; Thu, 8 Nov 2012 11:06:29 +0100 (CET) Original-Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qA8A6QLr007698 for ; Thu, 8 Nov 2012 11:06:27 +0100 Original-Received: from a.earth.lavabit.com (a.earth.lavabit.com [192.168.111.10]) by karen.lavabit.com (Postfix) with ESMTP id 81D5511BB6F for ; Thu, 8 Nov 2012 04:06:24 -0600 (CST) Original-Received: from homerow (miun114-212.dynamic.miun.se [193.10.114.212]) by lavabit.com with ESMTP id M2RBRAKJWQZ8 for ; Thu, 08 Nov 2012 04:06:24 -0600 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=5TlcJwxBoXPehc6opIRlvUc/iuKjDDzhL1rmJ0QiIXtNgp92oFUufa0mATlROyTKuwja9tR8b9nVvWyVWsxkz7mQVu25mvU+77KPZagl5bB47CsJ3sMR9PaKWjSlOfRp0os/0jA1L8yRfkpwbPD+V40n6gLHSf1kQ5rFKIRo0iQ=; h=Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <5D6E4FB4-9C56-49FE-8592-ACBB3F278D77@gmail.com> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=72.249.41.33; country=US; region=TX; city=Dallas; postalcode=75206; latitude=32.8339; longitude=-96.7715; metrocode=623; areacode=214; http://maps.google.com/maps?q=32.8339,-96.7715&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VIkW6qpf - 9e1de3f052ea - 20121108 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 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:79065 Archived-At: 2012-11-08 Wolfgang Schuster: Hi Wolfgang! > \startsetups [headlist] > \framed[align=normal, frame=off] > {\placelist [chapter] [alternative=highlight, criterium=all]} > \stopsetups > > \definelistalternative > [highlight] > [renderingsetup=list:highlight] I like the flexibility of renderingsetups for \defineheadalternative, but frankly, I didn't know they can be used for lists as well and I was clueless about the best place to hook into. > \startsetups [list:highlight] > \par > \startlinealignment[middle] > \doifelse{\fetchmark[chapter][first]}{\currentlistentrytitle} > %\doifelse{\fetchmark[chapter][first]}{\ctxcommand{listtitle("\currentlist",\currentlistindex)}} > {\color[red] {\currentlistentrytitle}} > {\color[blue]{\currentlistentrytitle}} > \stoplinealignment > \par > \stopsetups That's a neat and clean solution. Thanks Wolfgang. Marco ___________________________________________________________________________________ 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 ___________________________________________________________________________________