ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* header hanging into margin
@ 2017-02-18 14:44 Csikos Bela
  2017-02-19 13:38 ` header hanging into margin + rule Csikos Bela
  0 siblings, 1 reply; 2+ messages in thread
From: Csikos Bela @ 2017-02-18 14:44 UTC (permalink / raw)
  To: ntg-context

Dear context users:

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

Thank you ind advance,

bcsikos
___________________________________________________________________________________
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] 2+ messages in thread

* Re: header hanging into margin + rule
  2017-02-18 14:44 header hanging into margin Csikos Bela
@ 2017-02-19 13:38 ` Csikos Bela
  0 siblings, 0 replies; 2+ messages in thread
From: Csikos Bela @ 2017-02-19 13:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-18 14:44 header hanging into margin Csikos Bela
2017-02-19 13:38 ` header hanging into margin + rule Csikos Bela

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