Re: [NTG-context] weekend upload - stacking and animation

2021-07-13 Thread Jeong Dal
Dear Hans, Wolfgang,

Both of your methods are working well.

Using \frame, the \dorecurse problem is solved.

\starttext
\startanimation[menu=yes]
 \dorecurse{10}
  { \frame{\useMPgraphic[stacking={#1}]{demo}}}
\stopanimation
\stoptext

Thank you for your solutions.

Best regards,

Dalyoung

___
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] Header for a book

2021-07-13 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 12.07.2021 um 16:32:

Hi,
For my book, the header for each chapter should be like the attached 
image. I don't know if I am using the best method, but the result looks 
like what I want. Nevertheless, I am having some problems :

1. the header appears on each page ;
2. the title of the chapter should not appear in the body of the text.
Thanks for your help.
Fabrice

[...]



You can use the following example as a start.


\definefont
  [ChapterNumberStyle]
  [Sans*default,uppercasing sa 1.5]

\definefont
  [ChapterTextStyle]
  [SansBold*default sa 2.2]

\startuseMPgraphic{chapterframe}
fill OverlayBox
leftenlarged (BackSpace + 5mm)
rightenlarged (CutSpace + 5mm)
topenlarged (TopSpace + 5mm)
withcolor "lightgray";
setbounds currentpicture to OverlayBox;
\stopuseMPgraphic

\defineoverlay
  [chapterframe]
  [\useMPgraphic{chapterframe}]

\defineframedtext
  [ChapterFrame]
  [frame=off,
   background=chapterframe,
   width=max,
   height=6cm,
   after={\blank[2*line]},
   offset=0pt]

\setuphead
  [chapter]
  [align=flushright,
   textcommand=\groupedcommand{\blank[medium]}{},
   numbercolor=darkgray,
   textstyle=ChapterTextStyle,
   numberstyle=ChapterNumberStyle,
   before=\startChapterFrame,
   after=\stopChapterFrame,
   header=high]

\setuplabeltext
  [fr]
  [chapter=Chapitre ]

\mainlanguage
  [fr]

\starttext

\chapter {La récurrence}

\samplefile{lorem}

\chapter {Combinatoire-Dénombrement}

\samplefile{lorem}

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] A not so short introduction to ConTeXt - French version - progress report.

2021-07-13 Thread Joaquín Ataz López
I am thinking of releasing a new version, fixing some small bugs 
detected since the last version, adding the bonuses included in the 
French version, as well as some other (small) things. So you can send me 
the comments directly to my mail. In English or in French, as you prefer 
(my wife is French). Anyway the new version is not imminent as I am now 
in a busy period in my main occupation (which has nothing to do with 
typography, computing or typesetting).



El 13/7/21 a las 21:00, Alain Delmotte escribió:


Hi Garulfo,

Le 16/06/2021 à 22:56, Garulfo a écrit :

Hi all, Joaquín

I hope your are doing well.

To keep you informed of my progress on the French version of "a not 
so short introduction to ConTeXt", I am done for part I, and II, and 
I am starting with Part III...


I really appreciate Joaquín's Introduction, its structure, the 
sequence of steps. Thanks again for that.


The latest french pdf can be found here :

https://raw.githubusercontent.com/contextgarden/not-so-short-introduction-to-context/main/fr/introCTX_fra.pdf 



The GitHub directory is here :
https://github.com/contextgarden/not-so-short-introduction-to-context/tree/main/ 




I added some content :
- 6.7 :  how to use fonts from the operating system
- 7.4.3.D :  tweaks with sectionconversionset
- p.6 :  kind of "visual Table of Content"
- 9.6 :  attachements


I added some "features" :
- use of ~10 environnement files for typesetting configuration
- colors :   to provide a somewhat attractive document
 inspired by Hans Hagen "Typographic Programming"
https://www.pragma-ade.com/general/manuals/style.pdf
- commands to typeset Demos (showing code and results side by side)
- some attachments to provide "ready to go .tex for beginners"

Some thoughs:
- to move "page break section" from Part I section 5.5
  to something like Part III 11.x
- Once the translation finished, to simplify some explanations.


Garulfo


Thanks for the translation.

For now I went through 1/10 of the document and I have comments. To 
whom should I send them?


Personally for a introductory manual I would prefer the presentation 
of Joaquín with less colours and a little bigger type. The notes would 
be better at the bottom of the page, like in Joaquín document, because 
they are very long.


But the translation is really needed for ease of use for French 
speakers. Thanks again.


--

Alain


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


--
Joaquín Ataz López
Derecho Civil
Universidad de Murcia

___
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] A not so short introduction to ConTeXt - French version - progress report.

2021-07-13 Thread Alain Delmotte

  
  
Hi Garulfo,
Le 16/06/2021 à 22:56, Garulfo a écrit :
Hi all,
  Joaquín
  
  
  I hope your are doing well.
  
  
  To keep you informed of my progress on the French version of "a
  not so short introduction to ConTeXt", I am done for part I, and
  II, and I am starting with Part III...
  
  
  I really appreciate Joaquín's Introduction, its structure, the
  sequence of steps. Thanks again for that.
  
  
  The latest french pdf can be found here :
  
  
https://raw.githubusercontent.com/contextgarden/not-so-short-introduction-to-context/main/fr/introCTX_fra.pdf
  
  
  The GitHub directory is here :
  
https://github.com/contextgarden/not-so-short-introduction-to-context/tree/main/
  
  
  
  I added some content :
  
  - 6.7 :  how to use fonts from the operating system
  
  - 7.4.3.D :  tweaks with sectionconversionset
  
  - p.6 :  kind of "visual Table of Content"
  
  - 9.6 :  attachements
  
  
  
  I added some "features" :
  
  - use of ~10 environnement files for typesetting configuration
  
  - colors :   to provide a somewhat attractive document
  
   inspired by Hans Hagen "Typographic Programming"
  
   https://www.pragma-ade.com/general/manuals/style.pdf
  
  - commands to typeset Demos (showing code and results side by
  side)
  
  - some attachments to provide "ready to go .tex for beginners"
  
  
  Some thoughs:
  
  - to move "page break section" from Part I section 5.5
  
    to something like Part III 11.x
  
  - Once the translation finished, to simplify some explanations.
  
  
  
  Garulfo
  

Thanks for the translation.
For now I went through 1/10 of the
document and I have comments. To whom should I send them?
Personally for a introductory manual I
would prefer the presentation of Joaquín with less colours and a
little bigger type. The notes would be better at the bottom of
the page, like in Joaquín document, because they are very long.
But the translation is really needed
for ease of use for French speakers. Thanks again.
--
Alain

  


___
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] Problem with chapter numbering

