ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* mkii to mkiv - section numbering with minimal example
@ 2019-06-23  8:26 Duncan Hothersall
  2019-06-23  9:08 ` Hans Hagen
  2019-06-23 11:03 ` Pablo Rodriguez
  0 siblings, 2 replies; 5+ messages in thread
From: Duncan Hothersall @ 2019-06-23  8:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 846 bytes --]

Further to my previous query about updating from mkii to mkiv, I have
solved some of the issues by trial and error but am beginning to identify
the ones I can't resolve. My first minimal example is below.

I want the sections and subsections not to prefix the part and chapter
numbering, giving me this output:

Part 1
Chapter 1.1
Section 1
Subsection 1.1

The line that used to achieve this result was

\setupsection[section-3][previousnumber=no]

and there was also

\setuphead[section][partnumber=no,chapternumber=no]

but neither of these seems to work in mkiv


Minimal example:

\setupsection[section-3][previousnumber=no]
\setuphead[section][partnumber=no,chapternumber=no]

\starttext
\part{Part}
Part
\chapter{Chapter}
Chapter
\section{Section}
Section
\subsection{Subsection}
Subsection
\stoptext

Many thanks for any pointers.

Duncan

[-- Attachment #1.2: Type: text/html, Size: 1489 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mkii to mkiv - section numbering with minimal example
  2019-06-23  8:26 mkii to mkiv - section numbering with minimal example Duncan Hothersall
@ 2019-06-23  9:08 ` Hans Hagen
  2019-06-23 11:03 ` Pablo Rodriguez
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2019-06-23  9:08 UTC (permalink / raw)
  To: ntg-context@ntg.nl >> mailing list for ConTeXt users

On 6/23/2019 10:26 AM, Duncan Hothersall wrote:
> Further to my previous query about updating from mkii to mkiv, I have 
> solved some of the issues by trial and error but am beginning to 
> identify the ones I can't resolve. My first minimal example is below.
> 
> I want the sections and subsections not to prefix the part and chapter 
> numbering, giving me this output:
> 
> Part 1
> Chapter 1.1
> Section 1
> Subsection 1.1
> 
> The line that used to achieve this result was
> 
> \setupsection[section-3][previousnumber=no]
> 
> and there was also
> 
> \setuphead[section][partnumber=no,chapternumber=no]
> 
> but neither of these seems to work in mkiv
> 
> 
> Minimal example:
> 
> \setupsection[section-3][previousnumber=no]
> \setuphead[section][partnumber=no,chapternumber=no]
> 
> \starttext
> \part{Part}
> Part
> \chapter{Chapter}
> Chapter
> \section{Section}
> Section
> \subsection{Subsection}
> Subsection
> \stoptext
> 
> Many thanks for any pointers.
in the test suite there are all kind of examples (zip can be downloaded 
from the website)

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mkii to mkiv - section numbering with minimal example
  2019-06-23  8:26 mkii to mkiv - section numbering with minimal example Duncan Hothersall
  2019-06-23  9:08 ` Hans Hagen
@ 2019-06-23 11:03 ` Pablo Rodriguez
  1 sibling, 0 replies; 5+ messages in thread
From: Pablo Rodriguez @ 2019-06-23 11:03 UTC (permalink / raw)
  To: ntg-context

On 6/23/19 10:26 AM, Duncan Hothersall wrote:
> Further to my previous query about updating from mkii to mkiv, I have
> solved some of the issues by trial and error but am beginning to
> identify the ones I can't resolve. My first minimal example is below.
>
> I want the sections and subsections not to prefix the part and chapter
> numbering, giving me this output:
>
> Part 1
> Chapter 1.1
> Section 1
> Subsection 1.1

Hi Duncan,

I guess this may be what you want to do:

    \setuphead[part][placehead=yes]
    \setuphead[section][sectionsegments=section]
    \setuphead[subsection][sectionsegments=section:subsection]
    \starttext
    \part{Part}
    \chapter{Chapter}
    \section{Section}
    \subsection{Subsection}
    \stoptext

I hope it helps,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mkii to mkiv - section numbering with minimal example
       [not found] <mailman.93.1561313177.1354.ntg-context@ntg.nl>
@ 2019-06-23 18:33 ` Duncan Hothersall
  0 siblings, 0 replies; 5+ messages in thread
From: Duncan Hothersall @ 2019-06-23 18:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 643 bytes --]

On Sun, 23 Jun 2019 at 19:08, <ntg-context-request@ntg.nl> wrote:

>
> Hi Duncan,
>
> I guess this may be what you want to do:
>
>     \setuphead[part][placehead=yes]
>     \setuphead[section][sectionsegments=section]
>     \setuphead[subsection][sectionsegments=section:subsection]
>     \starttext
>     \part{Part}
>     \chapter{Chapter}
>     \section{Section}
>     \subsection{Subsection}
>     \stoptext
>
> I hope it helps,
>
> Pablo
> --
> http://www.ousia.tk
>
>
> Belated thanks Pablo, I get the digest so I had posted my discovery of
this precise solution before I saw you supplying that answer. Apologies! It
works well.

Duncan

[-- Attachment #1.2: Type: text/html, Size: 1098 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mkii to mkiv - section numbering with minimal example
       [not found] <mailman.1.1561284001.24507.ntg-context@ntg.nl>
@ 2019-06-23 11:14 ` Duncan Hothersall
  0 siblings, 0 replies; 5+ messages in thread
From: Duncan Hothersall @ 2019-06-23 11:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 778 bytes --]

On Sun, 23 Jun 2019 at 11:00, Hans Hagen wrote:

>
> in the test suite there are all kind of examples (zip can be downloaded
> from the website)
>
>
Thanks Hans. After some searching in the test suite I found the answer,
which I'll put here in case someone else is searching for it, which is:

\setuphead[section][sectionsegments=section]
\setuphead[subsection][sectionsegments=section:subsection]

which sets up sections to just be numbered with the section number instead
of the part, chapter and section number, and sets up subsections to just be
numbered with the section and subsection number.

Now that I know how to do it I see mkiv is much cleaner on this code and
the change gets reflected in tables of contents etc. This was much harder
in mkii. Thanks again.

Duncan

[-- Attachment #1.2: Type: text/html, Size: 1397 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-23 18:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-23  8:26 mkii to mkiv - section numbering with minimal example Duncan Hothersall
2019-06-23  9:08 ` Hans Hagen
2019-06-23 11:03 ` Pablo Rodriguez
     [not found] <mailman.1.1561284001.24507.ntg-context@ntg.nl>
2019-06-23 11:14 ` Duncan Hothersall
     [not found] <mailman.93.1561313177.1354.ntg-context@ntg.nl>
2019-06-23 18:33 ` Duncan Hothersall

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).