ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* About \setupheadertexts : simplify a code
@ 2017-08-17 13:25 Fabrice Couvreur
  2017-08-17 22:39 ` Henri
  0 siblings, 1 reply; 25+ messages in thread
From: Fabrice Couvreur @ 2017-08-17 13:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hello,
To get the alignment, I had to create three \vbox. Can we simplify this
code a bit ?
Thank you
Fabrice

% macros=mkvi
\setuplayout
   [header=3\lineheight,
    headerdistance=\lineheight]

\setupbackgrounds[header][text]
                 [frame=off,
                  bottomframe=on,
                  framecolor=darkgray,
                  rulethickness=2pt]

\defineframed[headerframedleft]
             [frame=off,
              align=left,
              width=fit,height=\headerheight]

\defineframed[headerframedright]
             [frame=off,
              align=right,
              width=fit,height=\headerheight]

\defineframed[headerframedmiddle]
             [frame=off,
              align=middle,
              width=fit,height=\headerheight]

\starttexdefinition MyHeader #where #day #month #year #title #number #time

\setupheadertexts
   [\headerframedmiddle{\\ \ss\sc\bf\red #title n\high{o}\,#number \\ }]

\setupheadertexts
   [\headerframedright{\tfx \ss Lycée JANSON DE SAILLY \\
\date[d=#day,m=#month,y=#year]}]
   [\headerframedleft{\tfx\ss #where \\ {#time}}]

\stoptexdefinition

\MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}

\starttext
\input knuth
\stoptext

[-- Attachment #1.2: Type: text/html, Size: 1836 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-17 13:25 About \setupheadertexts : simplify a code Fabrice Couvreur
@ 2017-08-17 22:39 ` Henri
  2017-08-18  4:25   ` Aditya Mahajan
  0 siblings, 1 reply; 25+ messages in thread
From: Henri @ 2017-08-17 22:39 UTC (permalink / raw)
  To: ntg-context

On Thu, 2017-08-17 at 15:25 +0200, Fabrice Couvreur wrote:
> Hello,
> To get the alignment, I had to create three \vbox. Can we simplify this code a bit ?
> Thank you
> Fabrice

Use the optional argument of the new framed you defined.

\setuplayout
  [header=3\lineheight,
   headerdistance=\lineheight]

\setupbackgrounds
  [header]
  [text]
  [frame=off,
   bottomframe=on,
   framecolor=darkgray,
   rulethickness=2pt]
  
\defineframed
  [headerframed]
  [frame=off,width=fit,height=\headerheight]

\starttexdefinition MyHeader #where #day #month #year #title #number #time 

  \setupheadertexts
    [{\headerframed[align=middle]{\\ \ss\sc\bf\red #title n\high{o}\,#number \\ }}]
       
  \setupheadertexts
    [{\headerframed[align=right]{\tfx \ss Lycée JANSON DE SAILLY \\
\date[d=#day,m=#month,y=#year]}}]
    [{\headerframed[align=left]{\tfx\ss #where \\ {#time}}}]
    
\stoptexdefinition
  
\MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}

\starttext
\input knuth
\stoptext

> 
> % macros=mkvi
> \setuplayout
>    [header=3\lineheight,
>     headerdistance=\lineheight]
> 
> \setupbackgrounds[header][text]
>                  [frame=off,
>                   bottomframe=on,
>                   framecolor=darkgray,
>                   rulethickness=2pt]
> 
> \defineframed[headerframedleft]
>              [frame=off,
>               align=left,
>               width=fit,height=\headerheight]
>     
> \defineframed[headerframedright]
>              [frame=off,
>               align=right,
>               width=fit,height=\headerheight]
>     
> \defineframed[headerframedmiddle]
>              [frame=off,
>               align=middle,
>               width=fit,height=\headerheight]
> 
> \starttexdefinition MyHeader #where #day #month #year #title #number #time 
> 
> \setupheadertexts
>    [\headerframedmiddle{\\ \ss\sc\bf\red #title n\high{o}\,#number \\ }]
>        
> \setupheadertexts
>    [\headerframedright{\tfx \ss Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}]
>    [\headerframedleft{\tfx\ss #where \\ {#time}}]
>     
> \stoptexdefinition
>   
> \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
> 
> \starttext
> \input knuth
> \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
> ___________________________________________________________________________________
___________________________________________________________________________________
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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-17 22:39 ` Henri
@ 2017-08-18  4:25   ` Aditya Mahajan
  2017-08-18  9:45     ` Otared Kavian
  0 siblings, 1 reply; 25+ messages in thread
From: Aditya Mahajan @ 2017-08-18  4:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1621 bytes --]

On Fri, 18 Aug 2017, Henri wrote:

> On Thu, 2017-08-17 at 15:25 +0200, Fabrice Couvreur wrote:
>> Hello,
>> To get the alignment, I had to create three \vbox. Can we simplify this code a bit ?
>> Thank you
>> Fabrice
>
> Use the optional argument of the new framed you defined.

In addition to that, you can also simplify other things as well. This is 
how I would have done it:

% macros=mkvi
\showframe

\setuplayout
    [header=3\lineheight,
     headerdistance=\lineheight]

\setupbackgrounds
   [header]
   [text]
   [
     frame=off,
     bottomframe=on,
     framecolor=darkgray,
     rulethickness=2pt,
   ]

\defineframed[headerframed]
              [
                frame=off, % For visualization set this to on
                height=fit,
                width=fit,
                location=bottom,
                boffset=\lineheight,
              ]

