From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/94257 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: How to get the current section level? Date: Mon, 04 Apr 2016 11:30:15 +0200 Message-ID: <57023427.9060509@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7094055505282308025==" X-Trace: ger.gmane.org 1459762264 13491 80.91.229.3 (4 Apr 2016 09:31:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Apr 2016 09:31:04 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 04 11:30:50 2016 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 plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1an0qP-0003WW-T3 for gctc-ntg-context-518@m.gmane.org; Mon, 04 Apr 2016 11:30:49 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4D87D9EEA; Mon, 4 Apr 2016 11:30:31 +0200 (CEST) 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 ta9MlQwn7HUO; Mon, 4 Apr 2016 11:30:30 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 2E6939EED; Mon, 4 Apr 2016 11:30:30 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5C6599EE8 for ; Mon, 4 Apr 2016 11:30:29 +0200 (CEST) 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 C1IY6uNr0_zG for ; Mon, 4 Apr 2016 11:30:28 +0200 (CEST) Original-Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id ED6729EE7 for ; Mon, 4 Apr 2016 11:30:17 +0200 (CEST) Original-Received: by mail-lb0-f182.google.com with SMTP id bc4so151257399lbc.2 for ; Mon, 04 Apr 2016 02:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=+TeAKK1XeTF3p9DFZKMlhyMIioY0pXd2+uwgwfl1UgM=; b=pZ/5N6m30eK7FMMjtk6rZ2Omp6OiHJuVwONBvEJaCI2kT/FHI/1liGK1ji0BR7TDmu vszNC2sVkStT4cdw8zZoh9KS5dGKjSRPfPhvNCxoHrFkoha5g51rsix0kTpFxkPOsqxe +H4E2/pCXeTP11p6aIE+dY1p3RAFEYRnLfUymebe8CT4NDb5bm1sIGpHpTBEff35WDDh brpWOThFIoyOiShCNY8KG2ab3CgrNGJHxojXLGCMyZ2yn4pSLhY/NFlo2mtat6RNddNt h3WiJo8grYHWugT7crdBAoXrrWz25IzmI5RZoT/eHD5OGZUshNmL2VXu9Tip4TOi614N LkJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=+TeAKK1XeTF3p9DFZKMlhyMIioY0pXd2+uwgwfl1UgM=; b=ZuTUnE89kDI4fgHnBnk5JSrmnCZLN/o7Kzdh7Jm/YcN3jY+zPS95oKC95QsCyFtjLT JoSK1bpYefsBut2mm9MGj3weL9BPmFBgM0byVGRsiAXpyaJUT2tF5jDyxCcPdu9ejMgN glU1mkkpa7p8aLqmWLKa/yCsNmuUYGm3LPds1qJNxcgZOpPbiEsla+HdvAM22Hs2Psj9 SyomGxzLGLVIFFDv1jovSc9Ye0S6Rhst0cVWfqZt1RIltcfHxZNBR85mENZn+mlw6F98 24SCDju+TfSpF1Y1FadDf+rj10Rh7xXgVJy5Mo+ONoc4dcBEw5FapgJyv9hZLxaJIaF1 QjpA== X-Gm-Message-State: AD7BkJICq81v8Tk6O5pNo6zrNuiR6B96O5Ufdeb43Hl7SoahI2syiP8tLPl9bmWAMRAIQw== X-Received: by 10.28.170.137 with SMTP id t131mr11246930wme.74.1459762217094; Mon, 04 Apr 2016 02:30:17 -0700 (PDT) Original-Received: from keima.localdomain (x2f25eba.dyn.telefonica.de. [2.242.94.186]) by smtp.gmail.com with ESMTPSA id q139sm12975297wmd.2.2016.04.04.02.30.15 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 04 Apr 2016 02:30:16 -0700 (PDT) User-Agent: Postbox 4.0.8 (Macintosh/20151105) 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:94257 Archived-At: This is a multi-part message in MIME format. --===============7094055505282308025== Content-Type: multipart/alternative; boundary="------------010902020804030400080701" This is a multi-part message in MIME format. --------------010902020804030400080701 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable > Luk=C3=A1=C5=A1 Proch=C3=A1zka > 3. April 2016 um 22:02 > Hello, > > is there a (Lua) way how to get the current section level? \startsetups[headinformation] \starttabulate \NC Name \EQ \currenthead \NC\NR \NC Level \EQ \currentheadlevel \NC\NR \stoptabulate \stopsetups \setuphead[chapter,section,subsection,subsubsection][after=3D\directsetup= {headinformation}] \starttext \chapter{Chapter} \section{Section} \subsubsection{Subsubsection} \stoptext Wolfgang --------------010902020804030400080701 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
3.= =20 April 2016 um 22:02
Hello,

is there a (Lua) way how to get the current section level?
\startsetups[headinformation]
=C2=A0=C2=A0=C2=A0 \starttabulate
=C2=A0=C2=A0=C2=A0 \NC Name=C2=A0 \EQ \currenthead=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 \NC\NR
=C2=A0=C2=A0=C2=A0 \NC Level \EQ \currentheadlevel \NC\NR
=C2=A0=C2=A0=C2=A0 \stoptabulate
\stopsetups

\setuphead[chapter,section,subsection,subsubsection][after=3D\directsetup= {headinformation}]

\starttext

\chapter{Chapter}
\section{Section}
\subsubsection{Subsubsection}

\stoptext

Wolfgang
--------------010902020804030400080701-- --===============7094055505282308025== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============7094055505282308025==--