ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: varmaz@uni-bremen.de
To: Hans Hagen <pragma@wxs.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: width of definetextbackground
Date: Fri, 23 Jul 2010 08:49:37 +0200	[thread overview]
Message-ID: <20100723084937.10213955jvy2mb29@webmail.uni-bremen.de> (raw)
In-Reply-To: <4C48A769.4010403@wxs.nl>

Hi Hans, hi guys,

thanks for your answer, but, at least in my ConTeXt installation, it  
does not affect the width of the textbackground (see example 1).

I also tried other approaches to set the width of a textbackground  
being larger than the actual text width. So far I solved it using  
\startnarrower.

However when a page break happens within the textbackground ConTeXt  
does not set it properly. The dimensions of the defined textbackground  
are correct. however you will see the color of the background only at  
the first page but not after the page break. below an example (example  
2).

Similar happens when I have double sided pages.

do you have an idea how to fix this issue?

Thanks!

Armin


********** EXAMPLE 1

\definetextbackground[zhu]
        [location=paragraph,
         background=color,backgroundcolor=orange,
         %frame=off,topframe=on,
         leftoffset=0.5\bodyfontsize,rightoffset=.5\bodyfontsize,
         topoffset=.5\bodyfontsize,bottomoffset=.5\bodyfontsize,
         before={\startnarrower[left,right]},
         after={\stopnarrower},
         width=\paperwidth,
         frame=off]

\starttext

\dorecurse{1}{\input knuth\endgraf}
\startzhu
\dorecurse{2}{\input bryson\endgraf}
\stopzhu

\dorecurse{1}{\input knuth\endgraf}

\stoptext


*********** EXAMPLE 2


\setupnarrower[right=-1.0cm,left=-1.0cm]
\definetextbackground[zhu]
        [location=paragraph,
         background=color,backgroundcolor=orange,
         leftoffset=0.5\bodyfontsize,rightoffset=.5\bodyfontsize,
         topoffset=.5\bodyfontsize,bottomoffset=.5\bodyfontsize,
         before={\startnarrower[left,right]},
         after={\stopnarrower},
         frame=off]

\startsetups important:start
	\starttextbackground[zhu]
\stopsetups

\startsetups important:stop
     \endgraf
     \stoptextbackground
\stopsetups

\definestartstop
	[important]
   	[before=\setups{important:start},
    	after=\setups{important:stop}]

\starttext

\dorecurse{1}{\input knuth\endgraf}
\startimportant
\dorecurse{2}{\input bryson\endgraf}
\stopimportant

\dorecurse{1}{\input knuth\endgraf}

\startimportant
\dorecurse{3}{\input bryson\endgraf}
\stopimportant
\dorecurse{1}{\input knuth\endgraf}
\startimportant
\input bryson\endgraf
\stopimportant
\stoptext



Zitat von Hans Hagen <pragma@wxs.nl>:

> On 15-7-2010 6:02, Armin Varmaz wrote:
>> Hallo,
>>
>>
>>
>> I am wondering if there is an option in \definetextbackground to get the
>> output over the entire width of a page? I mean to go over the width of the
>> \textwidth (for example like
>> \setlayout[width=\textwidth+\outermargintotal])?
>
> \paperwidth
>
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------
>



___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2010-07-23  6:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-15 16:02 Armin Varmaz
2010-07-22 20:17 ` Hans Hagen
2010-07-23  6:49   ` varmaz [this message]
2010-07-23 11:35     ` Hans Hagen
2010-07-28 15:51       ` varmaz

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=20100723084937.10213955jvy2mb29@webmail.uni-bremen.de \
    --to=varmaz@uni-bremen.de \
    --cc=ntg-context@ntg.nl \
    --cc=pragma@wxs.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).