Re: [NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Alex Leray via ntg-context
I somehow found a way. It doesn't work on my minimal example but it does 
in my real doc. I tested a lot of thing but I think it was thanks to the 
offset=none parameters


For the record:

###

\define[2]\MySection{
\framed[
location=top,
strut=no,
offset=none,
frame=none,
width=broad,
height=fit,
align=middle]{#1.\\#2}}

\setuphead[section][
conversion=Romannumerals,
style={\bf\kerncharacters[0.075]\WORDS},
align=middle,
command=\MySection,
]

###

Thanks!

Le 15/02/23 à 19:11, Rik Kabel via ntg-context a écrit :


On 2023-02-15 08:44, Alex Leray via ntg-context wrote:


\showframe
\showlayout
\showgrid

\setuplayout[
    grid=yes,
]

\define[2]\MySection{\framed[
    location=keep,
    frame=on,
    width=broad,
    % height=22pt,
    align=middle
]{{#1.\\#2}}}

\setuphead[section][
    strut=no,
    conversion=Romannumerals,
    style={\bf\WORDS},
    align=middle,
    command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext



Have you tried it with \framedtext in the place of \framed ?



--
Alexandre Leray
+32 487 947 030

Avez-vous pensé à (vous) offrir Médor ?
https://medor.coop/ideescadeau
___
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
___


Re: [NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Rik Kabel via ntg-context


On 2023-02-15 08:44, Alex Leray via ntg-context wrote:


\showframe
\showlayout
\showgrid

\setuplayout[
    grid=yes,
]

\define[2]\MySection{\framed[
    location=keep,
    frame=on,
    width=broad,
    % height=22pt,
    align=middle
]{{#1.\\#2}}}

\setuphead[section][
    strut=no,
    conversion=Romannumerals,
    style={\bf\WORDS},
    align=middle,
    command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext



Have you tried it with \framedtext in the place of \framed ?

--
Rik

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


Re: [NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Rik Kabel via ntg-context


On 2023-02-15 08:44, Alex Leray via ntg-context wrote:


\showframe
\showlayout
\showgrid

\setuplayout[
    grid=yes,
]

\define[2]\MySection{\framed[
    location=keep,
    frame=on,
    width=broad,
    % height=22pt,
    align=middle
]{{#1.\\#2}}}

\setuphead[section][
    strut=no,
    conversion=Romannumerals,
    style={\bf\WORDS},
    align=middle,
    command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext



Have you tried it with \framedtext in the place of \framed ?

--
Rik

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


[NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Alex Leray via ntg-context

Hello again,

I'm having another issue: I'd like Chapter/Section number and titles in 
separate lines but with grid alignement. I followed that advice:


https://wiki.contextgarden.net/Titles#Chapter_number_and_titles_in_separate_lines

I'm having an issue though: I can't get rid of the space above the 
(framed) title and align the section number with the first line (it's on 
the second line)


Any idea? Many thanks.

###

\showframe
\showlayout
\showgrid

\setuplayout[
grid=yes,
]

\define[2]\MySection{\framed[
location=keep,
frame=on,
width=broad,
% height=22pt,
align=middle
]{{#1.\\#2}}}

\setuphead[section][
strut=no,
conversion=Romannumerals,
style={\bf\WORDS},
align=middle,
command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext

###
___
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
___


Re: [NTG-context] Chapter number retrieval

2022-03-23 Thread Willi Egger via ntg-context
Hello Adam,


What I am actually using (at least basically) is the code given in the second 
example on the wiki. So this moving graphic is not the problem. The problem 
lays in the fact, that I need the chapter number for calculating the position 
of the graphic along the outer edge of the page. — Because the book in question 
is a dictionary, it is not nice to have the chapter titles numbered, because it 
is only the letter of the alphabet. If I turned off the numbering, I lost the 
possibility to retrieve the chapter number. Through the definition of a new 
command \ChapterTitle, ignoring the first argument (which is the number) the 
title gets typeset without the number, but the number is still available in the 
TOC or as in my case for the calculation.

Thank you for your support and help!

Willi

> On 23 Mar 2022, at 00:41, Adam Reviczky via ntg-context  
> wrote:
> 
> Hi Willi,
> 
> You could also access the number by using the 
> \getmarking[chapternumber][current].
> I think you have used a similar approach in the 
> https://wiki.contextgarden.net/Thumb_index.
> 
> Adam
> 
> On Tue, Mar 22, 2022 at 11:15 PM Willi Egger via ntg-context 
>  wrote:
> Hello Adam!
> 
> Many thanks for your solution. — It works very well in your example and also 
> in an extended version with \startfrontmatter..\stopfrontmatter 
> \startbodymatter…\stopbodymatter. — Unfortunately It does not work to my wish 
> in the actual setup of my book. — I am using now the solution presented by 
> Sreeram.
> 
> Again thank you so much!
> Kind regards
> 
> Willi
> 
>> On 22 Mar 2022, at 01:21, Adam Reviczky via ntg-context  
>> wrote:
>> 
>> Hi,
>> 
>> There is a good overview of accessible variables at: 
>> https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names
>> 
>> Maybe you want something like this?
>> 
>> \starttext
>> \setuphead[chapter][number=no]
>> \startchapter[title={My Chapter}]
>> Hello world!
>> \startMPcode
>> label("\currentstructurelistnumber\ \currentstructuretitle", origin);
>> draw fullcircle scaled 3cm;
>> \stopMPcode
>> \stopchapter
>> \stoptext
>> 
>> Adam
>> 
>> On Mon, Mar 21, 2022 at 11:46 PM jbf via ntg-context  
>> wrote:
>> Willi, offlist: Have to admit I didn't actually try your own comment, 
>> but if it doesn't work, I'll be interested in the eventual answer. I 
>> recently had to do something similar for the TOC, and Hraban pointed me 
>> to \currentlistentrynumber. There probably has to be a command along 
>> those lines (which led me to your 2011 comment, sorry ) for non-list 
>> retrieval. \structurenumber? \currentstructurenumber? Something along 
>> those lines? There seem to be a number of these but as yet undocumented 
>> as far as I can see.
>> 
>> Julian
>> 
>> On 22/3/22 10:19, Willi Egger via ntg-context wrote:
>>> Hi Julian,
>>> 
>>> :-) I am confronted with my own comments :-)
>>> 
>>> However, this is precisely what I am using in my attempt to get this hidden 
>>> number. But no it does not appear…
>>> 
>>> Thank you!
>>> Willi
>>> 
 On 21 Mar 2022, at 22:33, jbf via ntg-context  wrote:
 
 Willi,
 
 I see a comment by yourself back in 2011 at 
 https://wiki.contextgarden.net/Last_Head_Number
 
 I wonder if this helps?
 
 Julian
 
 On 22/3/22 07:47, Willi Egger via ntg-context wrote:
> Hello everybody!
> 
> 
> I would like to typeset the chapter title without number in the text. — 
> However I still would need to retrieve the number for a calculation in a 
> MetaFun graphic. I assume, that even though this number is not typeset, 
> it is kept in the background. How to retrieve it?
> 
> Kind regards
> 
> Willi
> ___
> 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
> ___
 ___
 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
 ___
>>> ___
>>> If your question is of interest to others as well, please add an entry to 

Re: [NTG-context] Chapter number retrieval

2022-03-22 Thread Adam Reviczky via ntg-context
Hi Willi,

You could also access the number by using the
\getmarking[chapternumber][current].
I think you have used a similar approach in the
https://wiki.contextgarden.net/Thumb_index.

Adam

On Tue, Mar 22, 2022 at 11:15 PM Willi Egger via ntg-context <
ntg-context@ntg.nl> wrote:

> Hello Adam!
>
> Many thanks for your solution. — It works very well in your example and
> also in an extended version with \startfrontmatter..\stopfrontmatter
> \startbodymatter…\stopbodymatter. — Unfortunately It does not work to my
> wish in the actual setup of my book. — I am using now the solution
> presented by Sreeram.
>
> Again thank you so much!
> Kind regards
>
> Willi
>
> > On 22 Mar 2022, at 01:21, Adam Reviczky via ntg-context <
> ntg-context@ntg.nl> wrote:
> >
> > Hi,
> >
> > There is a good overview of accessible variables at:
> https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names
> >
> > Maybe you want something like this?
> >
> > \starttext
> > \setuphead[chapter][number=no]
> > \startchapter[title={My Chapter}]
> > Hello world!
> > \startMPcode
> > label("\currentstructurelistnumber\ \currentstructuretitle", origin);
> > draw fullcircle scaled 3cm;
> > \stopMPcode
> > \stopchapter
> > \stoptext
> >
> > Adam
> >
> > On Mon, Mar 21, 2022 at 11:46 PM jbf via ntg-context 
> wrote:
> > Willi, offlist: Have to admit I didn't actually try your own comment,
> > but if it doesn't work, I'll be interested in the eventual answer. I
> > recently had to do something similar for the TOC, and Hraban pointed me
> > to \currentlistentrynumber. There probably has to be a command along
> > those lines (which led me to your 2011 comment, sorry ) for non-list
> > retrieval. \structurenumber? \currentstructurenumber? Something along
> > those lines? There seem to be a number of these but as yet undocumented
> > as far as I can see.
> >
> > Julian
> >
> > On 22/3/22 10:19, Willi Egger via ntg-context wrote:
> > > Hi Julian,
> > >
> > > :-) I am confronted with my own comments :-)
> > >
> > > However, this is precisely what I am using in my attempt to get this
> hidden number. But no it does not appear…
> > >
> > > Thank you!
> > > Willi
> > >
> > >> On 21 Mar 2022, at 22:33, jbf via ntg-context 
> wrote:
> > >>
> > >> Willi,
> > >>
> > >> I see a comment by yourself back in 2011 at
> https://wiki.contextgarden.net/Last_Head_Number
> > >>
> > >> I wonder if this helps?
> > >>
> > >> Julian
> > >>
> > >> On 22/3/22 07:47, Willi Egger via ntg-context wrote:
> > >>> Hello everybody!
> > >>>
> > >>>
> > >>> I would like to typeset the chapter title without number in the
> text. — However I still would need to retrieve the number for a calculation
> in a MetaFun graphic. I assume, that even though this number is not
> typeset, it is kept in the background. How to retrieve it?
> > >>>
> > >>> Kind regards
> > >>>
> > >>> Willi
> > >>>
> ___
> > >>> 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
> > >>>
> ___
> > >>
> ___
> > >> 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
> > >>
> ___
> > >
> ___
> > > 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
> > >
> ___
> >
> ___
> > 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 : 

Re: [NTG-context] Chapter number retrieval

2022-03-22 Thread Willi Egger via ntg-context
Hello Adam!

Many thanks for your solution. — It works very well in your example and also in 
an extended version with \startfrontmatter..\stopfrontmatter 
\startbodymatter…\stopbodymatter. — Unfortunately It does not work to my wish 
in the actual setup of my book. — I am using now the solution presented by 
Sreeram.

Again thank you so much!
Kind regards

Willi

> On 22 Mar 2022, at 01:21, Adam Reviczky via ntg-context  
> wrote:
> 
> Hi,
> 
> There is a good overview of accessible variables at: 
> https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names
> 
> Maybe you want something like this?
> 
> \starttext
> \setuphead[chapter][number=no]
> \startchapter[title={My Chapter}]
> Hello world!
> \startMPcode
> label("\currentstructurelistnumber\ \currentstructuretitle", origin);
> draw fullcircle scaled 3cm;
> \stopMPcode
> \stopchapter
> \stoptext
> 
> Adam
> 
> On Mon, Mar 21, 2022 at 11:46 PM jbf via ntg-context  
> wrote:
> Willi, offlist: Have to admit I didn't actually try your own comment, 
> but if it doesn't work, I'll be interested in the eventual answer. I 
> recently had to do something similar for the TOC, and Hraban pointed me 
> to \currentlistentrynumber. There probably has to be a command along 
> those lines (which led me to your 2011 comment, sorry ) for non-list 
> retrieval. \structurenumber? \currentstructurenumber? Something along 
> those lines? There seem to be a number of these but as yet undocumented 
> as far as I can see.
> 
> Julian
> 
> On 22/3/22 10:19, Willi Egger via ntg-context wrote:
> > Hi Julian,
> >
> > :-) I am confronted with my own comments :-)
> >
> > However, this is precisely what I am using in my attempt to get this hidden 
> > number. But no it does not appear…
> >
> > Thank you!
> > Willi
> >
> >> On 21 Mar 2022, at 22:33, jbf via ntg-context  wrote:
> >>
> >> Willi,
> >>
> >> I see a comment by yourself back in 2011 at 
> >> https://wiki.contextgarden.net/Last_Head_Number
> >>
> >> I wonder if this helps?
> >>
> >> Julian
> >>
> >> On 22/3/22 07:47, Willi Egger via ntg-context wrote:
> >>> Hello everybody!
> >>>
> >>>
> >>> I would like to typeset the chapter title without number in the text. — 
> >>> However I still would need to retrieve the number for a calculation in a 
> >>> MetaFun graphic. I assume, that even though this number is not typeset, 
> >>> it is kept in the background. How to retrieve it?
> >>>
> >>> Kind regards
> >>>
> >>> Willi
> >>> ___
> >>> 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
> >>> ___
> >> ___
> >> 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
> >> ___
> > ___
> > 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
> > ___
> ___
> 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
> ___
> ___
> 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  : 

Re: [NTG-context] Chapter number retrieval

2022-03-22 Thread Willi Egger via ntg-context
Hello Sreeram!

What a nice and simple solution. After fiddling a bit I got it working also in 
my environment for the book! — Thank you so much for the support.

Kind regrards

Willi

> On 22 Mar 2022, at 03:29, śrīrāma via ntg-context  wrote:
> 
> On Tuesday, March 22, 2022 2:17 AM Willi Egger via ntg-context wrote:
>> I would like to typeset the chapter title without number in the text. — 
>> However I still would need to retrieve the number for a calculation in a 
>> MetaFun graphic. I assume, that even though this number is not typeset, it 
>> is kept in the background. How to retrieve it?
>> 
> 
> Hi,
> On Tuesday, March 22, 2022 2:17 AM Willi Egger via ntg-context wrote:
>> 
>> I would like to typeset the chapter title without number in the text. — 
>> However I still would need to retrieve the number for a calculation in a 
>> MetaFun graphic. I assume, that even though this number is not typeset, it 
>> is kept in the background. How to retrieve it?
>> 
> 
> Hi,
> 
> You can define a custom command for the chapter, where the first argument 
> (i.e, the number) is 'ignored' –
> 
> \define[2]\ChapterTitle{#2}
> \setuphead[chapter][command=\ChapterTitle]
> 
> It will still appeared as numbered in any lists (ToC, etc). Also, it can be 
> accessed using \headnumber[...][...]. An example graphic – 
> 
> \startuseMPgraphic {graphic:chapter}
> picture cg;
> cg := outlinetext.d
>   ("\ssbfd \headnumber[chapter]")
>   (withcolor transparent(1,0.5,blue));
> fill boundingcircle cg withcolor transparent(1, 0.5, lightgray);
> draw cg;
> \stopuseMPgraphic
> 
> Using \headnumber[..][..] any 'conversion' applied to the chapter number 
> (romannumerals, words, etc) are also preserved.
> 
> Best,
> Sreeram
> 
> 
> ___
> 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
> ___

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


Re: [NTG-context] Chapter number retrieval

2022-03-21 Thread śrīrāma via ntg-context
On Tuesday, March 22, 2022 2:17 AM Willi Egger via ntg-context wrote:
> I would like to typeset the chapter title without number in the text. — 
> However I still would need to retrieve the number for a calculation in a 
> MetaFun graphic. I assume, that even though this number is not typeset, it is 
> kept in the background. How to retrieve it?
> 

Hi,
On Tuesday, March 22, 2022 2:17 AM Willi Egger via ntg-context wrote:
>
> I would like to typeset the chapter title without number in the text. — 
> However I still would need to retrieve the number for a calculation in a 
> MetaFun graphic. I assume, that even though this number is not typeset, it is 
> kept in the background. How to retrieve it?
>

Hi,

You can define a custom command for the chapter, where the first argument (i.e, 
the number) is 'ignored' –

  \define[2]\ChapterTitle{#2}
  \setuphead[chapter][command=\ChapterTitle]

It will still appeared as numbered in any lists (ToC, etc). Also, it can be 
accessed using \headnumber[...][...]. An example graphic – 

  \startuseMPgraphic {graphic:chapter}
  picture cg;
  cg := outlinetext.d
("\ssbfd \headnumber[chapter]")
(withcolor transparent(1,0.5,blue));
  fill boundingcircle cg withcolor transparent(1, 0.5, lightgray);
  draw cg;
  \stopuseMPgraphic

Using \headnumber[..][..] any 'conversion' applied to the chapter number 
(romannumerals, words, etc) are also preserved.

Best,
Sreeram


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


Re: [NTG-context] Chapter number retrieval

2022-03-21 Thread Adam Reviczky via ntg-context
Hi,

There is a good overview of accessible variables at:
https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names

Maybe you want something like this?

\starttext
\setuphead[chapter][number=no]
\startchapter[title={My Chapter}]
Hello world!
\startMPcode
label("\currentstructurelistnumber\ \currentstructuretitle", origin);
draw fullcircle scaled 3cm;
\stopMPcode
\stopchapter
\stoptext

Adam

On Mon, Mar 21, 2022 at 11:46 PM jbf via ntg-context 
wrote:

> Willi, offlist: Have to admit I didn't actually try your own comment,
> but if it doesn't work, I'll be interested in the eventual answer. I
> recently had to do something similar for the TOC, and Hraban pointed me
> to \currentlistentrynumber. There probably has to be a command along
> those lines (which led me to your 2011 comment, sorry ) for non-list
> retrieval. \structurenumber? \currentstructurenumber? Something along
> those lines? There seem to be a number of these but as yet undocumented
> as far as I can see.
>
> Julian
>
> On 22/3/22 10:19, Willi Egger via ntg-context wrote:
> > Hi Julian,
> >
> > :-) I am confronted with my own comments :-)
> >
> > However, this is precisely what I am using in my attempt to get this
> hidden number. But no it does not appear…
> >
> > Thank you!
> > Willi
> >
> >> On 21 Mar 2022, at 22:33, jbf via ntg-context 
> wrote:
> >>
> >> Willi,
> >>
> >> I see a comment by yourself back in 2011 at
> https://wiki.contextgarden.net/Last_Head_Number
> >>
> >> I wonder if this helps?
> >>
> >> Julian
> >>
> >> On 22/3/22 07:47, Willi Egger via ntg-context wrote:
> >>> Hello everybody!
> >>>
> >>>
> >>> I would like to typeset the chapter title without number in the text.
> — However I still would need to retrieve the number for a calculation in a
> MetaFun graphic. I assume, that even though this number is not typeset, it
> is kept in the background. How to retrieve it?
> >>>
> >>> Kind regards
> >>>
> >>> Willi
> >>>
> ___
> >>> 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
> >>>
> ___
> >>
> ___
> >> 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
> >>
> ___
> >
> ___
> > 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
> >
> ___
>
> ___
> 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
>
> ___
>
___
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
___


Re: [NTG-context] Chapter number retrieval

2022-03-21 Thread jbf via ntg-context
Willi, offlist: Have to admit I didn't actually try your own comment, 
but if it doesn't work, I'll be interested in the eventual answer. I 
recently had to do something similar for the TOC, and Hraban pointed me 
to \currentlistentrynumber. There probably has to be a command along 
those lines (which led me to your 2011 comment, sorry ) for non-list 
retrieval. \structurenumber? \currentstructurenumber? Something along 
those lines? There seem to be a number of these but as yet undocumented 
as far as I can see.


Julian

On 22/3/22 10:19, Willi Egger via ntg-context wrote:

Hi Julian,

:-) I am confronted with my own comments :-)

However, this is precisely what I am using in my attempt to get this hidden 
number. But no it does not appear…

Thank you!
Willi


On 21 Mar 2022, at 22:33, jbf via ntg-context  wrote:

Willi,

I see a comment by yourself back in 2011 at 
https://wiki.contextgarden.net/Last_Head_Number

I wonder if this helps?

Julian

On 22/3/22 07:47, Willi Egger via ntg-context wrote:

Hello everybody!


I would like to typeset the chapter title without number in the text. — However 
I still would need to retrieve the number for a calculation in a MetaFun 
graphic. I assume, that even though this number is not typeset, it is kept in 
the background. How to retrieve it?

Kind regards

Willi
___
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
___

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

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

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


Re: [NTG-context] Chapter number retrieval

2022-03-21 Thread Willi Egger via ntg-context

Hi Julian,

:-) I am confronted with my own comments :-)

However, this is precisely what I am using in my attempt to get this hidden 
number. But no it does not appear…

Thank you!
Willi

> On 21 Mar 2022, at 22:33, jbf via ntg-context  wrote:
> 
> Willi,
> 
> I see a comment by yourself back in 2011 at 
> https://wiki.contextgarden.net/Last_Head_Number
> 
> I wonder if this helps?
> 
> Julian
> 
> On 22/3/22 07:47, Willi Egger via ntg-context wrote:
>> Hello everybody!
>> 
>> 
>> I would like to typeset the chapter title without number in the text. — 
>> However I still would need to retrieve the number for a calculation in a 
>> MetaFun graphic. I assume, that even though this number is not typeset, it 
>> is kept in the background. How to retrieve it?
>> 
>> Kind regards
>> 
>> Willi
>> ___
>> 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
>> ___
> ___
> 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
> ___

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


Re: [NTG-context] Chapter number retrieval

2022-03-21 Thread jbf via ntg-context

Willi,

I see a comment by yourself back in 2011 at 
https://wiki.contextgarden.net/Last_Head_Number


I wonder if this helps?

Julian

On 22/3/22 07:47, Willi Egger via ntg-context wrote:

Hello everybody!


I would like to typeset the chapter title without number in the text. — However 
I still would need to retrieve the number for a calculation in a MetaFun 
graphic. I assume, that even though this number is not typeset, it is kept in 
the background. How to retrieve it?

Kind regards

Willi
___
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
___

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


[NTG-context] Chapter number retrieval

2022-03-21 Thread Willi Egger via ntg-context
Hello everybody!


I would like to typeset the chapter title without number in the text. — However 
I still would need to retrieve the number for a calculation in a MetaFun 
graphic. I assume, that even though this number is not typeset, it is kept in 
the background. How to retrieve it?

Kind regards

Willi
___
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
___


Re: [NTG-context] chapter number sought

2021-05-30 Thread Hans van der Meer
Thanks. This helps.
dr. Hans van der Meer


> On 30 May 2021, at 13:40, Adam Reviczky  wrote:
> 
> Hi Hans,
> 
> Does this help: 
> https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names
>  
> 
>  ?
> 
> \starttext
> \startchapter[title={First chapter}]
> \structurenumber\ - \structuretitle
> \stopchapter
> \stoptext
> 
> Although getmarking is probably what you're really after: 
> \getmarking[chapternumber] and \getmarking[chapter].
> 
> \starttext
> \startchapter[title={First chapter}]
> \getmarking[chapternumber][current]\ - \getmarking[chapter][current]
> \stopchapter
> \stoptext
> 
> Adam
> 
> On Sun, May 30, 2021 at 11:12 AM Hans van der Meer  > wrote:
> With \pagenumber I can call up the current pagenumber and typeset it.
> But \chapternumber is not defined.
> How can I typeset the current chapternumber or even the current 
> chapternumber.sectionnumber.subsectionnumber, for example?
> 
> dr. Hans van der Meer
> 
> 
> ___
> 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 
> ___
> ___
> 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
> ___

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


Re: [NTG-context] chapter number sought

2021-05-30 Thread Adam Reviczky
Hi Hans,

Does this help:
https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names
?

\starttext
\startchapter[title={First chapter}]
\structurenumber\ - \structuretitle
\stopchapter
\stoptext

Although getmarking is probably what you're really after:
\getmarking[chapternumber] and \getmarking[chapter].

\starttext
\startchapter[title={First chapter}]
\getmarking[chapternumber][current]\ - \getmarking[chapter][current]
\stopchapter
\stoptext

Adam

On Sun, May 30, 2021 at 11:12 AM Hans van der Meer 
wrote:

> With \pagenumber I can call up the current pagenumber and typeset it.
> But \chapternumber is not defined.
> How can I typeset the current chapternumber or even the current
> chapternumber.sectionnumber.subsectionnumber, for example?
>
> dr. Hans van der Meer
>
>
>
> ___
> 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
>
> ___
>
___
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
___


[NTG-context] chapter number sought

2021-05-30 Thread Hans van der Meer
With \pagenumber I can call up the current pagenumber and typeset it.
But \chapternumber is not defined.
How can I typeset the current chapternumber or even the current 
chapternumber.sectionnumber.subsectionnumber, for example?

dr. Hans van der Meer


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


Re: [NTG-context] Chapter number with Luametafun

2020-08-18 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 18.08.2020 um 16:24:

Hello,
How to get the number of the current chapter ?


\namedheadnumber{chapter}


How to get the label "Chapitre" ?


\labeltext{chapter}

Wolfgang
___
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
___


[NTG-context] Chapter number with Luametafun

2020-08-18 Thread Fabrice Couvreur
Hello,
How to get the number of the current chapter ?
How to get the label "Chapitre" ?
Thanks for your help.
Fabrice

%%% Begin example

\mainlanguage[fr]

\setcharacterspacing [frenchpunctuation]

\setuplabeltext[fr][chapter=Chapitre~]

\startuseMPgraphic{fun}
  definecolor[name="Mycolor", s = 0.85 ]
  draw lmt_outline
   [
text = "1",
kind = "fillup",
fillcolor = "Mycolor",
rulethickness = 1,
   ]
  xsized 1cm;
\stopuseMPgraphic

\unexpanded\def\MyNumber#1{\useMPgraphic{fun}#1}

\unexpanded\def\Title#1#2{\framed[frame=off,width=fit,align=flushleft]
  {#1\blank#2}}

\setuphead[chapter]
  [style=\bfd,
   align={flushleft,broad},
   command=\Title,
   textcommand=\MyNumber,
   numbercommand=\groupedcommand{}{\MyNumber},
   number=no]

\starttext
\startchapter
  [title={First chapter}]
  \input knuth.tex
\stopchapter
\startchapter
  [title={Second chapter}]
  \input knuth.tex
\stopchapter
\stoptext

%%% end example
___
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
___


[NTG-context] chapter-number prefixes on figure, etc, numbers, even in unnumbered section appearing in TOC

2019-05-31 Thread Sanjoy Mahajan
Dear List,

The following, it seems, is a recurring question, which I had hoped to
solve by digging in the test suite
 -- but no luck.

The problem is to have figures, list items, problems, etc. numbered with
a chapter prefix (e.g. Figure 7.18) even in unnumbered sections that
appear in the TOC.

1. Using \subject as the section command, the figure number is correctly
prefixed, but the section itself doesn't appear in the TOC.

2. Using \section, the figure number is also correctly prefixed, and the
section appears in the TOC, but the section gets numbered (e.g. Section
2.7).

In one of the earlier threads, which are "Prefix for figure number lost
in unnumbered subsection"
, "Unnumbered
subject in TOC, numbered exercises in text"
, and
"incrementnumber vs. prefixsegments"
, Hans suggested
looking in the test suite for fine control of the prefix segments.

I have done that, and the best MNWE that I can come up with is a
modification of doc/context/tests/mkiv/sections/figures-001.tex in the
test suite (see code below), but it also fails:

* When incrementnumber=list (as in the code), the TOC lists that
section, but the figure 5 doesn't get a chapter-number prefix.

* When incrementnumber=no (recreating \subject), the TOC is not correct,
but figure 5 gets its prefix.

* And wWhen incrementnumber-yes (recreating \section), the TOC lists
that section, but the section gets a number.

Is there a modification to what I tried that gets all the aspects right
(TOC entry, unnumbered, chapter prefix on figures, etc. within)?

-Sanjoy

The code:

\setupcaption[figure][way=bytext,prefixset=1:2]
\definehead[unnumberedsection][section]
\setuphead [unnumberedsection][incrementnumber=list]

\starttext
\placelist[chapter,section,unnumberedsection]

\chapter{One}
\placefigure{one}{1}

\section{Two}
\placefigure{two}{2}

\chapter{Three}
\placefigure{three}{3}
\placefigure{four}{4}

\unnumberedsection{Four}

\placefigure{five}{5}

\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
___


Re: [NTG-context] chapter number

2018-11-06 Thread Andrea Valle
Thanks Tomas, solved!

Best

-a-

--
Andrea Valle
--
CIRMA - StudiUm
Università degli Studi di Torino
--> http://www.cirma.unito.it/andrea/
--> http://www.fonurgia.unito.it/andrea/
--> http://www.flickr.com/photos/vanderaalle/sets/
--> http://vimeo.com/vanderaalle
--> http://andreavalle.bandcamp.com
--> andrea.va...@unito.it
--

"This is a very complicated case, Maude. You know, a lotta ins, a lotta outs, a 
lotta what-have-yous." 
(Jeffrey 'The Dude' Lebowski)

> On 7 Nov 2018, at 00:03, Tomas Hala  wrote:
> 
> Hi Andrea,
> 
> try this:
> 
> 
> \starttext
> 
> \startfrontmatter
> \placecontent
> \page
> \chapter{Foreword}
> \stopfrontmatter
> 
> \startbodymatter
> \chapter{Introduction}
> \stopbodymatter
> 
> \startbackmatter
> \chapter{Something at the end}
> \stopbackmatter
> 
> \stoptext
> 
> 
> Best wishes,
> 
> Tomáš
> 
> 
> Tue, Nov 06, 2018 ve 11:22:56PM +0100 Andrea Valle napsal(a):
> #Dear all, 
> #I have a simple issue I can’t solve.
> #I have chapters in a book, and I have placed a foreword before.
> #I’d like not to have the number in the foreword, and to start the
> #numbering with the first chapter.
> #I followed this
> #
> [1]https://www.contextgarden.net/Titles#Unnumbered_titles_in_table_of_contents
> #and I have been able to remove numbering from the first chapter, also 
> from
> #TOC. Fine.
> #I am not able to reset chapter numbering, my first chapter starts still
> #with 2.
> #How can this be done?
> #I'm using for first chapter
> #\startchapter
> #  [title=Overview of Notation Semiotics]
> #  []
> #Thanks
> #Best
> #-a-
> # 
> #--
> #Andrea Valle
> #--
> #CIRMA - StudiUm
> #Università degli Studi di Torino
> #--> [2]http://www.cirma.unito.it/andrea/
> #--> [3]http://www.fonurgia.unito.it/andrea/
> #--> [4]http://www.flickr.com/photos/vanderaalle/sets/
> #--> [5]http://vimeo.com/vanderaalle
> #--> [6]http://andreavalle.bandcamp.com
> #--> [7]andrea.va...@unito.it
> #--
> # 
> #"This is a very complicated case, Maude. You know, a lotta ins, a lotta
> #outs, a lotta what-have-yous." 
> #(Jeffrey 'The Dude' Lebowski)
> # 
> # References
> # 
> #Visible links
> #1. 
> https://www.contextgarden.net/Titles#Unnumbered_titles_in_table_of_contents
> #2. http://www.cirma.unito.it/andrea/
> #3. http://www.fonurgia.unito.it/andrea/
> #4. http://www.flickr.com/photos/vanderaalle/sets/
> #5. http://vimeo.com/vanderaalle
> #6. http://andreavalle.bandcamp.com/
> #7. mailto:andrea.va...@unito.it
> 
> # 
> ___
> # 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
> # 
> ___
> 
> 
> Tomáš Hála
> 
> Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
> Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
> 
> http://akela.mendelu.cz/~thala
> ___
> 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
> ___
> 

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

Re: [NTG-context] chapter number

2018-11-06 Thread Tomas Hala
Hi Andrea,

try this:


\starttext

\startfrontmatter
\placecontent
\page
\chapter{Foreword}
\stopfrontmatter

\startbodymatter
\chapter{Introduction}
\stopbodymatter

\startbackmatter
\chapter{Something at the end}
\stopbackmatter

\stoptext


Best wishes,

Tomáš


Tue, Nov 06, 2018 ve 11:22:56PM +0100 Andrea Valle napsal(a):
#Dear all, 
#I have a simple issue I can’t solve.
#I have chapters in a book, and I have placed a foreword before.
#I’d like not to have the number in the foreword, and to start the
#numbering with the first chapter.
#I followed this
#
[1]https://www.contextgarden.net/Titles#Unnumbered_titles_in_table_of_contents
#and I have been able to remove numbering from the first chapter, also from
#TOC. Fine.
#I am not able to reset chapter numbering, my first chapter starts still
#with 2.
#How can this be done?
#I'm using for first chapter
#\startchapter
#  [title=Overview of Notation Semiotics]
#  []
#Thanks
#Best
#-a-
# 
#--
#Andrea Valle
#--
#CIRMA - StudiUm
#Università degli Studi di Torino
#--> [2]http://www.cirma.unito.it/andrea/
#--> [3]http://www.fonurgia.unito.it/andrea/
#--> [4]http://www.flickr.com/photos/vanderaalle/sets/
#--> [5]http://vimeo.com/vanderaalle
#--> [6]http://andreavalle.bandcamp.com
#--> [7]andrea.va...@unito.it
#--
# 
#"This is a very complicated case, Maude. You know, a lotta ins, a lotta
#outs, a lotta what-have-yous." 
#(Jeffrey 'The Dude' Lebowski)
# 
# References
# 
#Visible links
#1. 
https://www.contextgarden.net/Titles#Unnumbered_titles_in_table_of_contents
#2. http://www.cirma.unito.it/andrea/
#3. http://www.fonurgia.unito.it/andrea/
#4. http://www.flickr.com/photos/vanderaalle/sets/
#5. http://vimeo.com/vanderaalle
#6. http://andreavalle.bandcamp.com/
#7. mailto:andrea.va...@unito.it

# 
___
# 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
# 
___


 Tomáš Hála

Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28

http://akela.mendelu.cz/~thala
___
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
___

[NTG-context] chapter number

2018-11-06 Thread Andrea Valle
Dear all, 

I have a simple issue I can’t solve.
I have chapters in a book, and I have placed a foreword before.
I’d like not to have the number in the foreword, and to start the numbering 
with the first chapter.

I followed this
https://www.contextgarden.net/Titles#Unnumbered_titles_in_table_of_contents 


and I have been able to remove numbering from the first chapter, also from TOC. 
Fine.

I am not able to reset chapter numbering, my first chapter starts still with 2.

How can this be done?

I'm using for first chapter

\startchapter
  [title=Overview of Notation Semiotics]
  []

Thanks


Best


-a-


 


--
Andrea Valle
--
CIRMA - StudiUm
Università degli Studi di Torino
--> http://www.cirma.unito.it/andrea/
--> http://www.fonurgia.unito.it/andrea/
--> http://www.flickr.com/photos/vanderaalle/sets/
--> http://vimeo.com/vanderaalle
--> http://andreavalle.bandcamp.com
--> andrea.va...@unito.it
--

"This is a very complicated case, Maude. You know, a lotta ins, a lotta outs, a 
lotta what-have-yous." 
(Jeffrey 'The Dude' Lebowski)

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

[NTG-context] Chapter number in list colored (setuplist)

2013-07-09 Thread Zenlima
Hi,

I want to color the chapter number in the table of content. The
attribute numbercolor does not exist in setuplist. So I tried to
color the chapter number via numberstlye (numbercommand is also not
working):

---8

\define[1]\listChapterColor{\color[bordeaux]{X #1}}

\setuplist[chapter][color=black,numberstyle=\listChapterColor]

8--

The X appears in the new color (bordeaux), but the chapter number is
still uncolored - same color like rest of that line (black).

What am I doing wrong here?

H.
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter number in list colored (setuplist)

2013-07-09 Thread Aditya Mahajan

On Tue, 9 Jul 2013, Zenlima wrote:


Hi,

I want to color the chapter number in the table of content. The
attribute numbercolor does not exist in setuplist. So I tried to
color the chapter number via numberstlye (numbercommand is also not
working):

---8

\define[1]\listChapterColor{\color[bordeaux]{X #1}}

\setuplist[chapter][color=black,numberstyle=\listChapterColor]

8--

The X appears in the new color (bordeaux), but the chapter number is
still uncolored - same color like rest of that line (black).

What am I doing wrong here?


(Untested): Have you tried `numbercolor=bordeaux`?

Aditya
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter number in list colored (setuplist)

2013-07-09 Thread Wolfgang Schuster

Am 09.07.2013 um 18:08 schrieb Zenlima p...@zenlima.eu:

 Hi,
 
 I want to color the chapter number in the table of content. The
 attribute numbercolor does not exist in setuplist. So I tried to
 color the chapter number via numberstlye (numbercommand is also not
 working):
 
 ---8
 
 \define[1]\listChapterColor{\color[bordeaux]{X #1}}
 
 \setuplist[chapter][color=black,numberstyle=\listChapterColor]
 
 8--
 
 The X appears in the new color (bordeaux), but the chapter number is
 still uncolored - same color like rest of that line (black).
 
 What am I doing wrong here?


1. You forgot a minimal example which demonstrates the problem.

2. You didn’t test numbercolor.

\setuplist
  [chapter]
  [color=green,
   numbercolor=red,
  %pagecolor=orange,
   textcolor=blue]

\starttext
\completecontent
\chapter{Test}
\stoptext

Wolfgang
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter number in list colored (setuplist)

2013-07-09 Thread Zenlima
Am Tue, 9 Jul 2013 12:20:18 -0400 (EDT)
schrieb Aditya Mahajan adit...@umich.edu:

 numbercolor=bordeaux

I am so sorry.. I tried that too but I must have mistyped it then.. now it 
works :)

Thanks
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter number in list colored (setuplist)

2013-07-09 Thread Zenlima
 2. You didn’t test numbercolor.

You are correct: after my mistyped try'n'error I did not checked it
any further as the documentation in the wiki. I updated it with that
missing attribute.

thanks


signature.asc
Description: PGP signature
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Chapter number in right margin?

2009-05-11 Thread Corsair
Hi all,

I'm typesetting a double-sided document.  And I want the chapter
numbers to be in the right margin, while the chapter titles remain in
the main text area.  So I write

\def\MyChapter#1#2
{\inright{#1} #2}

\setuphead
  [chapter]
  [command=\MyChapter]

But it renders such that all the chapter numbers disappear while
chapter titles seem normal.  Any idea?

Corsair Sun

-- 
There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.


pgp9XezukTQbR.pgp
Description: PGP signature
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter number in right margin?

2009-05-11 Thread Yanrui Li
On Mon, May 11, 2009 at 8:06 PM, Corsair chris.cors...@gmail.com wrote:
 Hi all,

 I'm typesetting a double-sided document.  And I want the chapter
 numbers to be in the right margin, while the chapter titles remain in
 the main text area.  So I write

    \def\MyChapter#1#2
    {\inright{#1} #2}

    \setuphead
      [chapter]
      [command=\MyChapter]

 But it renders such that all the chapter numbers disappear while
 chapter titles seem normal.  Any idea?


I extract the following fragment from my document and I wish it can help you :)

\def\PlaceChapter#1#2{%
  \vbox{%
\inoutermargin{%
  \hbox to .6\rightmarginwidth{%
\hfil\switchtobodyfont[32pt,myfont,rm]{#1}\hss}%
}\tfc #2%
  }%
}
\setuphead
  [chapter]
  [command=\PlaceChapter,header=empty,footer=empty]

\starttext

\chapter{Test}
This is only a test!

\stoptext

-- 
Best wishes,
Li Yanrui
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter number in right margin?

2009-05-11 Thread Wolfgang Schuster


Am 11.05.2009 um 14:59 schrieb Yanrui Li:

On Mon, May 11, 2009 at 8:06 PM, Corsair chris.cors...@gmail.com  
wrote:

Hi all,

I'm typesetting a double-sided document.  And I want the chapter
numbers to be in the right margin, while the chapter titles remain in
the main text area.  So I write

   \def\MyChapter#1#2
   {\inright{#1} #2}

   \setuphead
 [chapter]
 [command=\MyChapter]

But it renders such that all the chapter numbers disappear while
chapter titles seem normal.  Any idea?



I extract the following fragment from my document and I wish it can  
help you :)


\def\PlaceChapter#1#2{%
 \vbox{%
   \inoutermargin{%
 \hbox to .6\rightmarginwidth{%
   \hfil\switchtobodyfont[32pt,myfont,rm]{#1}\hss}%
   }\tfc #2%
 }%
}
\setuphead
 [chapter]
 [command=\PlaceChapter,header=empty,footer=empty]


As alternative:

\define[2]\PlaceChapter
  {\hbox{\vtop{#2}\rlap{\hskip\rightmargindistance#1}}}

\definefont[ChapterNumber][Serif at 32pt]

\setuphead
  [chapter]
  [command=\PlaceChapter,numberstyle=ChapterNumber,textstyle= 
\tfc,header=empty,footer=empty]


Wolfgang

___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter number in right margin?

2009-05-11 Thread Yanrui Li
On Mon, May 11, 2009 at 9:09 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:

 Am 11.05.2009 um 14:59 schrieb Yanrui Li:

 On Mon, May 11, 2009 at 8:06 PM, Corsair chris.cors...@gmail.com wrote:

 Hi all,

 I'm typesetting a double-sided document.  And I want the chapter
 numbers to be in the right margin, while the chapter titles remain in
 the main text area.  So I write

   \def\MyChapter#1#2
   {\inright{#1} #2}

   \setuphead
     [chapter]
     [command=\MyChapter]

 But it renders such that all the chapter numbers disappear while
 chapter titles seem normal.  Any idea?


 I extract the following fragment from my document and I wish it can help
 you :)

 \def\PlaceChapter#1#2{%
  \vbox{%
   \inoutermargin{%
     \hbox to .6\rightmarginwidth{%
       \hfil\switchtobodyfont[32pt,myfont,rm]{#1}\hss}%
   }\tfc #2%
  }%
 }
 \setuphead
  [chapter]
  [command=\PlaceChapter,header=empty,footer=empty]

 As alternative:

 \define[2]\PlaceChapter
  {\hbox{\vtop{#2}\rlap{\hskip\rightmargindistance#1}}}

 \definefont[ChapterNumber][Serif at 32pt]

 \setuphead
  [chapter]
  [command=\PlaceChapter,numberstyle=ChapterNumber,textstyle=\tfc,header=empty,footer=empty]


Your code looks like more ConTeXt than mine and I'll benefit a lot from it.

-- 
Best wishes,
Li Yanrui
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Chapter number conversion to words

2008-02-07 Thread Bart C. Wise
I would like to display chapter headings spelling out the numbers into words.  
For example:

Chapter One
Chapter Two
Chapter Three
etc.

I thought that I could put a conversion in the setuphead function; however, it 
doesn't appear to be supported.  So how to I do the conversion?

Thanks,
Bart
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___