[NTG-context] Macro for a header does not work as well

Fabrice Couvreur fabrice1.couvreur at gmail.com
Mon Feb 18 12:04:12 CET 2019


Hi,
Aditya offered me this macro some time ago for my header. I updated context
standalone, and the display of the date I want to do the evaluation
(different from the current date) is no longer the same.
Thank you.
Fabrice

\setupbackgrounds
   [header]
   [text]
   [frame=off,
    topframe=off,
    bottomframe=on,
    framecolor=,
    rulethickness=1pt]

\defineframed
   [headerframed]
   [frame=off,
    height=fit,
    width=fit]

\startsetups [headertext]

\setupheadertexts
   [{
     \startframed [headerframed] [foregroundstyle=bold]
     \getvariable{headertext}{title}
n\high{o}\,\getvariable{headertext}{number}
     \stopframed
   }]

\setupheadertexts
        [{
          \startframed [headerframed] [align=flushleft,foregroundstyle=\ssx]
          \getvariable{headertext}{location}\\
          \getvariable{headertext}{time}
          \stopframed
        }]
        [{
          \startframed [headerframed]
[align=flushright,foregroundstyle=\ssx]
           Lycée LA SALLE\\

\date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},y=\getvariable{headertext}{year}]
          \stopframed
        }]

  \stopsetups


\setvariable{headertext}{set}{\directsetup{headertext}}
\setvariables
  [headertext]
  [title={Devoir surveillé de Mathématiques},
   number={4},
   day={27},
   month={02},
   year={2019},
   location={T\high{\tfxx ale}~ES},
   time={3 heures}]

\starttext
  \input knuth
\stoptext
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190218/832ff3a7/attachment.html>


More information about the ntg-context mailing list