ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Fabrice Couvreur <fabrice1.couvreur@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: About \setupheadertexts : simplify a code
Date: Sat, 19 Aug 2017 11:55:37 +0200	[thread overview]
Message-ID: <CACyK-er9hc4uXqNN6uo+nuqHpRxLdSTCrdY9xQ5V=4j6Ck_6wg@mail.gmail.com> (raw)
In-Reply-To: <2C9FC0BA-21C1-4779-9A45-7EADEA58CDEE@me.com>


[-- 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
___________________________________________________________________________________

  reply	other threads:[~2017-08-19  9:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1693.1503094464.2080.ntg-context@ntg.nl>
2017-08-18 23:29 ` Jeong Dal
2017-08-19  9:55   ` Fabrice Couvreur [this message]
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
2017-08-17 13:25 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACyK-er9hc4uXqNN6uo+nuqHpRxLdSTCrdY9xQ5V=4j6Ck_6wg@mail.gmail.com' \
    --to=fabrice1.couvreur@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).