2021-07-13 Thread Fabrice Couvreur
Hi,
For my book, the header for each chapter should be like the attached image. I
don't know if I am using the best method, but the result looks like what I
want. Nevertheless, I am having a problem.
I don't understand why the first chapter is not numbered while the second
is with number 1 etc.
Thanks.
Fabrice

###

\definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]

\defineframedtext
  [FramedText]
  [
offset=0.6em,
style=,
toffset=\lineheight,
background=color,
backgroundcolor=MyColorA,
foregroundstyle={\switchtobodyfont[11pt]},
align={left, broad},
frame=off,
width=\textwidth,
  ]

\setuplabeltext
 [en]
 [chapter=CHAPITRE]


\setuppagenumbering
  [alternative=doublesided,location=]


\unexpanded\def\HeadTitle#1#2%
   {
 \FramedText{{\cap\labeltext{chapter}}\space#1
  \\
 \bfc#2}
   }

\unexpanded\def\processheadnumber#1%
   {\getmarking[chapternumber]}

 \setuphead
   [chapter]
   [style=\bfd,
align={flushleft,broad},
numbercommand=\processheadnumber,
command=\HeadTitle]


\starttext
\startchapter [title={La récurrence}]
  \startsection[title={Le principe de récurrence}]
\input knuth
  \stopsection
  \startsection[title={Le raisonement par récurrence}]
  \input knuth
  \stopsection
  \startsection[title={Récurrences fortes}]
\input knuth
  \stopsection
   \startsection[title={Exercices corrigés}]
\input knuth
  \stopsection
\stopchapter
\startchapter [title=Combinatoire-Dénombrement]
   \input knuth
\stopchapter
\startchapter [title=Suites]
  \input knuth
\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
___


Re: [NTG-context] weekend upload - stacking and animation

2021-07-13 Thread Hans Hagen

On 7/13/2021 4:11 PM, Floris van Manen wrote:



On 13/07/2021 15:14, Hans Hagen wrote:

How about:

\startuseMPgraphic{demo}
 for i=1 upto 10:
 draw fullcircle scaled (i*cm/3)
 withcolor (i*red/10)
 withpen   pencircle scaled (bp/2)
 withstacking i
 ;
 endfor ;
\stopuseMPgraphic

\unprotect

\tolerant\protected\def\useMPanimation[#1]#2%
   {\begingroup
    \scratchtoks\emptytoks

\dorecurse{10}{\etoksapp\scratchtoks{{\useMPgraphic[\c!stacking={\recurselevel}]{#2% 


    \expanded{\startanimation[#1]\the\scratchtoks\stopanimation}%
    \endgroup}

\protect

\setupinteraction[state=start]

\usemodule[animation]

\starttext
 \useMPanimation[menu=yes]{demo}
\stoptext


Placing this excerpt in a file and compiling it I get an error:


you probably don't have the animation module installed


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


Re: [NTG-context] weekend upload - stacking and animation

2021-07-13 Thread Wolfgang Schuster

Jeong Dal schrieb am 13.07.2021 um 12:25:

Dear Hans, Aditya,

Now, I understand the stacking method.
I made a simple animation using it.

\startuseMPgraphic{demo}
for i=1 upto 10:
draw fullcircle scaled (.3*i*cm) withcolor (.1*i*red) withpen 
pencircle scaled (.5*bp) withstacking i;

endfor;
\stopuseMPgraphic
\setupinteraction[state=start]
\usemodule[animation]
\starttext
\startanimation[menu=yes]
% \dorecurse{10}
% { {\useMPgraphic[stacking={#1}]{demo}}}
{\useMPgraphic[stacking={1}]{demo}}
{\useMPgraphic[stacking={2}]{demo}}
{\useMPgraphic[stacking={3}]{demo}}
{\useMPgraphic[stacking={4}]{demo}}
{\useMPgraphic[stacking={5}]{demo}}
{\useMPgraphic[stacking={6}]{demo}}
{\useMPgraphic[stacking={7}]{demo}}
{\useMPgraphic[stacking={8}]{demo}}
{\useMPgraphic[stacking={9}]{demo}}
{\useMPgraphic[stacking={10}]{demo}}
\stopanimation
\stoptext

However, I cannot succeed to use \dorecurse to make the code simple.
If there is another good method, please let me know.


\dorecurse {...} {\frame{...}}

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
___


Re: [NTG-context] weekend upload

2021-07-13 Thread Jeong Dal
Dear Aditya,

> You cannot use [offset=2mm] here. Just use \startuseMPgraphic{boxes}.
> 

After remove [offset=smm], it is working well.

Thank you for the solution.

Best regards,

Dalyoung
___
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] weekend upload - stacking and animation

2021-07-13 Thread Jeong Dal
Dear Hans, Aditya,

Now, I understand the stacking method.
I made a simple animation using it.


\startuseMPgraphic{demo}
  for i=1 upto 10:
  draw fullcircle scaled (.3*i*cm)  withcolor (.1*i*red) withpen  pencircle 
scaled (.5*bp) withstacking i;
  endfor;
\stopuseMPgraphic
\setupinteraction[state=start]
\usemodule[animation]

\starttext
\startanimation[menu=yes]
%  \dorecurse{10}
%  { {\useMPgraphic[stacking={#1}]{demo}}}
  {\useMPgraphic[stacking={1}]{demo}}
  {\useMPgraphic[stacking={2}]{demo}}
  {\useMPgraphic[stacking={3}]{demo}}
  {\useMPgraphic[stacking={4}]{demo}}
  {\useMPgraphic[stacking={5}]{demo}}
  {\useMPgraphic[stacking={6}]{demo}}
  {\useMPgraphic[stacking={7}]{demo}}
  {\useMPgraphic[stacking={8}]{demo}}
  {\useMPgraphic[stacking={9}]{demo}}
  {\useMPgraphic[stacking={10}]{demo}}
\stopanimation
\stoptext


However, I cannot succeed to use \dorecurse to make the code simple.
If there is another good method, please let me know.

Anyway, thanks for this new feature!

Best regards,
Dalyoung___
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] weekend upload - stacking and animation

2021-07-13 Thread Floris van Manen



On 13/07/2021 15:14, Hans Hagen wrote:

How about:

\startuseMPgraphic{demo}
     for i=1 upto 10:
     draw fullcircle scaled (i*cm/3)
     withcolor (i*red/10)
     withpen   pencircle scaled (bp/2)
     withstacking i
     ;
     endfor ;
\stopuseMPgraphic

\unprotect

\tolerant\protected\def\useMPanimation[#1]#2%
   {\begingroup
    \scratchtoks\emptytoks

\dorecurse{10}{\etoksapp\scratchtoks{{\useMPgraphic[\c!stacking={\recurselevel}]{#2% 


    \expanded{\startanimation[#1]\the\scratchtoks\stopanimation}%
    \endgroup}

\protect

\setupinteraction[state=start]

\usemodule[animation]

\starttext
     \useMPanimation[menu=yes]{demo}
\stoptext


Placing this excerpt in a file and compiling it I get an error:


$ context animation.tex

resolvers   | formats | executing runner 'run luametatex format': 
/home/vm/context/tex/texmf-linux-64/bin/luametatex --jobname="animation" 
--fmt=/home/vm/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt 
--lua=/home/vm/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui 
cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./animation.tex" 
--c:input="./animation.tex" --c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/home/vm/context/tex/texmf-linux-64/bin"

open source > level 1, order 1, name 'cont-yes.mkiv'
fonts   > beware: no fonts are loaded yet, using 'lm mono' in box
system  >
system  > ConTeXt  ver: 2021.07.10 21:51 LMTX  fmt: 2021.7.12 
int: english/english

system  > system  > 'cont-new.mkxl' loaded
open source > level 2, order 2, name 
'/home/vm/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'

system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name 
'/home/vm/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './animation', input 
'./animation.tex', result './animation'

fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name './animation.tex'
modules > 'animation' is not found
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
tex error   > tex error on line 31 in file ./animation.tex: 
Undefined control sequence


\startanimation [menu=yes]{\useMPgraphic 
[stacking={1}]{demo}}{\useMPgraphic [stacking={2}]{demo}}{\useMPgraphic 
[stacking={3}]{demo}}{\useMPgraphic [stacking={4}]{demo}}{\useMPgraphic 
[stacking={5}]{demo}}{\useMPgraphic [stacking={6}]{demo}}{\useMPgraphic 
[stacking={7}]{demo}}{\useMPgraphic [stacking={8}]{demo}}{\useMPgraphic 
[stacking={9}]{demo}}{\useMPgraphic [stacking={10}]{demo}}


 \startanimation [menu=yes]\the \scratchtoks \stopanimation

 \expanded #1->\xdef \m_syst_helpers_expanded {\noexpand #1
}\m_syst_helpers_expanded
 \useMPanimation [#1]#2->\begingroup \scratchtoks \emptytoks \par 
\dorecurse {10}{\etoksapp \scratchtoks {{\useMPgraphic [\c!stacking 
={\recurselevel }]{#2\expanded {\startanimation [#1]\the 
\scratchtoks \stopanimation }

\endgroup

 \useMPanimation[menu=yes]{demo}

21\expanded{\startanimation[#1]\the\scratchtoks\stopanimation}%
22\endgroup}
23
24 \protect
25
26 \setupinteraction[state=start]
27
28 \usemodule[animation]
29
30 \starttext
31 >>  \useMPanimation[menu=yes]{demo}
32 \stoptext
33
The control sequence at the end of the top line of your error message 
was never

\def'ed. You can just continue as I'll forget about whatever was undefined.
mtx-context | fatal error: return code: 256

___
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] weekend upload - stacking and animation

2021-07-13 Thread Hans Hagen

On 7/13/2021 12:25 PM, Jeong Dal wrote:

Dear Hans, Aditya,

Now, I understand the stacking method.
I made a simple animation using it.


\startuseMPgraphic{demo}
for i=1 upto 10:
draw fullcircle scaled (.3*i*cm) withcolor (.1*i*red) withpen pencircle 
scaled (.5*bp) withstacking i;

endfor;
\stopuseMPgraphic
\setupinteraction[state=start]
\usemodule[animation]

\starttext
\startanimation[menu=yes]
% \dorecurse{10}
% { {\useMPgraphic[stacking={#1}]{demo}}}
{\useMPgraphic[stacking={1}]{demo}}
{\useMPgraphic[stacking={2}]{demo}}
{\useMPgraphic[stacking={3}]{demo}}
{\useMPgraphic[stacking={4}]{demo}}
{\useMPgraphic[stacking={5}]{demo}}
{\useMPgraphic[stacking={6}]{demo}}
{\useMPgraphic[stacking={7}]{demo}}
{\useMPgraphic[stacking={8}]{demo}}
{\useMPgraphic[stacking={9}]{demo}}
{\useMPgraphic[stacking={10}]{demo}}
\stopanimation
\stoptext


However, I cannot succeed to use \dorecurse to make the code simple.
If there is another good method, please let me know.

Anyway, thanks for this new feature!

How about:

\startuseMPgraphic{demo}
for i=1 upto 10:
draw fullcircle scaled (i*cm/3)
withcolor (i*red/10)
withpen   pencircle scaled (bp/2)
withstacking i
;
endfor ;
\stopuseMPgraphic

\unprotect

\tolerant\protected\def\useMPanimation[#1]#2%
  {\begingroup
   \scratchtoks\emptytoks

\dorecurse{10}{\etoksapp\scratchtoks{{\useMPgraphic[\c!stacking={\recurselevel}]{#2%
   \expanded{\startanimation[#1]\the\scratchtoks\stopanimation}%
   \endgroup}

\protect

\setupinteraction[state=start]

\usemodule[animation]

\starttext
\useMPanimation[menu=yes]{demo}
\stoptext

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


Re: [NTG-context] Header for a book

2021-07-13 Thread Fabrice Couvreur
Hi,
My first solution is incorrect ; with the second solution, I don't
understand why the first chapter is not numbered while the second is with
number 1.
Thanks.
Fabrice
\unexpanded\def\HeadTitle#1#2%
   {
 \FramedText{{\cap\labeltext{chapter}}\space#1
  \\
 \bfc#2}
   }

\unexpanded\def\processheadnumber#1%
   {\getmarking[chapternumber]}

 \setuphead
   [chapter]
   [style=\bfd,
align={flushleft,broad},
numbercommand=\processheadnumber,
command=\HeadTitle]


\starttext
\startchapter [title={La récurrence}]
  \startsection[title={Le principe de récurrence}]
 \dorecurse{10}{\input knuth}
  \stopsection
  \startsection[title={Le raisonement par récurrence}]
  \dorecurse{10}{\input knuth}
  \stopsection
  \startsection[title={Récurrences fortes}]
  \dorecurse{10}{\input knuth}
  \stopsection
   \startsection[title={Exercices corrigés}]
  \dorecurse{10}{\input knuth}
  \stopsection
\stopchapter
\startchapter [title=Combinatoire-Dénombrement]
\dorecurse{10}{\input knuth}
\stopchapter

\stoptext



Le lun. 12 juil. 2021 à 16:32, Fabrice Couvreur 
a écrit :

> Hi,
> For my book, the header for each chapter should be like the attached image. I
> don't know if I am using the best method, but the result looks like what I
> want. Nevertheless, I am having some problems :
> 1. the header appears on each page ;
> 2. the title of the chapter should not appear in the body of the text.
> Thanks for your help.
> Fabrice
>
> \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
> \defineframedtext
>   [FramedText]
>   [
> offset=0.6em,
> style=,
> toffset=\lineheight,
> background=color,
> backgroundcolor=MyColorA,
> foregroundstyle={\switchtobodyfont[11pt]},
> align={left, broad},
> frame=off,
> width=\textwidth,
>   ]
>
>
> \setuplabeltext
>  [en]
>  [chapter=CHAPITRE]
>
> \setuphead
>[chapter]
>[bodypartlabel=]
>
>
> \startsetups [header]
>  \labeltext{chapter} \getmarking[chapternumber]
> \stopsetups
>
> \setupheadertexts
>   []
>   [{\FramedText{{\cap\labeltext{chapter}\space\getmarking[chapternumber]}
>  \\
> \bfc\getmarking[chapter]}}]
>   []
>   [\FramedText{{\cap\labeltext{chapter}\space \getmarking[chapternumber]}
>  \\
>\bfc\getmarking[chapter]}]
>
>
> \setuppagenumbering
>  [alternative=doublesided,location=]
> \starttext
> \startchapter [title=La récurrence]
>   \startsection[title={Le principe de récurrence}]
>  \dorecurse{10}{\input knuth}
>   \stopsection
>   \startsection[title={Le raisonement par récurrence}]
>   \dorecurse{10}{\input knuth}
>   \stopsection
>   \startsection[title={Récurrences fortes}]
>   \dorecurse{10}{\input knuth}
>   \stopsection
>\startsection[title={Exercices corrigés}]
>   \dorecurse{10}{\input knuth}
>   \stopsection
> \stopchapter
> \startchapter [title=Combinatoire-Dénombrement]
> \dorecurse{10}{\input knuth}
> \stopchapter
>
> \stoptext[image: pied_3.png]
>
>
___
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
___