From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/97522 Path: news.gmane.org!.POSTED!not-for-mail From: Rik Kabel Newsgroups: gmane.comp.tex.context Subject: Re: display current section number in \writestatus Date: Thu, 9 Mar 2017 17:05:37 -0500 Message-ID: <7c31e5f9-18f9-7eb9-2d63-6f4f34074134@rik.users.panix.com> References: <46e737d8-0e2a-cd8d-f502-92908a5e76a4@rik.users.panix.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0135961272895498344==" X-Trace: blaine.gmane.org 1489097192 1309 195.159.176.226 (9 Mar 2017 22:06:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 9 Mar 2017 22:06:32 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 09 23:06:26 2017 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cm6CS-0007eg-GT for gctc-ntg-context-518@m.gmane.org; Thu, 09 Mar 2017 23:06:20 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4635C83BC0; Thu, 9 Mar 2017 23:06:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GOf_0s88TxUl; Thu, 9 Mar 2017 23:05:57 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 211D683BC2; Thu, 9 Mar 2017 23:05:57 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6718583BC0 for ; Thu, 9 Mar 2017 23:05:55 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tsIr0fVUMDIW for ; Thu, 9 Mar 2017 23:05:54 +0100 (CET) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 86FBE83BBF for ; Thu, 9 Mar 2017 23:05:41 +0100 (CET) Original-Received: from [192.168.201.10] (cpe-24-194-22-135.nycap.res.rr.com [24.194.22.135]) by mailbackend.panix.com (Postfix) with ESMTPSA id 95FE81F063 for ; Thu, 9 Mar 2017 17:05:40 -0500 (EST) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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" Xref: news.gmane.org gmane.comp.tex.context:97522 Archived-At: This is a multi-part message in MIME format. --===============0135961272895498344== Content-Type: multipart/alternative; boundary="------------0D81FDC1F74D345A03E69416" This is a multi-part message in MIME format. --------------0D81FDC1F74D345A03E69416 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 2017-03-09 16:20, Hans Hagen wrote: > On 3/9/2017 4:39 AM, Rik Kabel wrote: >> ConTeXters, >> >> What is the best way to get the current section number in a basic format >> (pt.ch.s.ss... as displayed in the log in structure sectioning entries) >> for display in a custom log entry (via \writestatus)? I have tried >> \fullheadnumber and such, but cannot find something appropriate. > > \writestatus{!!!!!!}{\getfullstructurenumber{\thenamedheadlevel{subsection}}} > > Nope. With commands like these: \starttexdefinition LogNote #NOTETEXT \writestatus{Note}{{\getfullstructurenumber{\thenamedheadlevel{section}}:p.\pagenumber} #NOTETEXT} \stoptexdefinition \LogNote{See http://www.thelatinlibrary.com/ter.eunuchus.html for the original.} and the note is in a section, I get: Note > {\oldstylenumerals {1}\color [red]{A·}\oldstylenumerals {8}:p.19} See http://www.thelatinlibrary.com/ter.eunuchus.html for the original. which reflects the formatting of the chapter and section numbers. But worse, I have to track the section depth, because if the note is at a different level there is nothing displayed for the sectioning. I want the unformatted numbers as displayed in structure > sectioning > section @ level 3 : 1.3.5 -> Group authorship and works for hire and if I do not have to track the level and recurse to pick up each component that would be better. -- Rik --------------0D81FDC1F74D345A03E69416 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 2017-03-09 16:20, Hans Hagen wrote:
On 3/9/2017 4:39 AM, Rik Kabel wrote:
ConTeXters,

What is the best way to get the current section number in a basic format
(pt.ch.s.ss... as displayed in the log in structure sectioning entries)
for display in a custom log entry (via \writestatus)? I have tried
\fullheadnumber and such, but cannot find something appropriate.

\writestatus{!!!!!!}{\getfullstructurenumber{\thenamedheadlevel{subsection}}}


Nope. With commands like these:
\starttexdefinition LogNote #NOTETEXT
  \writestatus{Note}{{\getfullstructurenumber{\thenamedheadlevel{section}}:p.\pagenumber} #NOTETEXT}
\stoptexdefinition

\LogNote{See http://www.thelatinlibrary.com/ter.eunuchus.html for the original.}
and the note is in a section, I get:
Note            > {\oldstylenumerals {1}\color [red]{A·}\oldstylenumerals {8}:p.19} See http://www.thelatinlibrary.com/ter.eunuchus.html for the original.

which reflects the formatting of the chapter and section numbers. But worse, I have to track the section depth, because if the note is at a different level there is nothing displayed for the sectioning. I want the unformatted numbers as displayed in

structure       > sectioning > section @ level 3 : 1.3.5 -> Group authorship and works for hire

and if I do not have to track the level and recurse to pick up each component that would be better.

--
Rik
--------------0D81FDC1F74D345A03E69416-- --===============0135961272895498344== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============0135961272895498344==--