ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* width of definetextbackground
@ 2010-07-15 16:02 Armin Varmaz
  2010-07-22 20:17 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Armin Varmaz @ 2010-07-15 16:02 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 591 bytes --]

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])?  

 

I played with \setuplayout before calling textbackground, but it did not
work perfectly since the layout of the text after \definetextbackground was
changed as well; \setuplayout[reset] before stopping the textbackground did
not help. 

 

I read the solutions proposed by Aditya but they did not help. Have you any
ideas how to get it?

 

Armin


[-- Attachment #1.2: Type: text/html, Size: 2566 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: width of definetextbackground
  2010-07-15 16:02 width of definetextbackground Armin Varmaz
@ 2010-07-22 20:17 ` Hans Hagen
  2010-07-23  6:49   ` varmaz
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2010-07-22 20:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Armin Varmaz

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
___________________________________________________________________________________


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

* Re: width of definetextbackground
  2010-07-22 20:17 ` Hans Hagen
@ 2010-07-23  6:49   ` varmaz
  2010-07-23 11:35     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: varmaz @ 2010-07-23  6:49 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

* Re: width of definetextbackground
  2010-07-23  6:49   ` varmaz
@ 2010-07-23 11:35     ` Hans Hagen
  2010-07-28 15:51       ` varmaz
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2010-07-23 11:35 UTC (permalink / raw)
  To: varmaz; +Cc: mailing list for ConTeXt users

On 23-7-2010 8:49, varmaz@uni-bremen.de wrote:
> 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.

it's related to the negative rightskip ... i can fix it but i need to 
think a bit about side effects

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


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

* Re: width of definetextbackground
  2010-07-23 11:35     ` Hans Hagen
@ 2010-07-28 15:51       ` varmaz
  0 siblings, 0 replies; 5+ messages in thread
From: varmaz @ 2010-07-28 15:51 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

Hi again,

is there another approach (I didn't find an appropriate one in the  
documentations) to define a text block with a width larger than the  
actual text width? such a text block should be able to go over several  
page and be able to handle left and right pages (that is at the right  
page I want 2cm more for the right side and at left pages I want 2 cm  
more for the left side)?

I appreciate any hint where to look for.

Armin

> On 23-7-2010 8:49, varmaz@uni-bremen.de wrote:
>> 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.
>
> it's related to the negative rightskip ... i can fix it but i need  
> to think a bit about side effects
>
> -----------------------------------------------------------------
>                                           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
___________________________________________________________________________________


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

end of thread, other threads:[~2010-07-28 15:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-15 16:02 width of definetextbackground Armin Varmaz
2010-07-22 20:17 ` Hans Hagen
2010-07-23  6:49   ` varmaz
2010-07-23 11:35     ` Hans Hagen
2010-07-28 15:51       ` varmaz

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