From: Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Henning Hraban Ramm <texml@fiee.net>
Subject: Re: numbering questions
Date: Sat, 31 Dec 2022 22:07:21 +0100 [thread overview]
Message-ID: <b1664705-d92f-4376-5bcd-649c49546f84@fiee.net> (raw)
In-Reply-To: <b272197c-4c83-62ce-a128-7e4241575b5c@gmx.es>
Am 31.12.22 um 20:41 schrieb Pablo Rodriguez via ntg-context:
> On 12/31/22 18:23, Henning Hraban Ramm via ntg-context wrote:
>> I’m playing with some examples of section numbering.
>>
>> * Is there a setup to influence the order of number segments? I.e. can I
>> have “section.chapter.part“ instead of “part.chapter.section”?
>
> I thought sectionsegments=section:chapter would work, but it doesn’t.
>
>> * How can I format the segments, e.g. to get two or three digits each
>> (leading zeros)?
>
> The easy part is to have the leading zeros, but I cannot get it working
> with numbercommand or deepnumbercommand.
>
> \startluacode
> function document.leadingzeros(str)
> local lzeros = 3-str:len()
> return ("0"):rep(lzeros)
> end
> \stopluacode
> \unexpanded\def\lzeros#1%
> {\cldcontext{document.leadingzeros("#1")}}
Same. With numbercommand, Lua gets "\s and can’t handle it, with
deepnumbercommand it gets "1-\m". Is this a catcode issue?
>> * I can force a section number with “ownnumber”, but the next one is
>> back in the previous scheme. Itemize has “start”. How can I start
>> section chapter numbering at 3 (or -1 or whatever; I know I can start at
>> 0 with “zero”) and let ConTeXt continue from there?
>
> \setupheadnumber[chapter][3] % will start with 4
Thank you, that works.
> I hope it helps. »Einen guten Rutsch ins Neujahr!«
Dito!
(In proper German that would be just “Guten Rutsch” or “Guten Rutsch ins
neue Jahr”; Neujahr ist just the name of the holiday.)
All the best,
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2022-12-31 21:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-31 17:23 Henning Hraban Ramm via ntg-context
2022-12-31 18:20 ` Duncan Hothersall via ntg-context
2022-12-31 19:36 ` Henning Hraban Ramm via ntg-context
2022-12-31 19:41 ` Pablo Rodriguez via ntg-context
2022-12-31 21:07 ` Henning Hraban Ramm via ntg-context [this message]
2023-01-01 10:27 ` Wolfgang Schuster via ntg-context
2023-01-01 13:13 ` Henning Hraban Ramm via ntg-context
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b1664705-d92f-4376-5bcd-649c49546f84@fiee.net \
--to=ntg-context@ntg.nl \
--cc=texml@fiee.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).