ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Daniel Haid <d.haid@gogi.tv>
To: Hans Hagen <j.hagen@xs4all.nl>,
	mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Indenting number in TOC, particular numbering scheme, and other questions
Date: Wed, 4 Dec 2019 18:55:55 +0100	[thread overview]
Message-ID: <4711b3a4-b3a6-4167-0ba4-242da602b7df@gogi.tv> (raw)
In-Reply-To: <1fcc4aaf-c0c1-3be2-ab3d-e20aa716b881@xs4all.nl>

On 12/3/19 4:24 PM, Hans Hagen wrote:

> which version

I just found out that it is too old (2016.05.17 19:20), I will update.

With the one from https://live.contextgarden.net/ it works!

Thank you. With the help of your answers I have been able to implement 
everything except for the references.

To clarify what I want to achieve I have written a smaller example that
gives the correct output (manually). I use

\setupreferencestructureprefix[default][prefixsegments=x:y]\in[foo].

everywhere to get the proper levels x:y.

1) Is there a quicker way to get this instead of writing 
setupreferencestructureprefix everywhere? Something like \in[x:y][foo].

2) Can this somehow be automated? Something like \in[auto][foo] should
automatically choose y as the level of foo and x as the first level 
where foo and the current section differ.

Best wishes,

D.

----------

\usemodule[subsub]

\usetypescript[termes]
\setupbodyfont[termes,12pt]

\def\arconv#1{\alphabeticnumerals{#1})}
\defineconversion[ar][\arconv]

\def\aarconv#1{\alphabeticnumerals{#1}\alphabeticnumerals{#1})}
\defineconversion[aar][\aarconv]

\definestructureconversionset[myconvset][,A,I,n,ar,aar]

\setupheads[part,
   chapter,
   section,
   subsection,
   subsubsection,
   subsubsubsection][sectionconversionset=myconvset]

\setuphead[chapter][sectionsegments=chapter,style=bold,
   after={\blank[small]},before={\blank[big]},sectionstopper=.]
\setuphead[section][sectionsegments=section,style=bold,
   after={\blank[small]},before={\blank[big]},sectionstopper=.]
\setuphead[subsection][sectionsegments=subsection]
\setuphead[subsubsection][sectionsegments=subsubsection,sectionstopper=]
\setuphead[subsubsubsection][sectionsegments=subsubsubsection]

\starttext
\startchapter[title={Chapter}]
   \startsection[title={Section}]
     \startsubsection[title={Subsection}]
       \startsubsubsection[title={First Subsubsection}]
         \startsubsubsubsection[title={Foo}, reference=foo]
         \stopsubsubsubsection
         \startsubsubsection[title={Second subsubsection}]
           \startsubsubsubsection[title={Bar}, reference=bar]
           \stopsubsubsubsection
         \stopsubsubsection
         \startsubsubsubsection[title={Baz}, reference=bar]
           Foo is in the current subsection, but a different
           subsubsection, so we refer to it as
\setupreferencestructureprefix[default][prefixsegments=5:6]\in[foo].

           Bar is in the current subsubsection, so we refer to it as
\setupreferencestructureprefix[default][prefixsegments=6:6]\in[bar].

           Of course, we can always also have a full reference like
\setupreferencestructureprefix[default][prefixsegments=2:6]\in[bar].
         \stopsubsubsubsection
       \stopsubsection
     \stopsection
   \stopchapter
\stoptext
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2019-12-04 17:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02  8:43 Daniel Haid
2019-12-03 15:24 ` Hans Hagen
2019-12-04 17:55   ` Daniel Haid [this message]
2019-12-04 18:02     ` Wolfgang Schuster
2019-12-04 19:08       ` Daniel Haid

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=4711b3a4-b3a6-4167-0ba4-242da602b7df@gogi.tv \
    --to=d.haid@gogi.tv \
    --cc=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    /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).