Re: [NTG-context] textbackground not working
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 ___
Re: [NTG-context] Textbackground inside Layer?
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 ___
Re: [NTG-context] Textbackground offset with multi-col paragraphs
> On 2. Nov 2017, at 15:17, Thomas Floerenwrote: > > 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
> On 2. Nov 2017, at 18:55, Pablo Rodriguezwrote: > > 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
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 ___
Re: [NTG-context] Textbackground issue with margin pictures
On 4/3/2017 2:58 PM, Tom wrote: On 3. Apr 2017, at 10:16, Hans Hagenwrote: 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
> On 3. Apr 2017, at 10:16, Hans Hagenwrote: > > 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
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 ___
Re: [NTG-context] textbackground
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 ___
Re: [NTG-context] textbackground inside itemize
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 ___
Re: [NTG-context] TextBackground text area
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
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
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
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 ___
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 ___
Re: [NTG-context] textbackground frame
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 ___
Re: [NTG-context] Textbackground bug [repost]
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/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 ___
Re: [NTG-context] textbackground trouble
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
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
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
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
Re: [NTG-context] Textbackground overlapping
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
Re: [NTG-context] Textbackground overlapping
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
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
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
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
Re: [NTG-context] textbackground and margin
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
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
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
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
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
Re: [NTG-context] textbackground exceeds its scope
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
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
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
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
Re: [NTG-context] textbackground
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
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
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
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