\starttexdefinition MyHeader #where #day #month #year #title #number #time

     \setupheadertexts
       [{\headerframed[align=middle, foregroundstyle=bold, foregroundcolor=red]
             {#title n\high{o}\,#number}}]

     \setupheadertexts
       [{\headerframed[align=flushleft, foregroundstyle=\ssx]
           {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
       [{\headerframed[align=flushright, foregroundstyle=\ssx]
           {#where \\ {#time}}}]

\stoptexdefinition

\MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}

\starttext
\input knuth
\stoptext

An added benefit is that you get correct interlinespace for the left and 
right header.

Aditya

[-- 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-18  4:25   ` Aditya Mahajan
@ 2017-08-18  9:45     ` Otared Kavian
  2017-08-18 10:46       ` Fabrice Couvreur
                         ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Otared Kavian @ 2017-08-18  9:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Aditya,

I tried to typeset your example, but got an error: whether or not the command
	% macros=mkvi
is present on the fist line, then ConTeXt complains saying that
	! Illegal parameter number in definition of \MyHeader
and stops typesetting pointing to the command \stoptexdefinition.

What am I missing here?
Thanks for your attention: OK

> On 18 Aug 2017, at 06:25, Aditya Mahajan <adityam@umich.edu> wrote:
> 
> On Fri, 18 Aug 2017, Henri wrote:
> 
>> On Thu, 2017-08-17 at 15:25 +0200, Fabrice Couvreur wrote:
>>> Hello,
>>> To get the alignment, I had to create three \vbox. Can we simplify this code a bit ?
>>> Thank you
>>> Fabrice
>> 
>> Use the optional argument of the new framed you defined.
> 
> In addition to that, you can also simplify other things as well. This is how I would have done it:
> 
> % macros=mkvi
> \showframe
> 
> \setuplayout
>   [header=3\lineheight,
>    headerdistance=\lineheight]
> 
> \setupbackgrounds
>  [header]
>  [text]
>  [
>    frame=off,
>    bottomframe=on,
>    framecolor=darkgray,
>    rulethickness=2pt,
>  ]
> 
> \defineframed[headerframed]
>             [
>               frame=off, % For visualization set this to on
>               height=fit,
>               width=fit,
>               location=bottom,
>               boffset=\lineheight,
>             ]
> 
> \starttexdefinition MyHeader #where #day #month #year #title #number #time
> 
>    \setupheadertexts
>      [{\headerframed[align=middle, foregroundstyle=bold, foregroundcolor=red]
>            {#title n\high{o}\,#number}}]
> 
>    \setupheadertexts
>      [{\headerframed[align=flushleft, foregroundstyle=\ssx]
>          {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
>      [{\headerframed[align=flushright, foregroundstyle=\ssx]
>          {#where \\ {#time}}}]
> 
> \stoptexdefinition
> 
> \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
> 
> \starttext
> \input knuth
> \stoptext
> 
> An added benefit is that you get correct interlinespace for the left and right header.
> 
> 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://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
___________________________________________________________________________________

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

* Re: About \setupheadertexts : simplify a code
  2017-08-18  9:45     ` Otared Kavian
@ 2017-08-18 10:46       ` Fabrice Couvreur
  2017-08-18 13:05       ` Jean-Pierre Delange
  2017-08-18 15:54       ` Aditya Mahajan
  2 siblings, 0 replies; 25+ messages in thread
From: Fabrice Couvreur @ 2017-08-18 10:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi,
@Aditya and Henri Thank you for your suggestions.
@Otared Maybe remove \showframe ?
Fabrice

2017-08-18 11:45 GMT+02:00 Otared Kavian <otared@gmail.com>:

> Hi Aditya,
>
> I tried to typeset your example, but got an error: whether or not the
> command
>         % macros=mkvi
> is present on the fist line, then ConTeXt complains saying that
>         ! Illegal parameter number in definition of \MyHeader
> and stops typesetting pointing to the command \stoptexdefinition.
>
> What am I missing here?
> Thanks for your attention: OK
>
> > On 18 Aug 2017, at 06:25, Aditya Mahajan <adityam@umich.edu> wrote:
> >
> > On Fri, 18 Aug 2017, Henri wrote:
> >
> >> On Thu, 2017-08-17 at 15:25 +0200, Fabrice Couvreur wrote:
> >>> Hello,
> >>> To get the alignment, I had to create three \vbox. Can we simplify
> this code a bit ?
> >>> Thank you
> >>> Fabrice
> >>
> >> Use the optional argument of the new framed you defined.
> >
> > In addition to that, you can also simplify other things as well. This is
> how I would have done it:
> >
> > % macros=mkvi
> > \showframe
> >
> > \setuplayout
> >   [header=3\lineheight,
> >    headerdistance=\lineheight]
> >
> > \setupbackgrounds
> >  [header]
> >  [text]
> >  [
> >    frame=off,
> >    bottomframe=on,
> >    framecolor=darkgray,
> >    rulethickness=2pt,
> >  ]
> >
> > \defineframed[headerframed]
> >             [
> >               frame=off, % For visualization set this to on
> >               height=fit,
> >               width=fit,
> >               location=bottom,
> >               boffset=\lineheight,
> >             ]
> >
> > \starttexdefinition MyHeader #where #day #month #year #title #number
> #time
> >
> >    \setupheadertexts
> >      [{\headerframed[align=middle, foregroundstyle=bold,
> foregroundcolor=red]
> >            {#title n\high{o}\,#number}}]
> >
> >    \setupheadertexts
> >      [{\headerframed[align=flushleft, foregroundstyle=\ssx]
> >          {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
> >      [{\headerframed[align=flushright, foregroundstyle=\ssx]
> >          {#where \\ {#time}}}]
> >
> > \stoptexdefinition
> >
> > \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
> >
> > \starttext
> > \input knuth
> > \stoptext
> >
> > An added benefit is that you get correct interlinespace for the left and
> right header.
> >
> > 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://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
> ____________________________________________________________
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 5773 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-18  9:45     ` Otared Kavian
  2017-08-18 10:46       ` Fabrice Couvreur
@ 2017-08-18 13:05       ` Jean-Pierre Delange
  2017-08-18 13:25         ` Fabrice Couvreur
  2017-08-18 15:06         ` Fabrice Couvreur
  2017-08-18 15:54       ` Aditya Mahajan
  2 siblings, 2 replies; 25+ messages in thread
From: Jean-Pierre Delange @ 2017-08-18 13:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Otared and Aditya,

I get the same mtx-context     | fatal error: return code: 1

The log shows this :

tex error  > tex error on line 36 in file /home/adeimantos/TRAVAIL/context/Fichiers-ConTeXt_Doc-Tests/ConTEXt_TEST_Formulaire.tex: ! Illegal parameter number in definition of \MyHeader



----- Mail original -----
De: "Otared Kavian" <otared@gmail.com>
À: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Envoyé: Vendredi 18 Août 2017 11:45:47
Objet: Re: [NTG-context] About \setupheadertexts : simplify a code

Hi Aditya,

I tried to typeset your example, but got an error: whether or not the command
	% macros=mkvi
is present on the fist line, then ConTeXt complains saying that
	! Illegal parameter number in definition of \MyHeader
and stops typesetting pointing to the command \stoptexdefinition.

What am I missing here?
Thanks for your attention: OK

> On 18 Aug 2017, at 06:25, Aditya Mahajan <adityam@umich.edu> wrote:
> 
> On Fri, 18 Aug 2017, Henri wrote:
> 
>> On Thu, 2017-08-17 at 15:25 +0200, Fabrice Couvreur wrote:
>>> Hello,
>>> To get the alignment, I had to create three \vbox. Can we simplify this code a bit ?
>>> Thank you
>>> Fabrice
>> 
>> Use the optional argument of the new framed you defined.
> 
> In addition to that, you can also simplify other things as well. This is how I would have done it:
> 
> % macros=mkvi
> \showframe
> 
> \setuplayout
>   [header=3\lineheight,
>    headerdistance=\lineheight]
> 
> \setupbackgrounds
>  [header]
>  [text]
>  [
>    frame=off,
>    bottomframe=on,
>    framecolor=darkgray,
>    rulethickness=2pt,
>  ]
> 
> \defineframed[headerframed]
>             [
>               frame=off, % For visualization set this to on
>               height=fit,
>               width=fit,
>               location=bottom,
>               boffset=\lineheight,
>             ]
> 
> \starttexdefinition MyHeader #where #day #month #year #title #number #time
> 
>    \setupheadertexts
>      [{\headerframed[align=middle, foregroundstyle=bold, foregroundcolor=red]
>            {#title n\high{o}\,#number}}]
> 
>    \setupheadertexts
>      [{\headerframed[align=flushleft, foregroundstyle=\ssx]
>          {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
>      [{\headerframed[align=flushright, foregroundstyle=\ssx]
>          {#where \\ {#time}}}]
> 
> \stoptexdefinition
> 
> \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
> 
> \starttext
> \input knuth
> \stoptext
> 
> An added benefit is that you get correct interlinespace for the left and right header.
> 
> 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://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
___________________________________________________________________________________

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

* Re: About \setupheadertexts : simplify a code
  2017-08-18 13:05       ` Jean-Pierre Delange
@ 2017-08-18 13:25         ` Fabrice Couvreur
  2017-08-18 15:06         ` Fabrice Couvreur
  1 sibling, 0 replies; 25+ messages in thread
From: Fabrice Couvreur @ 2017-08-18 13:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi,
It's okay for me
Fabrice

2017-08-18 15:05 GMT+02:00 Jean-Pierre Delange <adeimantos@free.fr>:

> Hi Otared and Aditya,
>
> I get the same mtx-context     | fatal error: return code: 1
>
> The log shows this :
>
> tex error  > tex error on line 36 in file /home/adeimantos/TRAVAIL/
> context/Fichiers-ConTeXt_Doc-Tests/ConTEXt_TEST_Formulaire.tex: ! Illegal
> parameter number in definition of \MyHeader
>
>
>
> ----- Mail original -----
> De: "Otared Kavian" <otared@gmail.com>
> À: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
> Envoyé: Vendredi 18 Août 2017 11:45:47
> Objet: Re: [NTG-context] About \setupheadertexts : simplify a code
>
> Hi Aditya,
>
> I tried to typeset your example, but got an error: whether or not the
> command
>         % macros=mkvi
> is present on the fist line, then ConTeXt complains saying that
>         ! Illegal parameter number in definition of \MyHeader
> and stops typesetting pointing to the command \stoptexdefinition.
>
> What am I missing here?
> Thanks for your attention: OK
>
> > On 18 Aug 2017, at 06:25, Aditya Mahajan <adityam@umich.edu> wrote:
> >
> > On Fri, 18 Aug 2017, Henri wrote:
> >
> >> On Thu, 2017-08-17 at 15:25 +0200, Fabrice Couvreur wrote:
> >>> Hello,
> >>> To get the alignment, I had to create three \vbox. Can we simplify
> this code a bit ?
> >>> Thank you
> >>> Fabrice
> >>
> >> Use the optional argument of the new framed you defined.
> >
> > In addition to that, you can also simplify other things as well. This is
> how I would have done it:
> >
> > % macros=mkvi
> > \showframe
> >
> > \setuplayout
> >   [header=3\lineheight,
> >    headerdistance=\lineheight]
> >
> > \setupbackgrounds
> >  [header]
> >  [text]
> >  [
> >    frame=off,
> >    bottomframe=on,
> >    framecolor=darkgray,
> >    rulethickness=2pt,
> >  ]
> >
> > \defineframed[headerframed]
> >             [
> >               frame=off, % For visualization set this to on
> >               height=fit,
> >               width=fit,
> >               location=bottom,
> >               boffset=\lineheight,
> >             ]
> >
> > \starttexdefinition MyHeader #where #day #month #year #title #number
> #time
> >
> >    \setupheadertexts
> >      [{\headerframed[align=middle, foregroundstyle=bold,
> foregroundcolor=red]
> >            {#title n\high{o}\,#number}}]
> >
> >    \setupheadertexts
> >      [{\headerframed[align=flushleft, foregroundstyle=\ssx]
> >          {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
> >      [{\headerframed[align=flushright, foregroundstyle=\ssx]
> >          {#where \\ {#time}}}]
> >
> > \stoptexdefinition
> >
> > \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
> >
> > \starttext
> > \input knuth
> > \stoptext
> >
> > An added benefit is that you get correct interlinespace for the left and
> right header.
> >
> > 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://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
> ____________________________________________________________
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 7487 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-18 13:05       ` Jean-Pierre Delange
  2017-08-18 13:25         ` Fabrice Couvreur
@ 2017-08-18 15:06         ` Fabrice Couvreur
  1 sibling, 0 replies; 25+ messages in thread
From: Fabrice Couvreur @ 2017-08-18 15:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi,
Thanks for your answers but I also get the same error
Fabrice

2017-08-18 15:05 GMT+02:00 Jean-Pierre Delange <adeimantos@free.fr>:

> Hi Otared and Aditya,
>
> I get the same mtx-context     | fatal error: return code: 1
>
> The log shows this :
>
> tex error  > tex error on line 36 in file /home/adeimantos/TRAVAIL/
> context/Fichiers-ConTeXt_Doc-Tests/ConTEXt_TEST_Formulaire.tex: ! Illegal
> parameter number in definition of \MyHeader
>
>
>
> ----- Mail original -----
> De: "Otared Kavian" <otared@gmail.com>
> À: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
> Envoyé: Vendredi 18 Août 2017 11:45:47
> Objet: Re: [NTG-context] About \setupheadertexts : simplify a code
>
> Hi Aditya,
>
> I tried to typeset your example, but got an error: whether or not the
> command
>         % macros=mkvi
> is present on the fist line, then ConTeXt complains saying that
>         ! Illegal parameter number in definition of \MyHeader
> and stops typesetting pointing to the command \stoptexdefinition.
>
> What am I missing here?
> Thanks for your attention: OK
>
> > On 18 Aug 2017, at 06:25, Aditya Mahajan <adityam@umich.edu> wrote:
> >
> > On Fri, 18 Aug 2017, Henri wrote:
> >
> >> On Thu, 2017-08-17 at 15:25 +0200, Fabrice Couvreur wrote:
> >>> Hello,
> >>> To get the alignment, I had to create three \vbox. Can we simplify
> this code a bit ?
> >>> Thank you
> >>> Fabrice
> >>
> >> Use the optional argument of the new framed you defined.
> >
> > In addition to that, you can also simplify other things as well. This is
> how I would have done it:
> >
> > % macros=mkvi
> > \showframe
> >
> > \setuplayout
> >   [header=3\lineheight,
> >    headerdistance=\lineheight]
> >
> > \setupbackgrounds
> >  [header]
> >  [text]
> >  [
> >    frame=off,
> >    bottomframe=on,
> >    framecolor=darkgray,
> >    rulethickness=2pt,
> >  ]
> >
> > \defineframed[headerframed]
> >             [
> >               frame=off, % For visualization set this to on
> >               height=fit,
> >               width=fit,
> >               location=bottom,
> >               boffset=\lineheight,
> >             ]
> >
> > \starttexdefinition MyHeader #where #day #month #year #title #number
> #time
> >
> >    \setupheadertexts
> >      [{\headerframed[align=middle, foregroundstyle=bold,
> foregroundcolor=red]
> >            {#title n\high{o}\,#number}}]
> >
> >    \setupheadertexts
> >      [{\headerframed[align=flushleft, foregroundstyle=\ssx]
> >          {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
> >      [{\headerframed[align=flushright, foregroundstyle=\ssx]
> >          {#where \\ {#time}}}]
> >
> > \stoptexdefinition
> >
> > \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
> >
> > \starttext
> > \input knuth
> > \stoptext
> >
> > An added benefit is that you get correct interlinespace for the left and
> right header.
> >
> > 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://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
> ____________________________________________________________
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 7264 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-18  9:45     ` Otared Kavian
  2017-08-18 10:46       ` Fabrice Couvreur
  2017-08-18 13:05       ` Jean-Pierre Delange
@ 2017-08-18 15:54       ` Aditya Mahajan
  2017-08-18 16:44         ` Otared Kavian
  2 siblings, 1 reply; 25+ messages in thread
From: Aditya Mahajan @ 2017-08-18 15:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 435 bytes --]

On Fri, 18 Aug 2017, Otared Kavian wrote:

> Hi Aditya,
>
> I tried to typeset your example, but got an error: whether or not the command
> 	% macros=mkvi
> is present on the fist line, then ConTeXt complains saying that
> 	! Illegal parameter number in definition of \MyHeader
> and stops typesetting pointing to the command \stoptexdefinition.

I am attaching the file. It runs fine here with ConTeXt  ver: 2017.08.14 
23:57.

Aditya

[-- Attachment #2: Type: APPLICATION/x-tex, Size: 1586 bytes --]

[-- Attachment #3: 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-18 15:54       ` Aditya Mahajan
@ 2017-08-18 16:44         ` Otared Kavian
  2017-08-18 21:34           ` Fabrice Couvreur
  0 siblings, 1 reply; 25+ messages in thread
From: Otared Kavian @ 2017-08-18 16:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Aditya,

Thanks for having sent the example file: indeed with your file I can typeset the example and see the expected result.
I don’t know what happened when I copied and pasted the example from the e-mail…
I think the command
	% macros = mkvi
was not set correctly written at the first line, that is I had a space before the percent sign « % ». In fact 
	%macros=mkvi
or
	%macros = mkvi
work as well.

By the way, wouldn’t be more user friendly, and more in the spirit of ConTeXt, if we had a command saying
	\enablemode[mkvi]
in order to tell ConTeXt that we are using %macros = mkvi ?

Best regards: OK

> On 18 Aug 2017, at 17:54, Aditya Mahajan <adityam@umich.edu> wrote:
> 
> On Fri, 18 Aug 2017, Otared Kavian wrote:
> 
>> Hi Aditya,
>> 
>> I tried to typeset your example, but got an error: whether or not the command
>> 	% macros=mkvi
>> is present on the fist line, then ConTeXt complains saying that
>> 	! Illegal parameter number in definition of \MyHeader
>> and stops typesetting pointing to the command \stoptexdefinition.
> 
> I am attaching the file. It runs fine here with ConTeXt  ver: 2017.08.14 23:57.
> 
> Aditya<frame.tex>___________________________________________________________________________________
> 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
___________________________________________________________________________________

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

* Re: About \setupheadertexts : simplify a code
  2017-08-18 16:44         ` Otared Kavian
@ 2017-08-18 21:34           ` Fabrice Couvreur
  2017-08-18 21:57             ` Rik Kabel
  2017-08-18 23:00             ` Aditya Mahajan
  0 siblings, 2 replies; 25+ messages in thread
From: Fabrice Couvreur @ 2017-08-18 21:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hello,
It's ok for me if I compile the Aditya file.
I have another problem with a simple structure. I created the file
MyLayout.tex containing the macro and I want to call this macro in the
dm1.tex file, but it does not work.
Thank you
Fabrice

#########
MyLayout.tex
#########

% macros=mkvi

\startenvironment MyLayout

\setuplayout
   [header=3\lineheight,
    headerdistance=\lineheight]

\setupbackgrounds
  [header]
  [text]
  [
    frame=off,
    bottomframe=on,
    framecolor=darkgray,
    rulethickness=2pt,
  ]

\defineframed[headerframed]
             [
               frame=off, % For visualization set this to on
               height=fit,
               width=fit,
               location=bottom,
               boffset=\lineheight,
             ]

\starttexdefinition MyHeader #where #day #month #year #title #number #time

    \setupheadertexts
      [{\headerframed[align=middle, foregroundstyle=bold,
foregroundcolor=red]
            {#title n\high{o}\,#number}}]

    \setupheadertexts
      [{\headerframed[align=flushleft, foregroundstyle=\ssx]
          {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
      [{\headerframed[align=flushright, foregroundstyle=\ssx]
          {#where \\ {#time}}}]

\stoptexdefinition

\stopenvironment

######
dm-1.tex
######

\startcomponent dm-1

  \environment MyLayout

  \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}

  \input knuth

\stopcomponent

2017-08-18 18:44 GMT+02:00 Otared Kavian <otared@gmail.com>:

> Hi Aditya,
>
> Thanks for having sent the example file: indeed with your file I can
> typeset the example and see the expected result.
> I don’t know what happened when I copied and pasted the example from the
> e-mail…
> I think the command
>         % macros = mkvi
> was not set correctly written at the first line, that is I had a space
> before the percent sign « % ». In fact
>         %macros=mkvi
> or
>         %macros = mkvi
> work as well.
>
> By the way, wouldn’t be more user friendly, and more in the spirit of
> ConTeXt, if we had a command saying
>         \enablemode[mkvi]
> in order to tell ConTeXt that we are using %macros = mkvi ?
>
> Best regards: OK
>
> > On 18 Aug 2017, at 17:54, Aditya Mahajan <adityam@umich.edu> wrote:
> >
> > On Fri, 18 Aug 2017, Otared Kavian wrote:
> >
> >> Hi Aditya,
> >>
> >> I tried to typeset your example, but got an error: whether or not the
> command
> >>      % macros=mkvi
> >> is present on the fist line, then ConTeXt complains saying that
> >>      ! Illegal parameter number in definition of \MyHeader
> >> and stops typesetting pointing to the command \stoptexdefinition.
> >
> > I am attaching the file. It runs fine here with ConTeXt  ver: 2017.08.14
> 23:57.
> >
> > Aditya<frame.tex>___________________________________________
> ________________________________________
> > 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
> ____________________________________________________________
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 6683 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-18 21:34           ` Fabrice Couvreur
@ 2017-08-18 21:57             ` Rik Kabel
  2017-08-18 22:14               ` Fabrice Couvreur
  2017-08-18 23:00             ` Aditya Mahajan
  1 sibling, 1 reply; 25+ messages in thread
From: Rik Kabel @ 2017-08-18 21:57 UTC (permalink / raw)
  To: ntg-context


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

On 2017-08-18 17:34, Fabrice Couvreur wrote:
> Hello,
> It's ok for me if I compile the Aditya file.
> I have another problem with a simple structure. I created the file 
> MyLayout.tex containing the macro and I want to call this macro in the 
> dm1.tex file, but it does not work.
> Thank you
> Fabrice
>
> #########
> MyLayout.tex
> #########
>
> % macros=mkvi
>
> \startenvironment MyLayout
>
> \setuplayout
>    [header=3\lineheight,
>     headerdistance=\lineheight]
>
> \setupbackgrounds
>   [header]
>   [text]
>   [
>     frame=off,
>     bottomframe=on,
>     framecolor=darkgray,
>     rulethickness=2pt,
>   ]
>
> \defineframed[headerframed]
>              [
>                frame=off, % For visualization set this to on
>                height=fit,
>                width=fit,
>                location=bottom,
>                boffset=\lineheight,
>              ]
>
> \starttexdefinition MyHeader #where #day #month #year #title #number #time
>
>     \setupheadertexts
>       [{\headerframed[align=middle, foregroundstyle=bold, 
> foregroundcolor=red]
>             {#title n\high{o}\,#number}}]
>
>     \setupheadertexts
>       [{\headerframed[align=flushleft, foregroundstyle=\ssx]
>           {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
>       [{\headerframed[align=flushright, foregroundstyle=\ssx]
>           {#where \\ {#time}}}]
>
> \stoptexdefinition
>
> \stopenvironment
>
> ######
> dm-1.tex
> ######
>
> \startcomponent dm-1
>
>   \environment MyLayout
>
>   \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
>
>   \input knuth
>
> \stopcomponent
>
> 2017-08-18 18:44 GMT+02:00 Otared Kavian <otared@gmail.com 
> <mailto:otared@gmail.com>>:
>
>     Hi Aditya,
>
>     Thanks for having sent the example file: indeed with your file I
>     can typeset the example and see the expected result.
>     I don’t know what happened when I copied and pasted the example
>     from the e-mail…
>     I think the command
>             % macros = mkvi
>     was not set correctly written at the first line, that is I had a
>     space before the percent sign « % ». In fact
>             %macros=mkvi
>     or
>             %macros = mkvi
>     work as well.
>
>     By the way, wouldn’t be more user friendly, and more in the spirit
>     of ConTeXt, if we had a command saying
>             \enablemode[mkvi]
>     in order to tell ConTeXt that we are using %macros = mkvi ?
>
>     Best regards: OK
>
>     > On 18 Aug 2017, at 17:54, Aditya Mahajan <adityam@umich.edu
>     <mailto:adityam@umich.edu>> wrote:
>     >
>     > On Fri, 18 Aug 2017, Otared Kavian wrote:
>     >
>     >> Hi Aditya,
>     >>
>     >> I tried to typeset your example, but got an error: whether or
>     not the command
>     >>      % macros=mkvi
>     >> is present on the fist line, then ConTeXt complains saying that
>     >>      ! Illegal parameter number in definition of \MyHeader
>     >> and stops typesetting pointing to the command \stoptexdefinition.
>     >
>     > I am attaching the file. It runs fine here with ConTeXt  ver:
>     2017.08.14 23 <tel:2017.08.14%2023>:57.
>     >
>     > Aditya<frame.tex>
>

I believe you need to declare the use of MKVI macros as the first thing 
in your project file if they will be used by any components.

-- 
Rik

[-- Attachment #1.2: Type: text/html, Size: 6962 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-18 21:57             ` Rik Kabel
@ 2017-08-18 22:14               ` Fabrice Couvreur
  2017-08-18 22:23                 ` Rik Kabel
  0 siblings, 1 reply; 25+ messages in thread
From: Fabrice Couvreur @ 2017-08-18 22:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi Rik,
Can you clarify by editing my files ?
Fabrice

2017-08-18 23:57 GMT+02:00 Rik Kabel <context@rik.users.panix.com>:

> On 2017-08-18 17:34, Fabrice Couvreur wrote:
>
> Hello,
> It's ok for me if I compile the Aditya file.
> I have another problem with a simple structure. I created the file
> MyLayout.tex containing the macro and I want to call this macro in the
> dm1.tex file, but it does not work.
> Thank you
> Fabrice
>
> #########
> MyLayout.tex
> #########
>
> % macros=mkvi
>
> \startenvironment MyLayout
>
> \setuplayout
>    [header=3\lineheight,
>     headerdistance=\lineheight]
>
> \setupbackgrounds
>   [header]
>   [text]
>   [
>     frame=off,
>     bottomframe=on,
>     framecolor=darkgray,
>     rulethickness=2pt,
>   ]
>
> \defineframed[headerframed]
>              [
>                frame=off, % For visualization set this to on
>                height=fit,
>                width=fit,
>                location=bottom,
>                boffset=\lineheight,
>              ]
>
> \starttexdefinition MyHeader #where #day #month #year #title #number #time
>
>     \setupheadertexts
>       [{\headerframed[align=middle, foregroundstyle=bold,
> foregroundcolor=red]
>             {#title n\high{o}\,#number}}]
>
>     \setupheadertexts
>       [{\headerframed[align=flushleft, foregroundstyle=\ssx]
>           {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
>       [{\headerframed[align=flushright, foregroundstyle=\ssx]
>           {#where \\ {#time}}}]
>
> \stoptexdefinition
>
> \stopenvironment
>
> ######
> dm-1.tex
> ######
>
> \startcomponent dm-1
>
>   \environment MyLayout
>
>   \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
>
>   \input knuth
>
> \stopcomponent
>
> 2017-08-18 18:44 GMT+02:00 Otared Kavian <otared@gmail.com>:
>
>> Hi Aditya,
>>
>> Thanks for having sent the example file: indeed with your file I can
>> typeset the example and see the expected result.
>> I don’t know what happened when I copied and pasted the example from the
>> e-mail…
>> I think the command
>>         % macros = mkvi
>> was not set correctly written at the first line, that is I had a space
>> before the percent sign « % ». In fact
>>         %macros=mkvi
>> or
>>         %macros = mkvi
>> work as well.
>>
>> By the way, wouldn’t be more user friendly, and more in the spirit of
>> ConTeXt, if we had a command saying
>>         \enablemode[mkvi]
>> in order to tell ConTeXt that we are using %macros = mkvi ?
>>
>> Best regards: OK
>>
>> > On 18 Aug 2017, at 17:54, Aditya Mahajan <adityam@umich.edu> wrote:
>> >
>> > On Fri, 18 Aug 2017, Otared Kavian wrote:
>> >
>> >> Hi Aditya,
>> >>
>> >> I tried to typeset your example, but got an error: whether or not the
>> command
>> >>      % macros=mkvi
>> >> is present on the fist line, then ConTeXt complains saying that
>> >>      ! Illegal parameter number in definition of \MyHeader
>> >> and stops typesetting pointing to the command \stoptexdefinition.
>> >
>> > I am attaching the file. It runs fine here with ConTeXt  ver: 2017.08.14
>> 23 <2017.08.14%2023>:57.
>> >
>> > Aditya<frame.tex>
>
>
> I believe you need to declare the use of MKVI macros as the first thing in
> your project file if they will be used by any components.
>
> --
> Rik
>
> ____________________________________________________________
> _______________________
> 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
> ____________________________________________________________
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 8901 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-18 22:14               ` Fabrice Couvreur
@ 2017-08-18 22:23                 ` Rik Kabel
  2017-08-18 23:01                   ` Fabrice Couvreur
  0 siblings, 1 reply; 25+ messages in thread
From: Rik Kabel @ 2017-08-18 22:23 UTC (permalink / raw)
  To: ntg-context


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

On 2017-08-18 18:14, Fabrice Couvreur wrote:
> Hi Rik,
> Can you clarify by editing my files ?
> Fabrice
>
> 2017-08-18 23:57 GMT+02:00 Rik Kabel <context@rik.users.panix.com 
> <mailto:context@rik.users.panix.com>>:
>
>     On 2017-08-18 17:34, Fabrice Couvreur wrote:
>>     Hello,
>>     It's ok for me if I compile the Aditya file.
>>     I have another problem with a simple structure. I created the
>>     file MyLayout.tex containing the macro and I want to call this
>>     macro in the dm1.tex file, but it does not work.
>>     Thank you
>>     Fabrice
>>
>>     #########
>>     MyLayout.tex
>>     #########
>>
>>     % macros=mkvi
>>
>>     \startenvironment MyLayout
>>
>>     \setuplayout
>>        [header=3\lineheight,
>>         headerdistance=\lineheight]
>>
>>     \setupbackgrounds
>>       [header]
>>       [text]
>>       [
>>         frame=off,
>>         bottomframe=on,
>>         framecolor=darkgray,
>>         rulethickness=2pt,
>>       ]
>>
>>     \defineframed[headerframed]
>>                  [
>>                    frame=off, % For visualization set this to on
>>                    height=fit,
>>                    width=fit,
>>                    location=bottom,
>>                    boffset=\lineheight,
>>                  ]
>>
>>     \starttexdefinition MyHeader #where #day #month #year #title
>>     #number #time
>>
>>         \setupheadertexts
>>           [{\headerframed[align=middle, foregroundstyle=bold,
>>     foregroundcolor=red]
>>                 {#title n\high{o}\,#number}}]
>>
>>         \setupheadertexts
>>           [{\headerframed[align=flushleft, foregroundstyle=\ssx]
>>               {Lycée JANSON DE SAILLY \\
>>     \date[d=#day,m=#month,y=#year]}}]
>>           [{\headerframed[align=flushright, foregroundstyle=\ssx]
>>               {#where \\ {#time}}}]
>>
>>     \stoptexdefinition
>>
>>     \stopenvironment
>>
>>     ######
>>     dm-1.tex
>>     ######
>>
>>     \startcomponent dm-1
>>
>>       \environment MyLayout
>>
>>       \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
>>
>>       \input knuth
>>
>>     \stopcomponent
>>
>>     2017-08-18 18:44 GMT+02:00 Otared Kavian <otared@gmail.com
>>     <mailto:otared@gmail.com>>:
>>
>>         Hi Aditya,
>>
>>         Thanks for having sent the example file: indeed with your
>>         file I can typeset the example and see the expected result.
>>         I don’t know what happened when I copied and pasted the
>>         example from the e-mail…
>>         I think the command
>>                 % macros = mkvi
>>         was not set correctly written at the first line, that is I
>>         had a space before the percent sign « % ». In fact
>>                 %macros=mkvi
>>         or
>>                 %macros = mkvi
>>         work as well.
>>
>>         By the way, wouldn’t be more user friendly, and more in the
>>         spirit of ConTeXt, if we had a command saying
>>                 \enablemode[mkvi]
>>         in order to tell ConTeXt that we are using %macros = mkvi ?
>>
>>         Best regards: OK
>>
>>         > On 18 Aug 2017, at 17:54, Aditya Mahajan <adityam@umich.edu
>>         <mailto:adityam@umich.edu>> wrote:
>>         >
>>         > On Fri, 18 Aug 2017, Otared Kavian wrote:
>>         >
>>         >> Hi Aditya,
>>         >>
>>         >> I tried to typeset your example, but got an error: whether
>>         or not the command
>>         >>      % macros=mkvi
>>         >> is present on the fist line, then ConTeXt complains saying
>>         that
>>         >>      ! Illegal parameter number in definition of \MyHeader
>>         >> and stops typesetting pointing to the command
>>         \stoptexdefinition.
>>         >
>>         > I am attaching the file. It runs fine here with ConTeXt 
>>         ver: 2017.08.14 23 <tel:2017.08.14%2023>:57.
>>         >
>>         > Aditya<frame.tex>
>>
>
>     I believe you need to declare the use of MKVI macros as the first
>     thing in your project file if they will be used by any components.
>
>     -- 
>     Rik
>

    %macros=mkvi
    \startcomponent dm-1
    …



-- 
Rik



[-- Attachment #1.2: Type: text/html, Size: 11721 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-18 21:34           ` Fabrice Couvreur
  2017-08-18 21:57             ` Rik Kabel
@ 2017-08-18 23:00             ` Aditya Mahajan
  1 sibling, 0 replies; 25+ messages in thread
From: Aditya Mahajan @ 2017-08-18 23:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 18 Aug 2017, Fabrice Couvreur wrote:

> Hello,
> It's ok for me if I compile the Aditya file.
> I have another problem with a simple structure. I created the file
> MyLayout.tex containing the macro and I want to call this macro in the
> dm1.tex file, but it does not work.
> Thank you
> Fabrice
>
> #########
> MyLayout.tex
> #########
>
> % macros=mkvi

Save this file as MyLayout.mkvi

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

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

* Re: About \setupheadertexts : simplify a code
  2017-08-18 22:23                 ` Rik Kabel
@ 2017-08-18 23:01                   ` Fabrice Couvreur
  2017-08-18 23:06                     ` Fabrice Couvreur
  2017-08-18 23:15                     ` Rik
  0 siblings, 2 replies; 25+ messages in thread
From: Fabrice Couvreur @ 2017-08-18 23:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

If I test this file, it does not work

% macros=mkvi

\startcomponent dm-1

  \environment MyLayout

  \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}

  \dorecurse{20}{\input knuth}

  \math{x^2+4x+5=0}

\stopcomponent

2017-08-19 0:23 GMT+02:00 Rik Kabel <context@rik.users.panix.com>:

> On 2017-08-18 18:14, Fabrice Couvreur wrote:
>
> Hi Rik,
> Can you clarify by editing my files ?
> Fabrice
>
> 2017-08-18 23:57 GMT+02:00 Rik Kabel <context@rik.users.panix.com>:
>
>> On 2017-08-18 17:34, Fabrice Couvreur wrote:
>>
>> Hello,
>> It's ok for me if I compile the Aditya file.
>> I have another problem with a simple structure. I created the file
>> MyLayout.tex containing the macro and I want to call this macro in the
>> dm1.tex file, but it does not work.
>> Thank you
>> Fabrice
>>
>> #########
>> MyLayout.tex
>> #########
>>
>> % macros=mkvi
>>
>> \startenvironment MyLayout
>>
>> \setuplayout
>>    [header=3\lineheight,
>>     headerdistance=\lineheight]
>>
>> \setupbackgrounds
>>   [header]
>>   [text]
>>   [
>>     frame=off,
>>     bottomframe=on,
>>     framecolor=darkgray,
>>     rulethickness=2pt,
>>   ]
>>
>> \defineframed[headerframed]
>>              [
>>                frame=off, % For visualization set this to on
>>                height=fit,
>>                width=fit,
>>                location=bottom,
>>                boffset=\lineheight,
>>              ]
>>
>> \starttexdefinition MyHeader #where #day #month #year #title #number #time
>>
>>     \setupheadertexts
>>       [{\headerframed[align=middle, foregroundstyle=bold,
>> foregroundcolor=red]
>>             {#title n\high{o}\,#number}}]
>>
>>     \setupheadertexts
>>       [{\headerframed[align=flushleft, foregroundstyle=\ssx]
>>           {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
>>       [{\headerframed[align=flushright, foregroundstyle=\ssx]
>>           {#where \\ {#time}}}]
>>
>> \stoptexdefinition
>>
>> \stopenvironment
>>
>> ######
>> dm-1.tex
>> ######
>>
>> \startcomponent dm-1
>>
>>   \environment MyLayout
>>
>>   \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
>>
>>   \input knuth
>>
>> \stopcomponent
>>
>> 2017-08-18 18:44 GMT+02:00 Otared Kavian <otared@gmail.com>:
>>
>>> Hi Aditya,
>>>
>>> Thanks for having sent the example file: indeed with your file I can
>>> typeset the example and see the expected result.
>>> I don’t know what happened when I copied and pasted the example from the
>>> e-mail…
>>> I think the command
>>>         % macros = mkvi
>>> was not set correctly written at the first line, that is I had a space
>>> before the percent sign « % ». In fact
>>>         %macros=mkvi
>>> or
>>>         %macros = mkvi
>>> work as well.
>>>
>>> By the way, wouldn’t be more user friendly, and more in the spirit of
>>> ConTeXt, if we had a command saying
>>>         \enablemode[mkvi]
>>> in order to tell ConTeXt that we are using %macros = mkvi ?
>>>
>>> Best regards: OK
>>>
>>> > On 18 Aug 2017, at 17:54, Aditya Mahajan <adityam@umich.edu> wrote:
>>> >
>>> > On Fri, 18 Aug 2017, Otared Kavian wrote:
>>> >
>>> >> Hi Aditya,
>>> >>
>>> >> I tried to typeset your example, but got an error: whether or not the
>>> command
>>> >>      % macros=mkvi
>>> >> is present on the fist line, then ConTeXt complains saying that
>>> >>      ! Illegal parameter number in definition of \MyHeader
>>> >> and stops typesetting pointing to the command \stoptexdefinition.
>>> >
>>> > I am attaching the file. It runs fine here with ConTeXt  ver: 2017.08.14
>>> 23:57.
>>> >
>>> > Aditya<frame.tex>
>>
>>
>> I believe you need to declare the use of MKVI macros as the first thing
>> in your project file if they will be used by any components.
>>
>> --
>> Rik
>>
>>
> %macros=mkvi
> \startcomponent dm-1
> …
>
>
>
> --
> Rik
>
>
>
> ____________________________________________________________
> _______________________
> 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
> ____________________________________________________________
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 13364 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-18 23:01                   ` Fabrice Couvreur
@ 2017-08-18 23:06                     ` Fabrice Couvreur
  2017-08-18 23:15                     ` Rik
  1 sibling, 0 replies; 25+ messages in thread
From: Fabrice Couvreur @ 2017-08-18 23:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi Aditya
it does not work

2017-08-19 1:01 GMT+02:00 Fabrice Couvreur <fabrice1.couvreur@gmail.com>:

> If I test this file, it does not work
>
> % macros=mkvi
>
> \startcomponent dm-1
>
>   \environment MyLayout
>
>   \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
>
>   \dorecurse{20}{\input knuth}
>
>   \math{x^2+4x+5=0}
>
> \stopcomponent
>
> 2017-08-19 0:23 GMT+02:00 Rik Kabel <context@rik.users.panix.com>:
>
>> On 2017-08-18 18:14, Fabrice Couvreur wrote:
>>
>> Hi Rik,
>> Can you clarify by editing my files ?
>> Fabrice
>>
>> 2017-08-18 23:57 GMT+02:00 Rik Kabel <context@rik.users.panix.com>:
>>
>>> On 2017-08-18 17:34, Fabrice Couvreur wrote:
>>>
>>> Hello,
>>> It's ok for me if I compile the Aditya file.
>>> I have another problem with a simple structure. I created the file
>>> MyLayout.tex containing the macro and I want to call this macro in the
>>> dm1.tex file, but it does not work.
>>> Thank you
>>> Fabrice
>>>
>>> #########
>>> MyLayout.tex
>>> #########
>>>
>>> % macros=mkvi
>>>
>>> \startenvironment MyLayout
>>>
>>> \setuplayout
>>>    [header=3\lineheight,
>>>     headerdistance=\lineheight]
>>>
>>> \setupbackgrounds
>>>   [header]
>>>   [text]
>>>   [
>>>     frame=off,
>>>     bottomframe=on,
>>>     framecolor=darkgray,
>>>     rulethickness=2pt,
>>>   ]
>>>
>>> \defineframed[headerframed]
>>>              [
>>>                frame=off, % For visualization set this to on
>>>                height=fit,
>>>                width=fit,
>>>                location=bottom,
>>>                boffset=\lineheight,
>>>              ]
>>>
>>> \starttexdefinition MyHeader #where #day #month #year #title #number
>>> #time
>>>
>>>     \setupheadertexts
>>>       [{\headerframed[align=middle, foregroundstyle=bold,
>>> foregroundcolor=red]
>>>             {#title n\high{o}\,#number}}]
>>>
>>>     \setupheadertexts
>>>       [{\headerframed[align=flushleft, foregroundstyle=\ssx]
>>>           {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
>>>       [{\headerframed[align=flushright, foregroundstyle=\ssx]
>>>           {#where \\ {#time}}}]
>>>
>>> \stoptexdefinition
>>>
>>> \stopenvironment
>>>
>>> ######
>>> dm-1.tex
>>> ######
>>>
>>> \startcomponent dm-1
>>>
>>>   \environment MyLayout
>>>
>>>   \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
>>>
>>>   \input knuth
>>>
>>> \stopcomponent
>>>
>>> 2017-08-18 18:44 GMT+02:00 Otared Kavian <otared@gmail.com>:
>>>
>>>> Hi Aditya,
>>>>
>>>> Thanks for having sent the example file: indeed with your file I can
>>>> typeset the example and see the expected result.
>>>> I don’t know what happened when I copied and pasted the example from
>>>> the e-mail…
>>>> I think the command
>>>>         % macros = mkvi
>>>> was not set correctly written at the first line, that is I had a space
>>>> before the percent sign « % ». In fact
>>>>         %macros=mkvi
>>>> or
>>>>         %macros = mkvi
>>>> work as well.
>>>>
>>>> By the way, wouldn’t be more user friendly, and more in the spirit of
>>>> ConTeXt, if we had a command saying
>>>>         \enablemode[mkvi]
>>>> in order to tell ConTeXt that we are using %macros = mkvi ?
>>>>
>>>> Best regards: OK
>>>>
>>>> > On 18 Aug 2017, at 17:54, Aditya Mahajan <adityam@umich.edu> wrote:
>>>> >
>>>> > On Fri, 18 Aug 2017, Otared Kavian wrote:
>>>> >
>>>> >> Hi Aditya,
>>>> >>
>>>> >> I tried to typeset your example, but got an error: whether or not
>>>> the command
>>>> >>      % macros=mkvi
>>>> >> is present on the fist line, then ConTeXt complains saying that
>>>> >>      ! Illegal parameter number in definition of \MyHeader
>>>> >> and stops typesetting pointing to the command \stoptexdefinition.
>>>> >
>>>> > I am attaching the file. It runs fine here with ConTeXt  ver: 2017.08.14
>>>> 23:57.
>>>> >
>>>> > Aditya<frame.tex>
>>>
>>>
>>> I believe you need to declare the use of MKVI macros as the first thing
>>> in your project file if they will be used by any components.
>>>
>>> --
>>> Rik
>>>
>>>
>> %macros=mkvi
>> \startcomponent dm-1
>> …
>>
>>
>>
>> --
>> Rik
>>
>>
>>
>> ____________________________________________________________
>> _______________________
>> 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/list
>> info/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki     : http://contextgarden.net
>> ____________________________________________________________
>> _______________________
>>
>
>

[-- Attachment #1.2: Type: text/html, Size: 14700 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-18 23:01                   ` Fabrice Couvreur
  2017-08-18 23:06                     ` Fabrice Couvreur
@ 2017-08-18 23:15                     ` Rik
  2017-08-18 23:25                       ` Fabrice Couvreur
  1 sibling, 1 reply; 25+ messages in thread
From: Rik @ 2017-08-18 23:15 UTC (permalink / raw)
  To: ntg-context


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

On 2017-08-18 19:01, Fabrice Couvreur wrote:
> If I test this file, it does not work
>
> % macros=mkvi
>
> \startcomponent dm-1
>
>   \environment MyLayout
>
>   \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
>
>   \dorecurse{20}{\input knuth}
>
>   \math{x^2+4x+5=0}
>
> \stopcomponent
>
> 2017-08-19 0:23 GMT+02:00 Rik Kabel <context@rik.users.panix.com 
> <mailto:context@rik.users.panix.com>>:
>
>     On 2017-08-18 18:14, Fabrice Couvreur wrote:
>>     Hi Rik,
>>     Can you clarify by editing my files ?
>>     Fabrice
>>
>>     2017-08-18 23:57 GMT+02:00 Rik Kabel <context@rik.users.panix.com
>>     <mailto:context@rik.users.panix.com>>:
>>
>>         On 2017-08-18 17:34, Fabrice Couvreur wrote:
>>>         Hello,
>>>         It's ok for me if I compile the Aditya file.
>>>         I have another problem with a simple structure. I created
>>>         the file MyLayout.tex containing the macro and I want to
>>>         call this macro in the dm1.tex file, but it does not work.
>>>         Thank you
>>>         Fabrice
>>>
>>>         #########
>>>         MyLayout.tex
>>>         #########
>>>
>>>         % macros=mkvi
>>>
>>>         \startenvironment MyLayout
>>>
>>>         \setuplayout
>>>            [header=3\lineheight,
>>>             headerdistance=\lineheight]
>>>
>>>         \setupbackgrounds
>>>           [header]
>>>           [text]
>>>           [
>>>             frame=off,
>>>             bottomframe=on,
>>>             framecolor=darkgray,
>>>             rulethickness=2pt,
>>>           ]
>>>
>>>         \defineframed[headerframed]
>>>                      [
>>>                        frame=off, % For visualization set this to on
>>>                        height=fit,
>>>                        width=fit,
>>>                        location=bottom,
>>>         boffset=\lineheight,
>>>                      ]
>>>
>>>         \starttexdefinition MyHeader #where #day #month #year #title
>>>         #number #time
>>>
>>>             \setupheadertexts
>>>         [{\headerframed[align=middle, foregroundstyle=bold,
>>>         foregroundcolor=red]
>>>                     {#title n\high{o}\,#number}}]
>>>
>>>             \setupheadertexts
>>>         [{\headerframed[align=flushleft, foregroundstyle=\ssx]
>>>                   {Lycée JANSON DE SAILLY \\
>>>         \date[d=#day,m=#month,y=#year]}}]
>>>         [{\headerframed[align=flushright, foregroundstyle=\ssx]
>>>                   {#where \\ {#time}}}]
>>>
>>>         \stoptexdefinition
>>>
>>>         \stopenvironment
>>>
>>>         ######
>>>         dm-1.tex
>>>         ######
>>>
>>>         \startcomponent dm-1
>>>
>>>           \environment MyLayout
>>>
>>>           \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
>>>
>>>         \input knuth
>>>
>>>         \stopcomponent
>>>
>>>         2017-08-18 18:44 GMT+02:00 Otared Kavian <otared@gmail.com
>>>         <mailto:otared@gmail.com>>:
>>>
>>>             Hi Aditya,
>>>
>>>             Thanks for having sent the example file: indeed with
>>>             your file I can typeset the example and see the expected
>>>             result.
>>>             I don’t know what happened when I copied and pasted the
>>>             example from the e-mail…
>>>             I think the command
>>>                     % macros = mkvi
>>>             was not set correctly written at the first line, that is
>>>             I had a space before the percent sign « % ». In fact
>>>                     %macros=mkvi
>>>             or
>>>                     %macros = mkvi
>>>             work as well.
>>>
>>>             By the way, wouldn’t be more user friendly, and more in
>>>             the spirit of ConTeXt, if we had a command saying
>>>                     \enablemode[mkvi]
>>>             in order to tell ConTeXt that we are using %macros = mkvi ?
>>>
>>>             Best regards: OK
>>>
>>>             > On 18 Aug 2017, at 17:54, Aditya Mahajan
>>>             <adityam@umich.edu <mailto:adityam@umich.edu>> wrote:
>>>             >
>>>             > On Fri, 18 Aug 2017, Otared Kavian wrote:
>>>             >
>>>             >> Hi Aditya,
>>>             >>
>>>             >> I tried to typeset your example, but got an error:
>>>             whether or not the command
>>>             >>      % macros=mkvi
>>>             >> is present on the fist line, then ConTeXt complains
>>>             saying that
>>>             >>      ! Illegal parameter number in definition of
>>>             \MyHeader
>>>             >> and stops typesetting pointing to the command
>>>             \stoptexdefinition.
>>>             >
>>>             > I am attaching the file. It runs fine here with
>>>             ConTeXt  ver: 2017.08.14 23 <tel:2017.08.14%2023>:57.
>>>             >
>>>             > Aditya<frame.tex>
>>>
>>
>>         I believe you need to declare the use of MKVI macros as the
>>         first thing in your project file if they will be used by any
>>         components.
>>
>>         -- 
>>         Rik
>>
>
>         %macros=mkvi
>         \startcomponent dm-1
>         …
>

I was wrong, and (no surprise) Aditya was correct.

The %macros=mkvi line is not needed in dm1.tex. It should be at the top 
of MyLayout.tex.

You may then reference MyLayout.tex (note the addition of the extension) 
in dm1.tex, or you may rename the file to MyLayout.mkvi, where you can 
reference it as either MyLayout or as MyLayout.mkvi.

Sorry for the noise.

-- 
Rik

[-- Attachment #1.2: Type: text/html, Size: 18776 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-18 23:15                     ` Rik
@ 2017-08-18 23:25                       ` Fabrice Couvreur
  0 siblings, 0 replies; 25+ messages in thread
From: Fabrice Couvreur @ 2017-08-18 23:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

I turn around !!
It does not work

2017-08-19 1:15 GMT+02:00 Rik <rik@panix.com>:

> On 2017-08-18 19:01, Fabrice Couvreur wrote:
>
> If I test this file, it does not work
>
> % macros=mkvi
>
> \startcomponent dm-1
>
>   \environment MyLayout
>
>   \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
>
>   \dorecurse{20}{\input knuth}
>
>   \math{x^2+4x+5=0}
>
> \stopcomponent
>
> 2017-08-19 0:23 GMT+02:00 Rik Kabel <context@rik.users.panix.com>:
>
>> On 2017-08-18 18:14, Fabrice Couvreur wrote:
>>
>> Hi Rik,
>> Can you clarify by editing my files ?
>> Fabrice
>>
>> 2017-08-18 23:57 GMT+02:00 Rik Kabel <context@rik.users.panix.com>:
>>
>>> On 2017-08-18 17:34, Fabrice Couvreur wrote:
>>>
>>> Hello,
>>> It's ok for me if I compile the Aditya file.
>>> I have another problem with a simple structure. I created the file
>>> MyLayout.tex containing the macro and I want to call this macro in the
>>> dm1.tex file, but it does not work.
>>> Thank you
>>> Fabrice
>>>
>>> #########
>>> MyLayout.tex
>>> #########
>>>
>>> % macros=mkvi
>>>
>>> \startenvironment MyLayout
>>>
>>> \setuplayout
>>>    [header=3\lineheight,
>>>     headerdistance=\lineheight]
>>>
>>> \setupbackgrounds
>>>   [header]
>>>   [text]
>>>   [
>>>     frame=off,
>>>     bottomframe=on,
>>>     framecolor=darkgray,
>>>     rulethickness=2pt,
>>>   ]
>>>
>>> \defineframed[headerframed]
>>>              [
>>>                frame=off, % For visualization set this to on
>>>                height=fit,
>>>                width=fit,
>>>                location=bottom,
>>>                boffset=\lineheight,
>>>              ]
>>>
>>> \starttexdefinition MyHeader #where #day #month #year #title #number
>>> #time
>>>
>>>     \setupheadertexts
>>>       [{\headerframed[align=middle, foregroundstyle=bold,
>>> foregroundcolor=red]
>>>             {#title n\high{o}\,#number}}]
>>>
>>>     \setupheadertexts
>>>       [{\headerframed[align=flushleft, foregroundstyle=\ssx]
>>>           {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
>>>       [{\headerframed[align=flushright, foregroundstyle=\ssx]
>>>           {#where \\ {#time}}}]
>>>
>>> \stoptexdefinition
>>>
>>> \stopenvironment
>>>
>>> ######
>>> dm-1.tex
>>> ######
>>>
>>> \startcomponent dm-1
>>>
>>>   \environment MyLayout
>>>
>>>   \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
>>>
>>>   \input knuth
>>>
>>> \stopcomponent
>>>
>>> 2017-08-18 18:44 GMT+02:00 Otared Kavian <otared@gmail.com>:
>>>
>>>> Hi Aditya,
>>>>
>>>> Thanks for having sent the example file: indeed with your file I can
>>>> typeset the example and see the expected result.
>>>> I don’t know what happened when I copied and pasted the example from
>>>> the e-mail…
>>>> I think the command
>>>>         % macros = mkvi
>>>> was not set correctly written at the first line, that is I had a space
>>>> before the percent sign « % ». In fact
>>>>         %macros=mkvi
>>>> or
>>>>         %macros = mkvi
>>>> work as well.
>>>>
>>>> By the way, wouldn’t be more user friendly, and more in the spirit of
>>>> ConTeXt, if we had a command saying
>>>>         \enablemode[mkvi]
>>>> in order to tell ConTeXt that we are using %macros = mkvi ?
>>>>
>>>> Best regards: OK
>>>>
>>>> > On 18 Aug 2017, at 17:54, Aditya Mahajan <adityam@umich.edu> wrote:
>>>> >
>>>> > On Fri, 18 Aug 2017, Otared Kavian wrote:
>>>> >
>>>> >> Hi Aditya,
>>>> >>
>>>> >> I tried to typeset your example, but got an error: whether or not
>>>> the command
>>>> >>      % macros=mkvi
>>>> >> is present on the fist line, then ConTeXt complains saying that
>>>> >>      ! Illegal parameter number in definition of \MyHeader
>>>> >> and stops typesetting pointing to the command \stoptexdefinition.
>>>> >
>>>> > I am attaching the file. It runs fine here with ConTeXt  ver: 2017.08.14
>>>> 23 <2017.08.14%2023>:57.
>>>> >
>>>> > Aditya<frame.tex>
>>>
>>>
>>> I believe you need to declare the use of MKVI macros as the first thing
>>> in your project file if they will be used by any components.
>>>
>>> --
>>> Rik
>>>
>>>
>> %macros=mkvi
>> \startcomponent dm-1
>> …
>>
>>
> I was wrong, and (no surprise) Aditya was correct.
>
> The %macros=mkvi line is not needed in dm1.tex. It should be at the top
> of MyLayout.tex.
>
> You may then reference MyLayout.tex (note the addition of the extension)
> in dm1.tex, or you may rename the file to MyLayout.mkvi, where you can
> reference it as either MyLayout or as MyLayout.mkvi.
>
> Sorry for the noise.
>
> --
> Rik
>
> ____________________________________________________________
> _______________________
> 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
> ____________________________________________________________
> _______________________
>

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

[-- Attachment #2: MyLayout.mkvi --]
[-- Type: application/octet-stream, Size: 1561 bytes --]

% macros=mkvi

\mainlanguage[fr]
  
\setupbodyfont[12pt,pagella]

\definelayout
   [noheader]
   [header=2\lineheight,
    headerdistance=\lineheight,
    backspace=2cm,
    width=middle,
    topspace=\dimexpr 2cm-\headerheight-\headerdistance\relax,
    footer=\lineheight,
    height=middle]

\setuplayout
   [header=\zeropoint,
    headerdistance=\lineheight,
    backspace=2cm,
    width=middle,
    topspace=\dimexpr 2cm-\headerheight-\headerdistance\relax,
    footer=\lineheight,
    height=middle]

\definelayout[1][noheader]

\setuppagenumbering[alternative=doublesided,location=]

\setupfootertexts[\tfxx Page \pagenumber\,/\,\lastpage][]

\definecolor[darkgray]   [s=.25]

\setupbackgrounds
  [header]
  [text]
  [
    frame=off,
    bottomframe=on,
    framecolor=darkgray,
    rulethickness=2pt,
  ]

\defineframed[headerframed]
             [
               frame=off, % For visualization set this to on
               height=fit,
               width=fit,
               location=bottom,
               boffset=\lineheight,
             ]

\starttexdefinition MyHeader #where #day #month #year #title #number #time

    \setupheadertexts
      [{\headerframed[align=middle, foregroundstyle=bold, foregroundcolor=red]
            {#title n\high{o}\,#number}}]

    \setupheadertexts
      [{\headerframed[align=flushleft, foregroundstyle=\ssx]
          {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
      [{\headerframed[align=flushright, foregroundstyle=\ssx]
          {#where \\ {#time}}}]

\stoptexdefinition

\stopenvironment

[-- Attachment #3: dm-1.tex --]
[-- Type: application/x-tex, Size: 189 bytes --]

[-- Attachment #4: 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-19 10:35     ` Aditya Mahajan
  2017-08-19 10:51       ` Fabrice Couvreur
@ 2017-08-19 16:38       ` Jean-Pierre Delange
  1 sibling, 0 replies; 25+ messages in thread
From: Jean-Pierre Delange @ 2017-08-19 16:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Aditya, Fabrice and others,

I didn't know that the solution was to compile dm-1.tex with a call to MyLayout.mkvi. 
The file compile perfectly with \environment MyLayout command...

JP

----- Mail original -----
De: "Aditya Mahajan" <adityam@umich.edu>
À: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Envoyé: Samedi 19 Août 2017 12:35:24
Objet: Re: [NTG-context] About \setupheadertexts : simplify a code

On Sat, 19 Aug 2017, Fabrice Couvreur wrote:

> Hello,
> I have tried many approaches, but it still does not work. Everything is
> passed to the dm-1.tex file (font, footer) but not the header.


> \startcomponent dm-1
>
>  \component MyLayout
>
>  \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
>
>  \input knuth
>
> \stopcomponent

Two things:

1. Use \environment MyLayout instead of \component MyLayout.
2. The environment should be set before \startcomponent.

I am attaching a zip file with working code.

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

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

* Re: About \setupheadertexts : simplify a code
       [not found] <mailman.1.1503136802.15098.ntg-context@ntg.nl>
@ 2017-08-19 11:58 ` Jeong Dal
  0 siblings, 0 replies; 25+ messages in thread
From: Jeong Dal @ 2017-08-19 11:58 UTC (permalink / raw)
  To: ntg-context


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

Dear Fabrice,

I tried to compile your example, but not succeed.
I am sorry that I couldn’t tell you what is the problem.

Here is the part of the log file. One thing that I don’t understand is  why it reads ##title and ##number, …
Is it normal in log file?

I hope that experts correct your example to work.

Best regards,

Dalyoung

*****************
tex error       > tex error on line 64 in file mylayout.mkiv: ! Illegal parameter number in definition of \MyHeader

<to be read again> 
t
<argument> ..., foregroundstyle=bold,foregroundcolor=red]{##t
                                                  itle n\high {o}\,##number}...
\dostarttexdefinition ...clf_texdefinition_two {#1
                                                  }
l.64 \stoptexdefinition
                     

54          [{\headerframed[align=middle, foregroundstyle=bold,
55     foregroundcolor=red]
56                {#title n\high{o}\,#number}}]
57     
58        \setupheadertexts
59          [{\headerframed[align=flushleft, foregroundstyle=\ssx]
60              {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
61          [{\headerframed[align=flushright, foregroundstyle=\ssx]
62              {#where \\ {#time}}}]
63     
64 >>  \stoptexdefinition
65     
66     \stopenvironment
67     
*********************

A strange thing is that 
> 2017. 8. 19. 오후 7:00, ntg-context-request@ntg.nl 작성:
> 
> Re: About \setupheadertexts : simplify a code 


[-- Attachment #1.2: Type: text/html, Size: 3835 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-19 10:35     ` Aditya Mahajan
@ 2017-08-19 10:51       ` Fabrice Couvreur
  2017-08-19 16:38       ` Jean-Pierre Delange
  1 sibling, 0 replies; 25+ messages in thread
From: Fabrice Couvreur @ 2017-08-19 10:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi Aditya,
Thank you very much !!
I did not know that it was necessary to use \environment instead of
\component, it is probably in the documentation
Fabrice

2017-08-19 12:35 GMT+02:00 Aditya Mahajan <adityam@umich.edu>:

> On Sat, 19 Aug 2017, Fabrice Couvreur wrote:
>
> Hello,
>> I have tried many approaches, but it still does not work. Everything is
>> passed to the dm-1.tex file (font, footer) but not the header.
>>
>
>
> \startcomponent dm-1
>>
>>  \component MyLayout
>>
>>  \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
>>
>>  \input knuth
>>
>> \stopcomponent
>>
>
> Two things:
>
> 1. Use \environment MyLayout instead of \component MyLayout.
> 2. The environment should be set before \startcomponent.
>
> I am attaching a zip file with working code.
>
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ____________________________________________________________
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 3035 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-19  9:55   ` Fabrice Couvreur
@ 2017-08-19 10:35     ` Aditya Mahajan
  2017-08-19 10:51       ` Fabrice Couvreur
  2017-08-19 16:38       ` Jean-Pierre Delange
  0 siblings, 2 replies; 25+ messages in thread
From: Aditya Mahajan @ 2017-08-19 10:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 559 bytes --]

On Sat, 19 Aug 2017, Fabrice Couvreur wrote:

> Hello,
> I have tried many approaches, but it still does not work. Everything is
> passed to the dm-1.tex file (font, footer) but not the header.


> \startcomponent dm-1
>
>  \component MyLayout
>
>  \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
>
>  \input knuth
>
> \stopcomponent

Two things:

1. Use \environment MyLayout instead of \component MyLayout.
2. The environment should be set before \startcomponent.

I am attaching a zip file with working code.

Aditya

[-- Attachment #2: Type: APPLICATION/zip, Size: 1060 bytes --]

[-- Attachment #3: 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
  2017-08-18 23:29 ` Jeong Dal
@ 2017-08-19  9:55   ` Fabrice Couvreur
  2017-08-19 10:35     ` Aditya Mahajan
  0 siblings, 1 reply; 25+ messages in thread
From: Fabrice Couvreur @ 2017-08-19  9:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hello,
I have tried many approaches, but it still does not work. Everything is
passed to the dm-1.tex file (font, footer) but not the header.
Have you tested the files, does it work for you ?
Sorry to insist, but I really need this way of doingThank you
Fabrice

##########
MyLayout.mkvi
##########

\startenvironment MyLayout

\setupbodyfont[12pt,pagella]

\definelayout
   [noheader]
   [header=2\lineheight,
    headerdistance=\lineheight,
    backspace=2cm,
    width=middle,
    topspace=\dimexpr 2cm-\headerheight-\headerdistance\relax,
    footer=\lineheight,
    height=middle]

\setuplayout
   [header=\zeropoint,
    headerdistance=\lineheight,
    backspace=2cm,
    width=middle,
    topspace=\dimexpr 2cm-\headerheight-\headerdistance\relax,
    footer=\lineheight,
    height=middle]

\definelayout[1][noheader]

\setuppagenumbering[alternative=doublesided,location=]

\setupfootertexts[\tfxx Page \pagenumber\,/\,\lastpage][]

\definecolor[darkgray]   [s=.25]

\setupbackgrounds
  [header]
  [text]
  [
    frame=off,
    bottomframe=on,
    framecolor=darkgray,
    rulethickness=2pt,
  ]

\defineframed[headerframed]
             [
               frame=off, % For visualization set this to on
               height=fit,
               width=fit,
               location=bottom,
               boffset=\lineheight,
             ]

\starttexdefinition MyHeader #where #day #month #year #title #number #time

    \setupheadertexts
      [{\headerframed[align=middle, foregroundstyle=bold,
foregroundcolor=red]
            {#title n\high{o}\,#number}}]

    \setupheadertexts
      [{\headerframed[align=flushleft, foregroundstyle=\ssx]
          {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
      [{\headerframed[align=flushright, foregroundstyle=\ssx]
          {#where \\ {#time}}}]

\stoptexdefinition

\stopenvironment


#######
dm-1.tex
#######

\startcomponent dm-1

  \component MyLayout

  \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}

  \input knuth

\stopcomponent

2017-08-19 1:29 GMT+02:00 Jeong Dal <haksan@me.com>:

> Hi, Otared,
>
> I am also able to typeset Aditya’s example without problem, so example
> file is OK for me.
> There may be something which is not in the file.
> I am using MKIV beta 6. 21 version under OSX.
>
> This is LuaTeX, Version 1.05.0 (TeX Live 2017)
>  system commands enabled.
> open source     > level 1, order 1, name '/Users/graph/ConTeXt/tex/
> texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
> system          >
> system          > ConTeXt  ver: 2017.06.21 23:03 MKIV beta  fmt:
> 2017.6.25  int: english/english
>
> Best regards,
>
> Dalyoung
>
>
> 2017. 8. 19. 오전 7:14, ntg-context-request@ntg.nl 작성:
>
> About \setupheadertexts : simplify a code
>
>
>
> ____________________________________________________________
> _______________________
> 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
> ____________________________________________________________
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 6295 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] 25+ messages in thread

* Re: About \setupheadertexts : simplify a code
       [not found] <mailman.1693.1503094464.2080.ntg-context@ntg.nl>
@ 2017-08-18 23:29 ` Jeong Dal
  2017-08-19  9:55   ` Fabrice Couvreur
  0 siblings, 1 reply; 25+ messages in thread
From: Jeong Dal @ 2017-08-18 23:29 UTC (permalink / raw)
  To: ntg-context


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

Hi, Otared,

I am also able to typeset Aditya’s example without problem, so example file is OK for me.
There may be something which is not in the file.
I am using MKIV beta 6. 21 version under OSX.

This is LuaTeX, Version 1.05.0 (TeX Live 2017) 
 system commands enabled.
open source     > level 1, order 1, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system          > 
system          > ConTeXt  ver: 2017.06.21 23:03 MKIV beta  fmt: 2017.6.25  int: english/english

Best regards,

Dalyoung


> 2017. 8. 19. 오전 7:14, ntg-context-request@ntg.nl 작성:
> 
> About \setupheadertexts : simplify a code


[-- Attachment #1.2: Type: text/html, Size: 2294 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] 25+ messages in thread

end of thread, other threads:[~2017-08-19 16:38 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-17 13:25 About \setupheadertexts : simplify a code Fabrice Couvreur
2017-08-17 22:39 ` Henri
2017-08-18  4:25   ` Aditya Mahajan
2017-08-18  9:45     ` Otared Kavian
2017-08-18 10:46       ` Fabrice Couvreur
2017-08-18 13:05       ` Jean-Pierre Delange
2017-08-18 13:25         ` Fabrice Couvreur
2017-08-18 15:06         ` Fabrice Couvreur
2017-08-18 15:54       ` Aditya Mahajan
2017-08-18 16:44         ` Otared Kavian
2017-08-18 21:34           ` Fabrice Couvreur
2017-08-18 21:57             ` Rik Kabel
2017-08-18 22:14               ` Fabrice Couvreur
2017-08-18 22:23                 ` Rik Kabel
2017-08-18 23:01                   ` Fabrice Couvreur
2017-08-18 23:06                     ` Fabrice Couvreur
2017-08-18 23:15                     ` Rik
2017-08-18 23:25                       ` Fabrice Couvreur
2017-08-18 23:00             ` Aditya Mahajan
     [not found] <mailman.1693.1503094464.2080.ntg-context@ntg.nl>
2017-08-18 23:29 ` Jeong Dal
2017-08-19  9:55   ` Fabrice Couvreur
2017-08-19 10:35     ` Aditya Mahajan
2017-08-19 10:51       ` Fabrice Couvreur
2017-08-19 16:38       ` Jean-Pierre Delange
     [not found] <mailman.1.1503136802.15098.ntg-context@ntg.nl>
2017-08-19 11:58 ` Jeong Dal

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