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