ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Csikos Bela <bcsikos425@freemail.hu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: header hanging into margin + rule
Date: Sun, 19 Feb 2017 14:38:12 +0100 (CET)	[thread overview]
Message-ID: <freemail.20170219143812.17197.1@fmxmldata00.freemail.hu> (raw)
In-Reply-To: <freemail.20170218154425.34394.1@fmxmldata06.freemail.hu>

[-- Attachment #1: Type: text/plain, Size: 1494 bytes --]

Csikos Bela írta:

>I would like to setup page headers to be wider than the main text, that is hanging
>into the margin area on both sides by 1.5-1.5 cms. How can I?
>
>Here is my code:
>
>\setuppapersize[A4]
>\setuplayout[backspace=3.5cm,
>    width=14cm]
>\setupheadertexts[]
>\setupheadertexts[\setups{text a}][]
>\startsetups[text a]
>  \rlap{Left header text}
>  \hfill
>  {Middle header text}
>  \hfill
>  \llap{\pagenumber}
>\stopsetups
>\starttext
>\input tufte
>\stoptext

OK, I experimented with this and found how I can make the header hang:

\setuppapersize[A4]
\setuplayout[backspace=3.5cm,width=14cm]
\setuppagenumbering[alternative=doublesided,location=]
\setupheader[text][after=\hrule]
\setupheadertexts[]
\setupheadertexts[\setups{text a}][][\setups{text b}][]
\startsetups[text a]
  \hskip-1.5cm
  \framed[frame=off,width=17cm,offset=none]{
  \rlap{Inner text}
  \hfill
  {Center text}
  \hfill
  \llap{\pagenumber}}
\stopsetups
\startsetups[text b]
  \hskip-1.5cm
  \framed[frame=off,width=17cm,offset=none]{
  \rlap{Outer text}
  \hfill
  {Center text}
  \hfill
  \llap{\pagenumber}}
\stopsetups
\starttext
\dorecurse{4}{\input tufte \page}
\stoptext

I also added a bottom rule to the header using after=\hrule option, but this rule
is not wide enough. How can I change the length of this rule to the same as
the header frame? I attach a pdf (made by pdflatex) showing what I'd like to get.

Thanks,

bcsikos


[-- Attachment #2: header-with-rule-example.pdf --]
[-- Type: application/pdf, Size: 21316 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
___________________________________________________________________________________

      reply	other threads:[~2017-02-19 13:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-18 14:44 header hanging into margin Csikos Bela
2017-02-19 13:38 ` Csikos Bela [this message]

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=freemail.20170219143812.17197.1@fmxmldata00.freemail.hu \
    --to=bcsikos425@freemail.hu \
    --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).