[NTG-context] textbackground spacing offset

2023-11-16 Thread Marco Patzer
Hi!

I'm having problems getting the textbackground spacing offset to work.
Example:

\setupframedtext
  [offset=overlay,
   width=max,
   depthcorrection=off]

\setuptextbackground
  [location=paragraph,
   %% offset=overlay,   %% does nothing
   %% backgroundoffset=overlay, %% does nothing
   %% depthcorrection=off,  %% does nothing
   %% topoffset=3mm,%% works, but only for positive values
   background=,
   frame=on]

\starttext
  \startframedtext
\framed{Foo}
  \stopframedtext
  \starttextbackground
\framed{Foo}
  \stoptextbackground
\stoptext

How do it get the same spacing as in the framedtext case? The
textbackground has a small gap between the inner and outer frame at
the top and a larger gab at the bottom. I'm not concerned with
horizontal spacing here.

Marco

LMTX 2023.09.04 19:15
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] textbackground for text of different size

2021-09-12 Thread Sylvain Hubert via ntg-context
Dear List,

the red highlight block in the following example is not covering the two
40pt characters:

\definetextbackground[important][frame=no,background=color,backgroundcolor=red]
\starttext
abc\important{123{\switchtobodyfont[40pt]45}xy}z
\stoptext

Is there an option that fixes this?

Thanks!

Best,
Sylvain
___
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
___


Re: [NTG-context] textbackground not working

2021-06-25 Thread Hans Hagen

On 6/25/2021 8:33 AM, Christoph Reller wrote:

Hi,

Consider the MWE:

\definetextbackground[background][
   background=color,
   backgroundcolor=gray]
\starttext
\starttextbackground[background]
Test
\stoptextbackground
\stoptext

In the latest version 2021-06-24 of ConTeXt LMTX, the textbackground is 
not working. Could this be a bug or am I doing something wrong?


Cheers,

Christoph
fixed in next upload (note: tex->mp parameters are redone, more in a 
pull than push fashion)


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] textbackground not working

2021-06-25 Thread Christoph Reller
Hi,

Consider the MWE:

\definetextbackground[background][
  background=color,
  backgroundcolor=gray]
\starttext
\starttextbackground[background]
Test
\stoptextbackground
\stoptext

In the latest version 2021-06-24 of ConTeXt LMTX, the textbackground is not
working. Could this be a bug or am I doing something wrong?

Cheers,

Christoph
___
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
___


Re: [NTG-context] Textbackground inside Layer?

2019-12-09 Thread Wolfgang Schuster

Jon Wong schrieb am 06.12.2019 um 04:13:

\setupwhitespace[line] % A line's spacing between paragraphs.

\starttext

\definetextbackground[InfoText][
   location=paragraph, frame=on]


You can't use "location=paragraph" because the argument of the \setlayer 
command is a simple horizontal box which doesn't create a paragraph 
unless you us additional command which create a paragraph.



\definelayer[testlayer]
\setlayer[testlayer][x=1cm,y=3cm]{%
   \startInfoText
   \stopInfoText
}


Simpler method:

\setlayer
  [testlayer]
  [x=1cm,
  y=3cm]
  {\framed[framecolor=red]{TEXT}}

or

\setlayerframed
  [testlayer]
  [x=1cm,
  y=3cm]
  [framecolor=red]
  {TEXT}

Wolfgang

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


[NTG-context] Textbackground inside Layer?

2019-12-05 Thread Jon Wong
\setupwhitespace[line] % A line's spacing between paragraphs.

\starttext

\definetextbackground[InfoText][
  location=paragraph, frame=on]

\definelayer[testlayer]
\setlayer[testlayer][x=1cm,y=3cm]{%
  \startInfoText
  \stopInfoText
}
\flushlayer[testlayer]

\stoptext

Doesn’t work. Only works if I put text inside the layer.
___
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
___


Re: [NTG-context] Textbackground offset with multi-col paragraphs

2017-11-23 Thread Thomas Floeren
> On 2. Nov 2017, at 15:17, Thomas Floeren  wrote:
> 
> Hi,
> 
> I noticed that with one of the recent betas the right offset of my 
> textbackgrounds doesn’t work properly anymore when the textbackground 
> contains a multi-column “paragraph”.
> 
> A minimal:
> 
> \defineparagraphs [TestPar][n=2, distance=7mm]
> \setupparagraphs [TestPar][1][width=2em]
> 
> \definetextbackground [CB][
> location=paragraph,
> backgroundcolor=gray,
> leftoffset=.3em,
> rightoffset=.3em,
> topoffset=.3em,
> bottomoffset=.3em,
> frame=off
> ]
> 
> \starttext
> 
> \starttextbackground [CB]
> \dorecurse {40} {a b c } 
> \stoptextbackground
> 
> text
> 
> \starttextbackground [CB]
> \startTestPar
> img
> \TestPar
> \dorecurse {40} {a b c } 
> \stopTestPar
> \stoptextbackground
> 
> \stoptext
> 
> 
> The first box is OK and as expected. But with the second one (containing a 
> “paragraph”) the right offset gets miscalculated, so that the text runs into 
> the edge of the background.
> 
> With a beta from July or so the behavior was still OK.
> 

Any news on this?

Just to know if I should wait for a fix, or rather adapt my existing documents.

Thanks,

-- 
Tom

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

Re: [NTG-context] Textbackground offset with multi-col paragraphs

2017-11-02 Thread Thomas Floeren
> On 2. Nov 2017, at 18:55, Pablo Rodriguez  wrote:
> 
> On 11/02/2017 03:17 PM, Thomas Floeren wrote:
>> Hi,
>> 
>> I noticed that with one of the recent betas the right offset of my
>> textbackgrounds doesn’t work properly anymore when the textbackground
>> contains a multi-column “paragraph”.
>> 
>> The first box is OK and as expected. But with the second one
>> (containing a “paragraph”) the right offset gets miscalculated, so that
>> the text runs into the edge of the background.
>> 
>> With a beta from July or so the behavior was still OK.
> 
> Hi Thomas,
> 
> I can confirm the bug. It works fine with ConTeXt from TeX Live 2017,
> but not with latest beta (that I get to work) from 2017.10.29 15:44.
> 

Hi Pablo,

thanks for testing.

For me it’s still fine with 2017.07.30 19:30.
Not fine with 2017.10.29 15:44 and 2017.11.01 15:58.

-- 
Tom


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

Re: [NTG-context] Textbackground offset with multi-col paragraphs

2017-11-02 Thread Pablo Rodriguez
On 11/02/2017 03:17 PM, Thomas Floeren wrote:
> Hi,
> 
> I noticed that with one of the recent betas the right offset of my
> textbackgrounds doesn’t work properly anymore when the textbackground
> contains a multi-column “paragraph”.
> 
> The first box is OK and as expected. But with the second one
> (containing a “paragraph”) the right offset gets miscalculated, so that
> the text runs into the edge of the background.
> 
> With a beta from July or so the behavior was still OK.

Hi Thomas,

I can confirm the bug. It works fine with ConTeXt from TeX Live 2017,
but not with latest beta (that I get to work) from 2017.10.29 15:44.

Pablo
-- 
http://www.ousia.tk
___
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
___

[NTG-context] Textbackground offset with multi-col paragraphs

2017-11-02 Thread Thomas Floeren
Hi,

I noticed that with one of the recent betas the right offset of my 
textbackgrounds doesn’t work properly anymore when the textbackground contains 
a multi-column “paragraph”.

A minimal:

\defineparagraphs [TestPar][n=2, distance=7mm]
\setupparagraphs [TestPar][1][width=2em]

\definetextbackground [CB][
location=paragraph,
backgroundcolor=gray,
leftoffset=.3em,
rightoffset=.3em,
topoffset=.3em,
bottomoffset=.3em,
frame=off
]

