ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* sectionconversionset not working for table of contents
@ 2017-09-18 12:40 Stephens, Kenny
  2017-09-18 17:22 ` Pablo Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Stephens, Kenny @ 2017-09-18 12:40 UTC (permalink / raw)
  To: ntg-context


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

I am trying to number my bodymatter chapters differently than my appendix chapters but with little success.

My attempts include the following:

n  If I do not assign a 'sectionconversionset' then the bodypart chapters are numbered with numerals and the appendix chapters are numbered with characters. However, sections and subsections are numbered with numerals in each the bodypart and appendix --- I don't want that.

n  Assigning a 'sectionconversionset' for the bodypart and appendix results in all chapters being numbered with numerals. Sections/subsections are still numerals.

n  Assigning a 'sectionconversionset' separately for each head type produces no change compared to the previous method.

I obtained these results with the 2017 TeXLive version of ConTeXt 2017.05.15. The same result occurs with live.contextgarden.net. I've tried multiple variations, all with the same result.

Any ideas would be greatly appreciated.

Thanks.
Kenny

The rest of the message is a minimal example:

\startsectionblockenvironment [bodypart]
  \definestructureconversionset [bodyset] [I,N,KR,a,m] [N] % unusual combination for testing
  \setuphead [chapter,section,subsection] [sectionconversionset=bodyset]
  \setuphead [chapter]    [style={\rm\bf}]
  \setuphead [section]    [style={\ss\bf}]
  \setuphead [subsection] [style={\sl}]
\stopsectionblockenvironment
\startsectionblockenvironment [appendix]
  \definestructureconversionset [appendixset] [O,A,R,r,KA] [R]
  \setuphead [chapter,section,subsection] [sectionconversionset=appendixset]
  \setuphead [chapter]    [style={\rm\bf}]
  \setuphead [section]    [style={\sans}]
  \setuphead [subsection] [style={\sl}]
\stopsectionblockenvironment

\setupcombinedlist [content] [list={chapter,section,subsection}]
\setuplist [chapter]
           [style=\bigbodyfont\bold, alternative=b,]
\setuplist [section]
           [width=2.0em, margin=2.0em, alternative=c,]
\setuplist [subsection]
           [width=3.0em, margin=4.0em, style=slanted, alternative=c,]

\startdocument

\startfrontmatter
  \placecontent[criterium=all]
\stopfrontmatter

\startbodymatter
\startchapter[title={The First Numerals Chapter}]
  \startsection[title={The First Caps-Romannumerals Section}]
   \input knuth
  \startsubsection[title={The First characters Subsection}]
   \input knuth
  \stopsubsection
  \stopsection
  \startsection[title={The Second Caps-Romannumerals Section}]
   \input knuth
  \stopsection
\stopchapter

\startchapter[title={The Second Numerals Chapter}]
  \startsection[title={The First Caps-Romannumerals Section}]
   \input knuth
  \stopsection
\stopchapter

\stopbodymatter

\startappendices

\startchapter[title={The First Characters Appendix}]
  \startsection[title={The First Romannumerals Section}]
   \input knuth
  \stopsection
\stopchapter

\startchapter[title={The Second Appendix}]
  \input knuth
  \startsection[title={The First Romannumerals Section}]
   \startsubsection[title={The First romannumerals Subsection}]
    \input knuth
   \stopsubsection
  \stopsection
\stopchapter

\stopappendices

\stopdocument

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

[-- Attachment #2: Type: text/plain, Size: 492 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] 3+ messages in thread

* Re: sectionconversionset not working for table of contents
  2017-09-18 12:40 sectionconversionset not working for table of contents Stephens, Kenny
@ 2017-09-18 17:22 ` Pablo Rodriguez
  2017-09-19  0:19   ` Stephens, Kenny
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2017-09-18 17:22 UTC (permalink / raw)
  To: ntg-context

On 09/18/2017 02:40 PM, Stephens, Kenny wrote:
> I am trying to number my bodymatter chapters differently than my
> appendix chapters but with little success.
> [...]
> Any ideas would be greatly appreciated.

Hi Kenny,

maybe this works as you many need:

    \definestructureconversionset
        [sectionnumbers]
        [I,N,KR,a,m]
        [N]

    \definestructureconversionset
        [appendix:sectionnumbers]
        [O,A,R,r,KA]
        [R]

    \setupheads[sectionconversionset=sectionnumbers]

    \starttext

    \startfrontmatter
    \completecontent
    \stopfrontmatter

    \startbodymatter
    \dorecurse{3}{\chapter{Chapter}
        \dorecurse{3}{\section{Section}}
            \dorecurse{3}{\subsection{Subsection}}
                \dorecurse{3}{\subsection{Subsection}}
                    \dorecurse{3}{\subsubsection{Subsubsection}}}
    \stopbodymatter

    \startappendices
    \dorecurse{3}{\chapter{Chapter}
        \dorecurse{3}{\section{Section}}
            \dorecurse{3}{\subsection{Subsection}}
                \dorecurse{3}{\subsection{Subsection}}
                    \dorecurse{3}{\subsubsection{Subsubsection}}}
    \stopappendices
    \stoptext

Just in case 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] 3+ messages in thread

* Re: sectionconversionset not working for table of contents
  2017-09-18 17:22 ` Pablo Rodriguez
@ 2017-09-19  0:19   ` Stephens, Kenny
  0 siblings, 0 replies; 3+ messages in thread
From: Stephens, Kenny @ 2017-09-19  0:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Pablo,
Excellent. Works like a charm. Many thanks.

From Pablo's suggestion, I replaced my original two 'sectionblockenvironment' blocks with:

\definestructureconversionset 
  [sectionnumbers] 
  [I,N,KR,a,m]
  [N]
\definestructureconversionset 
  [appendix:sectionnumbers]
  [O,A,R,r,KA]
  [R]
\setupheads 
  [chapter,section,subsection] 
  [sectionconversionset=sectionnumbers]

\startsectionblockenvironment [bodypart]
  \setuphead [chapter] [style={\rm\bf}, sectionsegments=chapter]
  \setuphead [section] [style={\ss\bf}, sectionsegments=section]
  \setuphead [subsection] [style={\sl}, sectionsegments=subsection]
\stopsectionblockenvironment
\startsectionblockenvironment [appendix]
  \setuphead [chapter] [style={\rm\bf}]
  \setuphead [section] [style={\sans}]
  \setuphead [subsection] [style={\sl}]
\stopsectionblockenvironment
___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2017-09-19  0:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-18 12:40 sectionconversionset not working for table of contents Stephens, Kenny
2017-09-18 17:22 ` Pablo Rodriguez
2017-09-19  0:19   ` Stephens, Kenny

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