From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/86224 Path: news.gmane.org!not-for-mail From: Andreas Schneider Newsgroups: gmane.comp.tex.context Subject: Re: Dynamic headings & query heading information Date: Sat, 8 Feb 2014 10:25:20 +0100 Message-ID: <1842406596.20140208102520@gmx.de> References: <52909930.20140207154501@gmx.de> <4E1591B6-7B86-4224-950B-43FCE9355A1B@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0927326462==" X-Trace: ger.gmane.org 1391851548 24704 80.91.229.3 (8 Feb 2014 09:25:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Feb 2014 09:25:48 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Feb 08 10:25:57 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WC4Af-0007cK-0w for gctc-ntg-context-518@m.gmane.org; Sat, 08 Feb 2014 10:25:57 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4D5A110201; Sat, 8 Feb 2014 10:25:56 +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 1qP14V4BeZ3f; Sat, 8 Feb 2014 10:25:53 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 6B1C7101F2; Sat, 8 Feb 2014 10:25:53 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F3308101F2 for ; Sat, 8 Feb 2014 10:25:51 +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 lbOUtXdO-STK for ; Sat, 8 Feb 2014 10:25:50 +0100 (CET) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 47A6E101E1 for ; Sat, 8 Feb 2014 10:25:40 +0100 (CET) Original-Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s189PdNR005755 for ; Sat, 8 Feb 2014 10:25:40 +0100 Original-Received: from lcm.deutschepost.de ([194.25.90.65]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MNIAz-1W9ZBy21sH-006vnW for ; Sat, 08 Feb 2014 10:25:39 +0100 X-Priority: 3 (Normal) In-Reply-To: <4E1591B6-7B86-4224-950B-43FCE9355A1B@gmail.com> X-Provags-ID: V03:K0:kKkxgsN1T4RmLdkVNU0pL7z9UHGP33coER9A/k7uAFEAEvKbJjL VRqQvybx8A5HbCCo52M41xxAi4kKIw7MiW7aX3vFYAbIZ1H5IDtdcVs39OeYYwvgPHG6Eme 0f892jWzwFuCC1apwPxFAidVfsHKgvFIOYSCwDM0yeLh3nyd4+bpCJEAHRCb7jjEKvCQt/g 1lKPU6cfwQf96ry/A+VVQ== X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=212.227.15.15; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0NLnJpEv9 - 44efd9e1db23 - 20140208 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 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:86224 Archived-At: --===============0927326462== Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Re: [NTG-context] Dynamic headings & query heading i= nformation On Friday,= February 7, 2014, at 18:12 Wolfgang Schuster wrote:



Am 07.02.2= 014 um 15:45 schrieb Andreas Schneider <aksdb@gmx= .de>= ;:

Dynamic headings & query heading information
2) another macro should build an index at the end of the document. I use Lu= a to keep a list of all database tables referenced within the document (tog= ether with some metadata) and save it in the jobpasses struct. Now I also w= ant to track the chapters, sections, etc where these references are, to be = able to see, where a database table is used.

To solve these two problems, I'm looking for information about the current = heading. The level and the associated reference name.
If I have the level, I can keep my own list of necessary heading types (sub= ject, subsubject, ...) and just get the one at level+1 to write the heading= using lua (tex.sprint(....)).
With the reference name I can obviously solve 2), since I then can simply k= eep a list for each db table in the jobpasses structure.
You can try the \currentstrcuture=85 commands but I don=92t know if the are= meant as user level commands.

\starttext

\chapter{Chapter}

\starttabulate
\NC Name  \EQ \currentstructurename  \NC\NR
\NC Level \EQ \currentstructurelevel \NC\NR
\stoptabulate

\section{Section}

\starttabulate
\NC Name  \EQ \currentstructurename  \NC\NR
\NC Level \EQ \currentstructurelevel \NC\NR
\stoptabulate

\stoptext

Wolfgang



In case I = haven't told you before: you are awesome!

This is exactly what I was looking for. Due to this I also found \currentst= ructurereference and a bunch of other commands :)
Once you know that "structure" is the keyword, "strc-sec.*" is just around = the corner.

Regarding your earlier mail (\definesectionlevels ...):
Wow, there is really a lot of "hidden" functionality in ConTeXt. If you lay= out the document with these commands from the beginning, that really eases= restructuring tasks. However the readability (of the source code) slightly= falls off. I will evaluate this further. Thanks for this too :-)

--
Best Regards,
Andreas --===============0927326462== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0927326462==--