\starttext

\starttextbackground [CB]
\dorecurse {40} {a b c } 
\stoptextbackground

text

\starttextbackground [CB]
\startTestPar
img
\TestPar
\dorecurse {40} {a b c } 
\stopTestPar
\stoptextbackground

\stoptext


The first box is OK and as expected. But with the second one (containing a 
“paragraph”) the right offset gets miscalculated, so that the text runs into 
the edge of the background.

With a beta from July or so the behavior was still OK.

Thanks for any advice,
best,

-- 
Tom

http://dflect.net/context-typeset-tool/

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

Re: [NTG-context] Textbackground issue with margin pictures

2017-04-03 Thread Hans Hagen

On 4/3/2017 2:58 PM, Tom wrote:

On 3. Apr 2017, at 10:16, Hans Hagen  wrote:

On 4/3/2017 2:20 AM, Tom wrote:

Hi,

today I updated from ConTeXt 2015.11.19 to the recent Beta 2017.03.26 16:15.

I noticed that my textbackgrounds now interfere with margin pictures, that is,
if there is a margin picture at the side of a textbackground, then the
textbackground is suppressed for the entire height of the margin picture.


Here is a minimal:

\setuplayout [
leftmargin=0mm,
rightmargin=45mm,
height=fit,
width=fit,
]

\definetextbackground [test]

\starttext

\placefigure [margin]{}{}

\starttextbackground [test]
\dorecurse{3}{\readfile{ward}{}{}}
\stoptextbackground

\stoptext


With the ConTeXt Current from 2016.05.19 13:43 I don’t see the issue, 
everything’s fine there.

Here are two screenshots:

Desired behavior (Ctx Current): http://d.pr/i/Xgtc
Non-desired behavior (Ctx Beta): http://d.pr/i/1gyi

Is this a bug?


\definetextbackground [test] [location=paragraph]

\setupfloat[figure][freeregion=no]




Thank you, Hans, this works absolutely great!

Two little questions:

I have set it now globally for _all_ floats as \setupfloats[freeregion=no].
At a first glance it doesn’t seem to cause any issues.
Is there any pitfall when setting it globally, which I might not be aware?

Is 'freeregion=no' an option that is meant to stay, or is it a workaround for 
the recent betas?


it will stay (being a feature)

Hans


--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Textbackground issue with margin pictures

2017-04-03 Thread Tom
> On 3. Apr 2017, at 10:16, Hans Hagen  wrote:
> 
> On 4/3/2017 2:20 AM, Tom wrote:
>> Hi,
>> 
>> today I updated from ConTeXt 2015.11.19 to the recent Beta 2017.03.26 16:15.
>> 
>> I noticed that my textbackgrounds now interfere with margin pictures, that 
>> is,
>> if there is a margin picture at the side of a textbackground, then the
>> textbackground is suppressed for the entire height of the margin picture.
>> 
>> 
>> Here is a minimal:
>> 
>> \setuplayout [
>> leftmargin=0mm,
>> rightmargin=45mm,
>> height=fit,
>> width=fit,
>> ]
>> 
>> \definetextbackground [test]
>> 
>> \starttext
>> 
>> \placefigure [margin]{}{}
>> 
>> \starttextbackground [test]
>> \dorecurse{3}{\readfile{ward}{}{}}
>> \stoptextbackground
>> 
>> \stoptext
>> 
>> 
>> With the ConTeXt Current from 2016.05.19 13:43 I don’t see the issue, 
>> everything’s fine there.
>> 
>> Here are two screenshots:
>> 
>> Desired behavior (Ctx Current): http://d.pr/i/Xgtc
>> Non-desired behavior (Ctx Beta): http://d.pr/i/1gyi
>> 
>> Is this a bug?
> 
> \definetextbackground [test] [location=paragraph]
> 
> \setupfloat[figure][freeregion=no]



Thank you, Hans, this works absolutely great!

Two little questions:

I have set it now globally for _all_ floats as \setupfloats[freeregion=no].
At a first glance it doesn’t seem to cause any issues. 
Is there any pitfall when setting it globally, which I might not be aware?

Is 'freeregion=no' an option that is meant to stay, or is it a workaround for 
the recent betas?

Thanks again,
Best,
-- 
Tom



> 
> \starttext
> 
> \placefigure [margin]{}{}
> 
> \starttextbackground [test]
>\dorecurse{3}{\readfile{ward}{}{}}
>\placefigure {}{}
>\dorecurse{3}{\readfile{ward}{}{}}
> \stoptextbackground
> 
> \stoptext
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

Re: [NTG-context] Textbackground issue with margin pictures

2017-04-03 Thread Hans Hagen

On 4/3/2017 2:20 AM, Tom wrote:

Hi,

today I updated from ConTeXt 2015.11.19 to the recent Beta 2017.03.26 16:15.

I noticed that my textbackgrounds now interfere with margin pictures, that is,
if there is a margin picture at the side of a textbackground, then the
textbackground is suppressed for the entire height of the margin picture.


Here is a minimal:

\setuplayout [
leftmargin=0mm,
rightmargin=45mm,
height=fit,
width=fit,
]

\definetextbackground [test]

\starttext

\placefigure [margin]{}{}

\starttextbackground [test]
\dorecurse{3}{\readfile{ward}{}{}}
\stoptextbackground

\stoptext


With the ConTeXt Current from 2016.05.19 13:43 I don’t see the issue, 
everything’s fine there.

Here are two screenshots:

Desired behavior (Ctx Current): http://d.pr/i/Xgtc
Non-desired behavior (Ctx Beta): http://d.pr/i/1gyi

Is this a bug?


\definetextbackground [test] [location=paragraph]

\setupfloat[figure][freeregion=no]

\starttext

\placefigure [margin]{}{}

\starttextbackground [test]
\dorecurse{3}{\readfile{ward}{}{}}
\placefigure {}{}
\dorecurse{3}{\readfile{ward}{}{}}
\stoptextbackground

\stoptext

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Textbackground issue with margin pictures

2017-04-02 Thread Tom
Hi,

today I updated from ConTeXt 2015.11.19 to the recent Beta 2017.03.26 16:15.

I noticed that my textbackgrounds now interfere with margin pictures, that is,
if there is a margin picture at the side of a textbackground, then the 
textbackground is suppressed for the entire height of the margin picture.


Here is a minimal:

\setuplayout [
leftmargin=0mm,
rightmargin=45mm,
height=fit,
width=fit,
]

\definetextbackground [test] 

\starttext

\placefigure [margin]{}{}

\starttextbackground [test]
\dorecurse{3}{\readfile{ward}{}{}}
\stoptextbackground

\stoptext


With the ConTeXt Current from 2016.05.19 13:43 I don’t see the issue, 
everything’s fine there.

Here are two screenshots:

Desired behavior (Ctx Current): http://d.pr/i/Xgtc
Non-desired behavior (Ctx Beta): http://d.pr/i/1gyi

Is this a bug?

Thanks for any help.

-- 
Thomas Floeren


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

[NTG-context] textbackground

2015-02-26 Thread Alan BRASLAU
Hello,

For a multilingual document, alternating one language or another, not
necessarily a bilingual, translated text, I thought about using
textbackground to set-off paragraphs. This technique could also apply
to a single language text having multiple levels of information,
perhaps statements followed by discussion, etc.

A problem appears with respect to footnotes that I do not know how to
handle. If the backgrounded text goes across pages placing footnotes,
then the footnote also gets the background. This is incorrect, perhaps
a bug.

Second problem, if a footnote of a backgrounded text gets placed on a
following page, then it may not get a background. (It is not clear to me
whether it would be correct for footnotes to get the background or
not.) Of course, a solution to this secondary problem might be
before={\startlocalfootnotes},
after={\placelocalfootnotes\stoplocalfootnotes},
although such a solution would postpone backgrounded footnotes to the
end of the backgrounded text.

Alan



MWE: 

\definetextbackground
[spanish]
[location=paragraph,
 frame=off,
 before={\language[es]},
 background=color,
 backgroundcolor=lightgray]

\starttext

\input darwin%
\startfootnote
\input dawkins
\stopfootnote

\input tufte

\startspanish
\input quevedo-es%
\startfootnote
\input cervantes-es
\stopfootnote
\stopspanish

\input zapf

\stoptext
___
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
___

Re: [NTG-context] textbackground

2015-02-26 Thread Hans Hagen

On 2/26/2015 10:22 AM, Alan BRASLAU wrote:

Hello,

For a multilingual document, alternating one language or another, not
necessarily a bilingual, translated text, I thought about using
textbackground to set-off paragraphs. This technique could also apply
to a single language text having multiple levels of information,
perhaps statements followed by discussion, etc.

A problem appears with respect to footnotes that I do not know how to
handle. If the backgrounded text goes across pages placing footnotes,
then the footnote also gets the background. This is incorrect, perhaps
a bug.

Second problem, if a footnote of a backgrounded text gets placed on a
following page, then it may not get a background. (It is not clear to me
whether it would be correct for footnotes to get the background or
not.) Of course, a solution to this secondary problem might be
before={\startlocalfootnotes},
after={\placelocalfootnotes\stoplocalfootnotes},
although such a solution would postpone backgrounded footnotes to the
end of the backgrounded text.

Alan



MWE:

\definetextbackground
 [spanish]
 [location=paragraph,
  frame=off,
  before={\language[es]},
  background=color,
  backgroundcolor=lightgray]

\starttext

\input darwin%
\startfootnote
\input dawkins
\stopfootnote

\input tufte

\startspanish
\input quevedo-es%
\startfootnote
\input cervantes-es
\stopfootnote
\stopspanish

\input zapf

\stoptext


\definetextbackground[en]
\definetextbackground[nl]

\setnewconstant\kindofpagetextareas 1 % low level, no high level switch 
(yet)


\starttext

\starttextbackground[en]
\dorecurse{10}{\input tufte \footnote{tufte} \par}
\stoptextbackground

\starttextbackground[nl]
\dorecurse{10}{\input tufte \footnote{tufte} \par}
\stoptextbackground

\stoptext


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

[NTG-context] textbackground within framedtext

2015-02-18 Thread Christoph Reller
Hi,

How can I use textbackground within framedtext. In the following MWE, the
background extends beyond the frame of framedtext. Do I have to use a
different mechanism?

\definetextbackground[bg][
  background=color,
  backgroundcolor=yellow,
  frame=off]

\starttext

\startframedtext
  Before \par
  \starttextbackground[bg]
  \input knuth
  \stoptextbackground \par
  After
\stopframedtext

\input tufte \par
\starttextbackground[bg]
\dorecurse{2}{\input knuth \par}
\stoptextbackground
\input tufte

\stoptext

Any feedback is welcome,

Regards,
Christoph
___
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
___

Re: [NTG-context] textbackground inside itemize

2014-07-09 Thread Hans Hagen

On 7/9/2014 5:55 AM, Troy Henderson wrote:

The following code produces a textbackground whose background color
enters into the itemize label area on the second (and succeeding)
lines of the paragraph.  I would appreciate advice on fixing this.


i'll send you a (simple one line) patch to test



Thanks,

Troy Henderson

---

\setuppapersize[letter,landscape][letter,landscape]

\definetextbackground[foo][
 state=start,
 location=paragraph,
 background=color,
 backgroundcolor={0.875,0.875,0.875},
 frame=off
]

\starttext
 \startcolumns[n=2,rule=on]
 \startitemize[n,2*broad]
 \item Here is my first item
 \starttextbackground[foo]
 Here is some long text that demonstrates how the
background color is wrong on the second line and all successive lines of
this paragraph.
 \stoptextbackground
 \item Here is my second item
 \stopitemize
 \stopcolumns
\stoptext


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




--

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


[NTG-context] textbackground inside itemize

2014-07-08 Thread Troy Henderson
The following code produces a textbackground whose background color enters
into the itemize label area on the second (and succeeding) lines of the
paragraph.  I would appreciate advice on fixing this.

Thanks,

Troy Henderson

---

\setuppapersize[letter,landscape][letter,landscape]

\definetextbackground[foo][
state=start,
location=paragraph,
background=color,
backgroundcolor={0.875,0.875,0.875},
frame=off
]

\starttext
\startcolumns[n=2,rule=on]
\startitemize[n,2*broad]
\item Here is my first item
\starttextbackground[foo]
Here is some long text that demonstrates how the
background color is wrong on the second line and all successive lines of
this paragraph.
\stoptextbackground
\item Here is my second item
\stopitemize
\stopcolumns
\stoptext
___
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
___

[NTG-context] TextBackground bottomoffset / topoffset

2011-12-25 Thread Kip Warner
Hey list,

I am using the following to typeset a text box containing text.

\definetextbackground[GeneralDocument][
location=paragraph,
color=color_text,
background=color,
backgroundcolor=colour_page,
framecolor=colour_text,
topoffset=1.0cm,
bottomoffset=1.0cm,
leftoffset=1.0cm,
rightoffset=1.0cm,
before={
\blank[2*big]
},
after={
\blank[2*big]
},
style=small,
corner=round,
frame=on]

This seems to work, but I find a problem is that if the text box spans
multiple pages, bottomoffset / topoffset are ignored at the points where
the page breaks. Suggestions?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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
___

Re: [NTG-context] TextBackground text area

2011-11-27 Thread Kip Warner
On Wed, 2011-11-23 at 21:52 -0500, Aditya Mahajan wrote:
 Why not just increase the value of leftoffset and rightoffset?

This seems to work, but I find a problem is that if the text box spans
multiple pages, bottomoffset / topoffset are ignored at the points where
the page breaks. Suggestions?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com



signature.asc
Description: This is a digitally signed message part
___
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
___

Re: [NTG-context] TextBackground text area

2011-11-24 Thread Kip Warner
On Wed, 2011-11-23 at 21:52 -0500, Aditya Mahajan wrote:
 Why not just increase the value of leftoffset and rightoffset?

This seems to work, but I find a problem is that if the text box spans
multiple pages, bottomoffset / topoffset are ignored at the points where
the page breaks. Suggestions?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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
___

[NTG-context] TextBackground text area

2011-11-23 Thread Kip Warner
Hey folks,

I've been pulling my hair out for hours, as I can't seem to figure out
how to set the margin with and height for a textbackground area so the
text doesn't start immediately at the left frame line and go to the
right frame line. I am using this:

\definetextbackground[FramedText][
location=paragraph,
color=color_text,
background=color,
backgroundcolor=colour_page,
framecolor=colour_text,
leftoffset=1.0\bodyfontsize,
rightoffset=1.0\bodyfontsize,
before={
\blank
\startnarrower
},
after={
\blank
\stopnarrower
},
style=italic,
corner=round,
frame=on]

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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
___

Re: [NTG-context] TextBackground text area

2011-11-23 Thread Aditya Mahajan

On Wed, 23 Nov 2011, Kip Warner wrote:


I've been pulling my hair out for hours, as I can't seem to figure out
how to set the margin with and height for a textbackground area so the
text doesn't start immediately at the left frame line and go to the
right frame line. I am using this:

\definetextbackground[FramedText][
   location=paragraph,
   color=color_text,
   background=color,
   backgroundcolor=colour_page,
   framecolor=colour_text,
   leftoffset=1.0\bodyfontsize,
   rightoffset=1.0\bodyfontsize,
   before={
   \blank
   \startnarrower
   },
   after={
   \blank
   \stopnarrower
   },
   style=italic,
   corner=round,
   frame=on]



Why not just increase the value of leftoffset and rightoffset?

\definetextbackground[FramedText][
location=paragraph,
color=black,
background=color,
backgroundcolor=blue:2,
framecolor=green:2,
leftoffset=1cm,
rightoffset=1cm,
style=italic,
corner=round,
frame=on]

\starttext

\startFramedText
\input knuth \endgraf
\stopFramedText

\stoptext

Aditya
___
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
___


Re: [NTG-context] TextBackground text area

2011-11-23 Thread Kip Warner
On Wed, 2011-11-23 at 21:52 -0500, Aditya Mahajan wrote:
 Why not just increase the value of leftoffset and rightoffset?

Because then the text is fine on the left side, but then goes past the
right frame border.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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
___

[NTG-context] textbackground

2011-11-19 Thread Hans van der Meer
I get the impression that textbackground is not yet completely repaired in:

The small example below shows that location text starts at the left margin 
instead of at the chosen point in the text. That is, the green part should be 
text with background instead of result. This is text w.

Paragraph background looks like it works again.

% Testing textbackground
\setuppapersize[A5]A5]
\definetextbackground[testA][%
location=paragraph,state=start,background=color,backgroundcolor=yellow]
\definetextbackground[testB][%
location=text,state=start,background=color,backgroundcolor=green]
\starttext
First para for test.
\starttestA
\input tufte
\stoptestA
Last para for text.\blank
Intermediate.\par
This is to fill up things a bit going to the next line in the result.
This is \starttestB text with background \stoptestB within.\blank
Afterwards.\par
\stoptext



textbackground.pdf
Description: Adobe PDF document



Hans van der Meer



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

[NTG-context] textbackground broken?

2011-11-16 Thread Hans van der Meer
Is textbackground broken in mkiv? I need its usage (it seems the recommended 
way to do backgrounds).
The following minimal example fails.
Who is wrong? Is it me or is it ConTeXt?

ConTeXt  ver: 2011.11.04 14:15 MKIV  fmt: 2011.11.13  int: english/english

% Testing textbackground
\setuppapersize[A6]A6]
\definetextbackground[testbg][%
background=color,backgroundcolor=yellow,%
leftoffset=0pt,rightoffset=0pt,topoffset=0pt,bottomoffset=0pt,frame=on]
\starttext
\input tufte

\starttestbg
\input tufte
\stoptestbg

\input tufte
\stoptext

The error messages are:

metapost initializing instance 'metafun' using format 'metafun'
metapost loading 'metafun': 
/Users/hans/TeX/context/tex/texmf-context/metapost/context/base/metafun.mpiv
! terminal: ! Enormous number has been reduced.
* ...6.0pt ;  ;   ; prepare_multi_pars(2,2330878
  ,22629721,0,683329,265737,...

! Enormous number has been reduced.
* ...;   ; prepare_multi_pars(2,2330878,22629721
  ,0,683329,265737,2,5629963...

..
..


inserted text ...ainTextArea; ]===], false)}
  
\processMPgraphic ...e ;\!!es , \MPaskedfigure )}}
  \egroup \placeMPgraphic \d...
\useMPpositiongraphic ...tartMPcode #3\stopMPcode 
  \egroup 
\doMPpositiongraphic ...riables \getvalue {MPG:#1}
  }
\doMPpositiongraphic ...fined {MPG:#1}\donothing }
  \removelastspace }\smashbo...
\dohandleMPpositiongraphicrange ...raphic {#3}{#4}
  \fi \fi 
...
l.14 \stoptext

Hans van der Meer



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


[NTG-context] textbackground and protrusion

2010-06-22 Thread Paul Schalck
Hi! Currently (Context beta 2010-06-20 / Luatex 0.60.1), textbackground and 
protrusion don't work together. Here's a little test file:


---

\showframe

\definefontfeature[test][mode=node,script=latn,kern=yes,trep=yes,tlig=yes,protrusion=quality]
\definetextbackground[MyTextbackground][frame=off]

\enableprotruding

\starttext
\definedfont[lmroman12-regular*test]
An arbitrary and \startMyTextbackground incomplete \stopMyTextbackground\ 
sentence.


\stoptext

---

Is there a workaround for this? Thanks in advance. 


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


[NTG-context] textbackground and protrusion (update)

2010-06-22 Thread Paul Schalck
It seems that the typographical quotation marks got lost in my test file. It 
has thus become pretty much useless. Just enter some other character instead 
to make protrusion visible. 


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


[NTG-context] textbackground frame

2010-05-26 Thread Horacio Suarez

hello all

I was using this to have a framed text but now it's not working anymore, even 
in context live.

what i'm missing? thankyou in advance.

%
\starttext

\definetextbackground[marco][backgroundcolor=lightgray,background=color,frame=on,location=paragraph]

\starttextbackground[marco]

\input tufte

\stoptextbackground

\stoptext

%%%

Horacio Suarez
  
_
Hotmail: Free, trusted and rich email service.
https://signup.live.com/signup.aspx?id=60969___
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
___


Re: [NTG-context] textbackground frame

2010-05-26 Thread Aditya Mahajan

On Wed, 26 May 2010, Horacio Suarez wrote:



hello all

I was using this to have a framed text but now it's not working anymore, even 
in context live.

what i'm missing? thankyou in advance.

%
\starttext

\definetextbackground[marco][backgroundcolor=lightgray,background=color,frame=on,location=paragraph]

\starttextbackground[marco]

\input tufte

\stoptextbackground

\stoptext

%%%


Enable write18 or add \runMPgraphicsfalse.

Search the archive for the reason.

Aditya
___
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
___


Re: [NTG-context] textbackground frame

2010-05-26 Thread Horacio Suarez



Thankyou very much!


 Date: Wed, 26 May 2010 18:12:54 -0400
 From: adit...@umich.edu
 To: ntg-context@ntg.nl
 Subject: Re: [NTG-context] textbackground frame
 
 On Wed, 26 May 2010, Horacio Suarez wrote:
 
 
  hello all
 
  I was using this to have a framed text but now it's not working anymore, 
  even in context live.
 
  what i'm missing? thankyou in advance.
 
  %
  \starttext
 
  \definetextbackground[marco][backgroundcolor=lightgray,background=color,frame=on,location=paragraph]
 
  \starttextbackground[marco]
 
  \input tufte
 
  \stoptextbackground
 
  \stoptext
 
  %%%
 
 Enable write18 or add \runMPgraphicsfalse.
 
 Search the archive for the reason.
 
 Aditya
 ___
 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
 ___
  
_
Hotmail: Powerful Free email with security by Microsoft.
https://signup.live.com/signup.aspx?id=60969___
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
___


[NTG-context] Textbackground bug [repost]

2009-04-25 Thread Diego Depaoli
[I got no answers to my previous post]
With page imposition, in luatex, background overrides text

\setuppapersize[A4][A3,landscape]
\setuparranging[2SIDE] % --bug here
\setupcolors[state=start]
\definetextbackground[intro]
 [backgroundcolor=gray,
  backgroundoffset=.25cm,
  offset=.5cm,
  frame=off,
  location=paragraph,
  color=white]
\definetextbackground[subintro]
 [backgroundcolor=texcolorfour,
  backgroundoffset=0pt,
  offset=0pt,
  frame=off,
  location=text,
  color=blue]
\starttext
\starttextbackground[intro]
A rather common way to draw attention to a passage, is to add
a background. In this chapter we will therefore discuss how
to enhance your document with \starttextbackground [subintro]
colorful areas that either or not follow the shape of your
paragraph. \stoptextbackground\ Be warned: this chapter has
so many backgrounds that you should consider wearing sunglasses.
\stoptextbackground
\dorecurse{5}{\input tufte}
\stoptext

Regards
-- 
Diego Depaoli
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Textbackground bug [repost]

2009-04-25 Thread Wolfgang Schuster


Am 25.04.2009 um 18:15 schrieb Diego Depaoli:


[I got no answers to my previous post]
With page imposition, in luatex, background overrides text


context --arrange filename

Wolfgang





___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Textbackground bug [repost]

2009-04-25 Thread Diego Depaoli
2009/4/25 Wolfgang Schuster schuster.wolfg...@googlemail.com:

 Am 25.04.2009 um 18:15 schrieb Diego Depaoli:

 [I got no answers to my previous post]
 With page imposition, in luatex, background overrides text

 context --arrange filename

Thanks!
but I'm a bit confused...
in pdftex or xetex the arrange switch is always needed, in luatex page
imposition works well without it


Cheers
-- 
Diego Depaoli
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Textbackground with leftframe

2008-09-23 Thread holzminister
Hi!

1) I wanted to color some text inside a columnset-environment. That
works fine for text that stays in one column or spans two consecutive
ones. But if there's a pagebreak after the first page, only the left
column gets the background. From page two on everything is fine again.
Any ideas how this comes?


\setupcolors[state=start]
\definetextbackground[test][
backgroundcolor=yellow,
frame=off,
leftoffset=5mm,
location=paragraph,
color=black]

\definecolumnset[example][n=2,distance=5mm]

\starttext
\startcolumnset[example]

\starttextbackground[test]
\dorecurse{12}{\input knuth \par}
\stoptextbackground

\stopcolumnset
\stoptext


2) And another question: Is there a way to get a leftframe activated
in my defined background?

Have a nice evening,
Eyke
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] textbackground inside framed

2006-10-03 Thread Peter Rolf
Hi,

I need a textbackground inside a \framed macro, which uses it's own
background (overlay). Sadly the textbackground appears behind the framed
background and my attempts to change this order haven't succeeded.

\setuptextbackground[foo]
  [level=+1]

brings the textbackground to the top, but overwrites the text. Also I
haven't found a way to change the background level for \framed (e.g. set
it to -2), which would easily solve the problem.

Is there a way to make it appear above the framed background, but still
below the text?

Greetings, Peter

\setupoutput[pdftex]

\setupcolors[state=start]

\definetextbackground[foo]
  [backgroundcolor=lightgray,
   frame=off,
   level=-1, % -3,-2,-1,+1,+2
  ]

\startuniqueMPgraphic{bar}
fill OverlayBox withcolor red ;
\stopuniqueMPgraphic

\defineoverlay[bar][\uniqueMPgraphic{bar}]


\starttext

An example of a \starttextbackground[foo]textbackground\stoptextbackground.

\framed
{An example of a \starttextbackground[foo]textbackground\stoptextbackground.}

\framed[background=color,backgroundcolor=yellow] % level=-2
{An example of a \starttextbackground[foo]textbackground\stoptextbackground.}

\framed[background=bar] % level=-2
{An example of a \starttextbackground[foo]textbackground\stoptextbackground.}

\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground trouble

2006-06-29 Thread Hans Hagen
Aditya Mahajan wrote:
 Hi Hans and Taco,

 Something goes wrong when a textbackground occurs right at the page 
 boundary. Please have a look at the attached file (a snippet from an 
 updated copy of Myway on using new math features).
so, what goes wrong here? 


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground trouble

2006-06-29 Thread Aditya Mahajan
On Thu, 29 Jun 2006, Hans Hagen wrote:

 Aditya Mahajan wrote:
 Hi Hans and Taco,

 Something goes wrong when a textbackground occurs right at the page
 boundary. Please have a look at the attached file (a snippet from an
 updated copy of Myway on using new math features).
 so, what goes wrong here?

I get

Runaway argument?
{boxgridtype := 0 ;
! Paragraph ended before \flushTeXtexts was complete.
to be read again
\par
argument boxgridtype := 0 ;\par
   boxlinetype := 0 ;\par boxfilltype 
:= 1 ;\...

\writecheckedMPgraphic ...aphic \flushTeXtexts {#1
   }\writeMPgraphic 
{#1}
\startMPgraphic ...hic \writecheckedMPgraphic {#1}

\stopwritingMPgraphic
\getMPdrawing ...ic \MPdrawingdata \stopMPgraphic

\loadcurrentMPgraphic {}\d...

\dopositionaction ...fMPdrawingdone \getMPdrawing
   \fi \resetMPdrawing 
\popMP...
...
l.96 \ShowExample

?

The backgrounds on the first page do not have any color. The string
boxlinetype := 0 ;boxfilltype := 1 ;boxgridcolor := 
(scaledrgb(0,0,1,1)) ;boxlinecolor := (scaledrgb(0,0,1,1))

ends up at the bottom of page 1.


I do not know what is going wrong.

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground trouble

2006-06-29 Thread Hans Hagen
Aditya Mahajan wrote:
 I get

 Runaway argument?
 {boxgridtype := 0 ;
 ! Paragraph ended before \flushTeXtexts was complete.
 to be read again
 \par
 argument boxgridtype := 0 ;\par
   
hm, did you use the latest version? 

(looks like a endofline problem, i.e. some empty line not converted to an 
endline char) 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground trouble

2006-06-29 Thread Aditya Mahajan
On Thu, 29 Jun 2006, Hans Hagen wrote:

 Aditya Mahajan wrote:
 I get

 Runaway argument?
 {boxgridtype := 0 ;
 ! Paragraph ended before \flushTeXtexts was complete.
 to be read again
 \par
 argument boxgridtype := 0 ;\par

 hm, did you use the latest version?

 (looks like a endofline problem, i.e. some empty line not converted to an 
 endline char)

Just downloaded the latest beta and the problem is not present. Sorry 
for the noise.

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] textbackground trouble

2006-06-28 Thread Aditya Mahajan

Hi Hans and Taco,

Something goes wrong when a textbackground occurs right at the page 
boundary. Please have a look at the attached file (a snippet from an 
updated copy of Myway on using new math features).


Aditya\usemodule[mag-01]
% \input mathfix %Bugfix by Taco

\setuptyping[style=\ttx\setupinterlinespace]
\setupheadertexts[section]

\setupbodyfontenvironment   [default][em=italic]

\definetextbackground
  [example]
  [width=\textwidth,
   background=color,
   backgroundcolor=lightgray,
   frame=off,
   leftoffset=1em,
   rightoffset=1em,
   location=paragraph,
   after={\blank[small]},
   before={\blank[small]}]

\def\ShowExample
  {\startexample
% \nobreak
\typebuffer
   \stopexample
   \getbuffer}

\setvariables
  [magazine]
  [title={Using \textbackslash startalign and friends},
   author=Aditya Mahajan,
   date=\currentdate,
  ]


\starttext \setups[titlepage] \setups[title]
\startbuffer
\startformula \startalign[m=2]
  \NC a_1 x + b_1 y \NC = c_1 \NC d_1 u + e_1 v \NC = f_1 \NR
  \NC a_2 x + b_2 y \NC = c_2 \NC d_2 u + e_2 v \NC = f_2 \NR
\stopalign \stopformula
\stopbuffer
\ShowExample

The distance between the pairs can be increased by the option
\typedistance of \tex{startalign}.
\startbuffer
\startformula \startalign[m=2,distance=5em]
  \NC a_1 x + b_1 y \NC = c_1 \NC d_1 u + e_1 v \NC = f_1 \NR
  \NC a_2 x + b_2 y \NC = c_2 \NC d_2 u + e_2 v \NC = f_2 \NR
\stopalign \stopformula
\stopbuffer
\ShowExample

A combination of \type[m=...,n=...] can be used.
\startbuffer
\startformula \startalign[m=2,distance=8em,n=5,
  align={right,middle,middle,middle,left}]
  \NC 0 \NC  \NC 2x + 5y \NC  \NC 10
  \NC 4 \NC  \NC 3x +  y \NC  \NC 9  \NR
  \NC 3 \NC  \NC 2y + 3z \NC  \NC 15
  \NC 10\NC  \NC 8y + 5z \NC  \NC 20 \NR
\stopalign \stopformula
\stopbuffer
\ShowExample

Sometimes, one simply wants to display two separate set of equations side by
side. For such applications the above pairs mode can be cumbersome to work
with.  There is another alternative in \tex{startformulas}

\startbuffer
\startformulas
  \startformula \startalign
\NC a_1 x + b_1 y \NC = c_1 \NR
\NC a_2 x + b_2 y \NC = c_2 \NR
  \stopalign \stopformula
  \startformula \startalign
\NC d_1 u + e_1 v \NC = f_1 \NR
\NC d_2 u + e_2 v \NC = f_2 \NR
  \stopalign \stopformula
\stopformulas
\stopbuffer
\ShowExample

More than two groups can also be placed.
\startbuffer
\startformulas
\dorecurse{5}{\startformula
\startalign[n=3,align={middle,middle,middle}]
\NC a  \NC = \NC b  \NR
\NC 2a \NC = \NC 2b \NR
\stopalign
\stopformula}
\stopformulas
\stopbuffer
\ShowExample


\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Textbackground overlapping

2006-05-24 Thread nico
On Wed, 24 May 2006 01:50:41 +0200, nico [EMAIL PROTECTED]  
wrote:

 On Tue, 23 May 2006 17:15:28 +0200, Hans Hagen [EMAIL PROTECTED] wrote:


 not yet interfaced but public anyway

 \chardef\kindofpagetextareas\plusone

 But I've seen a side effect of this setting. It appears rarely, and I had
 difficulties to reproduce it. So, please find attached the cut-and-pasted
 buggy page to have exactly the same placements.

Here is a simple test case able to reproduce the problem (same behaviour  
with context live). Seems related to some vertical stretching stuff in a  
page.

\chardef\kindofpagetextareas\plusone
\setupcolors[state=start]
\setupwhitespace[medium]

% needed to activate the buggy stuff...
\definetextbackground[listing][background=color]

\starttext

\input tufte\footnote{A footnote}

blah

blah

blah

blah

blah

\section{Section}
\input tufte

blah

blah

\startitemize
\item a
\item a
\item a
\item a
\item a
\item a
\stopitemize

\stoptext

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Textbackground overlapping

2006-05-23 Thread nico
Hello,

When the backgrounded stuff starts from one page up to the following, it  
doesn't take care about the bottom footnotes, so that they are covered by  
the background.

Here is a small example:

\definecolor[ScreenGray][s=.95]
\definetextbackground[grayback]
 [background=color,
  backgroundcolor=ScreenGray,
  frame=on,
  strut=yes,
  width=broad,
  location=paragraph,
  framecolor=ScreenGray,
  leftoffset=\topskipgap,
  before=\blank,
  after=\blank,
  align=right]

\starttext

A footnote\footnote{Covered by the background, right?}.
\input tufte
\input tufte
\input tufte
\input tufte

\starttextbackground[grayback]
\input tufte
\stoptextbackground

\stoptext

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Textbackground overlapping (2)

2006-05-23 Thread nico
Hello,

Sorry, just another overlapping case I should have put in the preceding  
mail: when a float cuts the backgrounded stuff, the float is backgrounded  
too. Maybe harder to fix.

An example showing both cases (footnote + float):

\definecolor[ScreenGray][s=.95]
\definetextbackground[grayback]
 [background=color,
  backgroundcolor=ScreenGray,
  frame=on,
  strut=yes,
  width=broad,
  location=paragraph,
  framecolor=ScreenGray,
  leftoffset=\topskipgap,
  before=\blank,
  after=\blank,
  align=right]

\starttext

A footnote\footnote{Covered by the background, right?}.
\input tufte
\input tufte
\input tufte
\input tufte

\starttextbackground[grayback]
\input tufte
\stoptextbackground
\placefigure[top]{joke}{\framed[width=5cm]{Hi}}

\stoptext

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Textbackground overlapping

2006-05-23 Thread Hans Hagen
nico wrote:
 Hello,

 When the backgrounded stuff starts from one page up to the following, it  
 doesn't take care about the bottom footnotes, so that they are covered by  
 the background.

 Here is a small example:

 \definecolor[ScreenGray][s=.95]
 \definetextbackground[grayback]
  [background=color,
   backgroundcolor=ScreenGray,
   frame=on,
   strut=yes,
   width=broad,
   location=paragraph,
   framecolor=ScreenGray,
   leftoffset=\topskipgap,
   before=\blank,
   after=\blank,
   align=right]

 \starttext

 A footnote\footnote{Covered by the background, right?}.
 \input tufte
 \input tufte
 \input tufte
 \input tufte

 \starttextbackground[grayback]
 \input tufte
 \stoptextbackground

 \stoptext
   
not yet interfaced but public anyway

\chardef\kindofpagetextareas\plusone

-- 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Textbackground overlapping

2006-05-23 Thread nico

On Tue, 23 May 2006 17:15:28 +0200, Hans Hagen [EMAIL PROTECTED] wrote:




not yet interfaced but public anyway

\chardef\kindofpagetextareas\plusone


Ah, yes, there's no more overlapping for both test cases.

But I've seen a side effect of this setting. It appears rarely, and I had  
difficulties to reproduce it. So, please find attached the cut-and-pasted  
buggy page to have exactly the same placements.


The problem is that with this setting the blank spaces around titles or  
paragraphs is a bit greater than it was. It's not an issue by itself, but  
then the text sometimes overlap the bottom footnote. Note that there's no  
textbackground involved in attached the case. It is defined only to  
activate the behaviour via the \enabletextarearegistration call.


Regards,
BG


textback3.tex.gz
Description: GNU Zip compressed data
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground and midaligned

2006-05-19 Thread Hans Hagen
Aditya Mahajan wrote:
 I encountered a very strange problem. The very presence of 
 \definetextbackground changed the meaning of \midaligned (and 
 \rightaligned). Attached are the minimal example that illustrate the 
 problem. The first file, nobackground.tex has no background and works 
 as expected. The second file background.tex has a textbackground and 
 \midaligned is no longer middle aligned.

 Any insight into this strange behaviour?
\def\doalignline#1#2% \\ == newline
 {\begingroup
  \setlocalhsize % new
  \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
  \dowithnextbox
{\noindentation  % change this line in core-spa.tex 
 \hbox to \localhsize
   {\ifcase\alignstrutmode\or\strut\fi
 #1\unhbox\nextbox#2}\endgroup}
\hbox}

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground and midaligned

2006-05-19 Thread Aditya Mahajan
On Fri, 19 May 2006, Hans Hagen wrote:

 Aditya Mahajan wrote:
 I encountered a very strange problem. The very presence of
 \definetextbackground changed the meaning of \midaligned (and
 \rightaligned). Attached are the minimal example that illustrate the
 problem. The first file, nobackground.tex has no background and works
 as expected. The second file background.tex has a textbackground and
 \midaligned is no longer middle aligned.

 Any insight into this strange behaviour?
 \def\doalignline#1#2% \\ == newline
 {\begingroup
  \setlocalhsize % new
  \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
  \dowithnextbox
{\noindentation  % change this line in core-spa.tex
 \hbox to \localhsize
   {\ifcase\alignstrutmode\or\strut\fi
 #1\unhbox\nextbox#2}\endgroup}
\hbox}

Thank you!
  This takes care of the problem.

Aditya
-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] textbackground and margin

2006-05-19 Thread Aditya Mahajan
Hi Hans,

  textbackground does not honour topoffset/bottomoffset at pagebreak. 
Is this by design?

\definetextbackground
   [test]
   [  location=paragraph,
 rulethickness=1pt,
leftoffset=1em,
 topoffset=5cm,
  bottomoffset=5cm] % For test purposes
\starttext

\starttextbackground[test]
\dorecurse{15}{\input knuth \endgraf}
\stoptextbackground

\stoptext

Is there some parameter to adjust the offset before and after a 
pagebreak. (I want them to be same as bottomoffset and topoffset.)
Or should I take care of this in mpos:par:columnset with something 
like (pseudo code)

if nofmultipars  1
  draw multipars[1] enlarge bottom by bottomoffset;
  for i = 2 upto nofmultipars:
   draw multipars[i]
 enlarge top by topoffset enlarge bottom by bottomoffset;
  endfor;
endif;


Or is there some easier way to just I influence boxfilloffset for 
do_draw_par in core-mp.tex?


Thanks,
Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground and margin

2006-05-19 Thread Hans Hagen
Aditya Mahajan wrote:
 Hi Hans,

   textbackground does not honour topoffset/bottomoffset at pagebreak. 
 Is this by design?
   
ss everywhere in tex, skipe at the bottom and top of a page disappear at a 
pagebreak, and inserting it is tricky 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground and margin

2006-05-19 Thread Aditya Mahajan
On Fri, 19 May 2006, Hans Hagen wrote:

 Aditya Mahajan wrote:
 Hi Hans,

   textbackground does not honour topoffset/bottomoffset at pagebreak.
 Is this by design?

 ss everywhere in tex, skipe at the bottom and top of a page disappear at a 
 pagebreak, and inserting it is tricky

Any appararent drawback of using the following approach...

\definetextbackground
   [test]
   [ location=paragraph,
 leftoffset=1em,
 before={\blank[1cm]},
 after={\blank[1cm]}]

\startuseMPgraphic{mpos:par:columnset}
   path p;
   for i = 1 upto nofmultipars  :
 p := multipars[1]  topenlarged 1cm bottomenlarged 1cm;
 fill p withcolor 0.9white ;
 draw p withcolor \MPvar{linecolor}
 withpen pencircle scaled \MPvar{linewidth};
   endfor;
\stopuseMPgraphic

\starttext

\input knuth \endgraf
\hairline \par
\starttextbackground[test]
\dorecurse{13}{\input knuth \endgraf}
\stoptextbackground
\hairline \par
\input knuth \endgraf

\stoptext

Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground exceeds its scope

2006-04-25 Thread Aditya Mahajan
On Tue, 25 Apr 2006, Taco Hoekwater wrote:

 Hi Aditya
 ,
 Aditya Mahajan wrote:
 i adapted the textbackground macros as well as the mp code to catch
 the border case

 Is this included in the latest release

 Yes, but

  (ConTeXt  ver: 2006.04.22 10:41)?

 is no longer the latest release. :-)

hmm... need to wait till texsync starts syncing with the new release.

Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground exceeds its scope

2006-04-24 Thread Aditya Mahajan
On Sun, 23 Apr 2006, Hans Hagen wrote:

 Aditya Mahajan wrote:
 Thank you. This takes care of it.

 i adapted the textbackground macros as well as the mp code to catch 
 the border case

Is this included in the latest release (ConTeXt  ver: 2006.04.22 
10:41)? The previous test case does not run correctly. See results at

http://www.eecs.umich.edu/~adityam/context/pagebreak.tar.gz


 (this whole background stuff is rather tricky code)

A manual \nobreak in the definition makes sure that everything works, 
so this is not really important.

Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground exceeds its scope

2006-04-24 Thread Taco Hoekwater
Hi Aditya
,
Aditya Mahajan wrote:
i adapted the textbackground macros as well as the mp code to catch 
the border case
 
 Is this included in the latest release

Yes, but

  (ConTeXt  ver: 2006.04.22 10:41)? 

is no longer the latest release. :-)

Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] textbackground exceeds its scope

2006-04-23 Thread Aditya Mahajan

Hi,

 I have encountered a really strange bug in textbackground. 
Occasionally, textbackground colors the whole page instead of just the 
text between \starttextbackground and \stoptextbackground. This 
happens only when I am using module mag-01 and have

\setuptyping[style=\ttx\setupinterlinespace] set.
Attached is the minimal example that I could make.

Tested with beta
ConTeXt  ver: 2006.04.18 22:36  fmt: 2006.4.23  int: english  mes: english

For this test, ConTeXt  ver: 2006.04.10 20:04  fmt: 2006.4.23  does 
not give any problem, but similar problem occurs at some other place. 
If it is important, I can try to make a minimal file to reproduce the 
problem with latest stable release.


Thanks,
Aditya

--
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008

test.tex
Description: Binary data
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground exceeds its scope

2006-04-23 Thread Hans Hagen
Aditya Mahajan wrote:
 Hi,

  I have encountered a really strange bug in textbackground. 
 Occasionally, textbackground colors the whole page instead of just the 
 text between \starttextbackground and \stoptextbackground. This 
 happens only when I am using module mag-01 and have
 \setuptyping[style=\ttx\setupinterlinespace] set.
 Attached is the minimal example that I could make.

 Tested with beta
 ConTeXt  ver: 2006.04.18 22:36  fmt: 2006.4.23  int: english  mes: 
 english

 For this test, ConTeXt  ver: 2006.04.10 20:04  fmt: 2006.4.23  does 
 not give any problem, but similar problem occurs at some other place. 
 If it is important, I can try to make a minimal file to reproduce the 
 problem with latest stable release.
there is a dangling line of the background due to a break

\def\ShowExample
  {\startexample
 \nobreak
 \typebuffer
   \stopexample
   \getbuffer}


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground exceeds its scope

2006-04-23 Thread Hans Hagen
Aditya Mahajan wrote:
 Thank you. This takes care of it.
   
i adapted the textbackground macros as well as the mp code to catch the border 
case (this whole background stuff is rather tricky code) 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground bug

2005-12-18 Thread Taco Hoekwater

Hans van der Meer wrote:
Therefore I suspect it has something to do with the output routine  
where \s is taken as the next macro.
A simpe experiment (\def\s{something}) shows that indeed a macro \s  is 
executed.

Is someone here messing up the catcode's of the letters?


Yes, the \startJAVA command :-)

The problem is that context is loading the pdfr-ec resource
file (Glyph - Unicode mapping) while the prettytype catcodes
are in effect, and it does not properly switch back to
non-verbatim catcodes.

I am not quite sure what the best way is to fix this, but
I've redefined that loading macro in my preamble, like so,
and it seems to work as a temporary workaround:

\def\dododoincludepdffontresource#1% encoding
  {\bgroup
   \def\currentencoding{#1}%
   \doifvaluesomething\pdffontfileresource
 {\uncatcodeallcharacters % new
  \catcode`\[=12  % new*
  \catcode`\]=12  % new*
  \setnaturalcatcodes % new
  \startreadingfile
\readsysfile{pdfr-\getvalue\pdffontfileresource}
   \donothing\donothing
  \stopreadingfile
  \letgvalue\pdffontfileresource\empty}%
   \egroup}




___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground bug

2005-12-18 Thread Hans Hagen

Hans van der Meer wrote:



Forcing the typesetting to run further the output contains the rest  
of the source of macro \startpdffontresource[ec] .

I.e. the output then shows (the \s has disappeared):

tartpdffontresource[ec]
/CIDInit /ProcSet findresource begin
...
- and goes on until (the last part of the macro end end  
\stoppdffontresource not appearing)

... CMapName currentdict /CMap defineresource pop

Hereafter typesetting is resumed.

Introducing something that puts another line of text at the top  of 
the page results in normal typesetting.


Further experiment
replacing \startJava by \starttextbackground[somecolor] leads to  
the same error.


i ran into that as well, a solution is (cont-new.tex):

\let\normalstartreadingfile\startreadingfile
\let\normalstopreadingfile \stopreadingfile

\def\startreadingfile
 {\normalstartreadingfile
  \pushendofline
  \restoreendofline}

\def\stopreadingfile
 {\popendofline
   \normalstopreadingfile}

but i did patch something more fundamental (i forgot what/where, i leave 
that for taco to uncover when i update)


Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] textbackground bug

2005-12-17 Thread Hans van der Meer

Something strange happens with textbackground (again, I am afraid).

I defined:

% Java typesetting with background.
\definetyping[JAVA]
\setuptyping[JAVA][option=JV,
before={\bgroup\setupinterlinespace[line=2.2ex]%
\testpage[1]\starttextbackground[code]},
after={\stoptextbackground\egroup}]


Then I typeset some text:

\startJAVA
public void setUserManager( UserManager um ) {
..
\stopJava

If this falls precisely at the start of a new page I get the  
following error:


! Undefined control sequence.
l.17 \s
   tartpdffontresource[ec]

Forcing the typesetting to run further the output contains the rest  
of the source of macro \startpdffontresource[ec] .

I.e. the output then shows (the \s has disappeared):

tartpdffontresource[ec]
/CIDInit /ProcSet findresource begin
...
- and goes on until (the last part of the macro end end  
\stoppdffontresource not appearing)

... CMapName currentdict /CMap defineresource pop

Hereafter typesetting is resumed.

Introducing something that puts another line of text at the top  
of the page results in normal typesetting.


Further experiment
replacing \startJava by \starttextbackground[somecolor] leads to  
the same error.



Therefore I suspect it has something to do with the output routine  
where \s is taken as the next macro.
A simpe experiment (\def\s{something}) shows that indeed a macro \s  
is executed.

Is someone here messing up the catcode's of the letters?
It is of cource very annoying if one constantly has to shift  
textmaterial up and down to move it away from page breaks!


yours sincerely,
dr. H. van der Meer



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground

2005-03-17 Thread Duncan Hothersall
Resurrecting a thread from June last year... (sorry!)
On 26-jun-04 Hans van der Meer identified a bug/issue with text backgrounds:
 When the textbackground falls at a page crossing -- i.e. starts at
 the top of a page -- the coloring extends backwards on the page just
 left.
On 29-jun-04 Hans H tantalisingly said:
i think i found a way out and will send you a test file

Hans
As far as I can tell, I'm currently experiencing the same thing. I'm 
wondering what was in the test file ;-)

Thanks!
Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground

2004-06-29 Thread Hans Hagen
dr. Hans van der Meer wrote:
On 26-jun-04, at 20:13, Hans Hagen Outside wrote:
dr. Hans van der Meer wrote:
Hans,
I definitely see problems  with the 
\starttextbackground[]-\stoptextbackground environment (discussed in 
the displays-brochure).

When the textbackground falls at a page crossing -- i.e. starts at 
the top of a page -- the coloring extends backwards on the page just 
left.
It can be remedied by putting a \null just in front of 
\starttextbackground. The extra vertical space this introduces just 
manages to constrain the background to its own page. However, this 
is not a general solution, on other places the extra vertical space 
is certainly not wanted.

I cannot find the exact nature of the problem. I suspect it has to 
do with the \output-routines, but these are not my speciality, to 
say the least. So, not much help there,

Also, the \starttextbackground does not respect footnotes, these are 
colored. In contrast, the old \startbackground-\stopbackground does 
respect footnotes. The coloring stops at the footnote and restarts 
at the next page. I should like that for \starttextbackground as well.

can you make me a minimal example of where things go wrong (keep in 
mind that there are two methods, tex and paragraph)
with respect to footnotes, maybe i can make that an option (there are 
more exceptions)
Hans

Here is the smallest one I could construct that shows the page 
crossing effect. I used the location=paragraph. With location=text 
I did not experiment.
Here follows the code:

% testing textbackgroundcolor
\setupbodyfont[12pt]% using the default cmr font
\setuppapersize[S6][S6]
\setuplayout[width=middle,location=middle,header=0pt,footer=4ex]
\setuppagenumbering[location={footer,inright},alternative=singlesided]
%
\setupcolors [state=start]
\definecolor [lavender][r=.901961,g=.901961,b=.980392]
\definecolor [lavenderblush][r=1,g=.941176,b=.960784]
% general page coloring
\setupbackgrounds[page][background=color,backgroundcolor=lavenderblush]
%
% special background coloring for parts of the text
\definetextbackground[A][frame=off,location=paragraph,
backgroundcolor=lavender,backgroundoffset=0pt]
\starttext
%
\dorecurse{10}{Some text that must fill a portion of the page. }\par
\dorecurse{10}{Some text that must fill a portion of the page. }\par
\dorecurse{10}{Some text that must fill a portion of the page. }\par
%
% WITH 8 AND 9 IN THE NEXT RECURSION THE FIRST PARAGRAPH ON PAGE 2 HAS
% THE BACKGROUND COLORED BUT THE WHITESPACE BELOW THE LAST PARAGRAPH ON
% PAGE 1 IS COLORED TOO.
% CHANGE THE 8/9 TO 10 AND THE COLORING ON PAGE 1 DISPAPPEARS.
% I HAVE BECOME ACROSS SITUATIONS WERE THE COLORING EXTENDED STILL
% FURTHER BACK OVER MORE PRECEDING PARAGRAPHS, BUT IT IS DIFFICULT TO
% CONSTRUCT A MINIMAL EXAMPLE FOR THAT.
\dorecurse{9}{Some text that must fill a portion of the page. }\par
%
% THIS SHOULD COLOR THE FIRST PARAGRAPH ON PAGE 2
\starttextbackground[A]
\dorecurse{5}{Text with the background. }
\stoptextbackground
\dorecurse{10}{Some text that must fill a portion of the page. }\par
%
\stoptext
I hope you can find what causes it, because I like the effects.
i think i found a way out and will send you a test file
Hans  

-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground

2004-06-29 Thread Hans Hagen
dr. Hans van der Meer wrote:
Keeping footnotes free from the coloring would be very great if it 
could be accomplished (same as for interposed floats), like:
ok then, for your eyes only -)
 \chardef\kindofpagetextareas=1
(so, it was there already but as a kind of experiment)
Hans
-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] textbackground

2004-06-26 Thread Hans Hagen Outside
dr. Hans van der Meer wrote:
Hans,
I definitely see problems  with the 
\starttextbackground[]-\stoptextbackground environment (discussed in 
the displays-brochure).

When the textbackground falls at a page crossing -- i.e. starts at the 
top of a page -- the coloring extends backwards on the page just left.
It can be remedied by putting a \null just in front of 
\starttextbackground. The extra vertical space this introduces just 
manages to constrain the background to its own page. However, this is 
not a general solution, on other places the extra vertical space is 
certainly not wanted.

I cannot find the exact nature of the problem. I suspect it has to do 
with the \output-routines, but these are not my speciality, to say the 
least. So, not much help there,

Also, the \starttextbackground does not respect footnotes, these are 
colored. In contrast, the old \startbackground-\stopbackground does 
respect footnotes. The coloring stops at the footnote and restarts at 
the next page. I should like that for \starttextbackground as well.
can you make me a minimal example of where things go wrong (keep in mind that there are two methods, tex and paragraph) 

with respect to footnotes, maybe i can make that an option (there are more exceptions) 

Hans 

-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context