Re: [NTG-context] Textbackgrounds interrupted by floats
On 7 April 2015 21:53:40 AEST, Wolfgang Schuster wrote: >> Am 07.04.2015 um 13:31 schrieb robin.kirk...@csiro.au: >> Here is problem that must have been asked about before, but I can’t seem to >> find a solution on the archive or anywhere else. I want a colour background >> for verbatim text (for code), and floating figures. However if a figure >> floats to the bottom (as in the example below), and the verbatim text is >> broken over to the next page because it is long, I don’t want the colour >> background under the figure as well — I want no background at all. >> What is the correct setup to do that? > > Add the following line to your document: > > \setconstant\kindofpagetextareas\plusone > > Wolfgang Thanks Wolfgang, obscure but works perfectly — Robin ___ 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] Textbackgrounds interrupted by floats
> Am 07.04.2015 um 13:31 schrieb robin.kirk...@csiro.au: > > Folks, > > Here is problem that must have been asked about before, but I can’t seem to > find a solution on the archive or anywhere else. I want a colour background > for verbatim text (for code), and floating figures. However if a figure > floats to the bottom (as in the example below), and the verbatim text is > broken over to the next page because it is long, I don’t want the colour > background under the figure as well — I want no background at all. > > What is the correct setup to do that? Add the following line to your document: \setconstant\kindofpagetextareas\plusone 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Textbackgrounds interrupted by floats
Folks, Here is problem that must have been asked about before, but I can’t seem to find a solution on the archive or anywhere else. I want a colour background for verbatim text (for code), and floating figures. However if a figure floats to the bottom (as in the example below), and the verbatim text is broken over to the next page because it is long, I don’t want the colour background under the figure as well — I want no background at all. What is the correct setup to do that? Thanks, Robin \setupexternalfigures[location=default] \setupcolors[state=start] \definetextbackground[code][ frame=off, location=paragraph, background=color, backgroundcolor=yellow] \setuptyping[typing][ %option=color, before={\starttextbackground[code]}, after=\stoptextbackground] \starttext \startplacefigure[location=bottom] \externalfigure[cow][width=0.5\textwidth] \stopplacefigure \input tufte \starttyping Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long \stoptyping \input tufte \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] Textbackgrounds
On 15-11-2011 15:40, Alan Braslau wrote: On Mon, Nov 07, 2011 at 04:58:10PM +0100, Hans Hagen wrote: On 7-11-2011 14:59, Alan Braslau wrote: Something is now broken with textbackgrounds : fixed in next beta (low level we're now scaled points so a conversion is missing) textbackground has been rewritten. Perhaps I have missed something, but how can I highlight/grey-out running paragraphs? The following minimal example worked before... fixed in next beta - 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] Textbackgrounds
On Mon, Nov 07, 2011 at 04:58:10PM +0100, Hans Hagen wrote: > On 7-11-2011 14:59, Alan Braslau wrote: > > > Something is now broken with textbackgrounds : > > fixed in next beta (low level we're now scaled points so a conversion is > missing) > textbackground has been rewritten. Perhaps I have missed something, but how can I highlight/grey-out running paragraphs? The following minimal example worked before... Alan \definetextbackground [ongray] [location=paragraph,background=color,backgroundcolor=middlegray] \starttext \input ward \startongray \input tufte \stopongray \input knuth \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] Textbackgrounds
On 7-11-2011 14:59, Alan Braslau wrote: Something is now broken with textbackgrounds : fixed in next beta (low level we're now scaled points so a conversion is missing) - 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] Textbackgrounds
On Thu, Jul 22, 2010 at 08:34:19PM +0200, Andreas Harder wrote: > > Am 22.07.2010 um 16:37 schrieb Hans Hagen: > > > On 22-7-2010 3:50, Andreas Harder wrote: > >> \definetextbackground > >> [test] > >> [location=paragraph, > >>% frame=off, % -> no round corners anymore > >>corner=round, % -> corner=1|2|3… would be nice > >>leftoffset=.5\bodyfontsize, > >>rightoffset=.5\bodyfontsize, > >>topoffset=.5\bodyfontsize, > >>bottomoffset=.5\bodyfontsize] > >> > >> \setuphead > >> [subject] > >> [after=, > >>command=\MyHead] > >> > >> \def\MyHead#1#2% > >> {\framed > >> [background=color, > >> backgroundcolor=gray, > >> frame=off, > >> offset=.5\bodyfontsize, > >> corner=3]{#1#2}} > >> > >> \starttext > >> \subject{Test} > >> \starttest > >> \input tufte > >> \stoptest > >> \stoptext > >> > > \setuphead > > [subject] > > [after=\nointerlineskip, > > command=\MyHead] > > Thank you Hans, that killed the space. > > Greeting, > Andreas Something is now broken with textbackgrounds : metapost> loading 'metafun': /usr/local/context/beta/tex/texmf-context/metapost/context/base/metafun.mpiv ! terminal: ! Enormous number has been reduced. <*> ...6.0pt ; ; ; prepare_multi_pars(1,4661756 ,37662495,0,683329,265737,... ... 1 >> \definetextbackground 2 [test] 3 [location=paragraph, 4frame=off, 5leftoffset=.5\bodyfontsize, 6rightoffset=.5\bodyfontsize, 7topoffset=.5\bodyfontsize, 8bottomoffset=.5\bodyfontsize] 9 10 \starttext 11 ...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.17 \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] Textbackgrounds
Am 22.07.2010 um 16:37 schrieb Hans Hagen: > On 22-7-2010 3:50, Andreas Harder wrote: >> \definetextbackground >> [test] >> [location=paragraph, >>% frame=off, % -> no round corners anymore >>corner=round, % -> corner=1|2|3… would be nice >>leftoffset=.5\bodyfontsize, >>rightoffset=.5\bodyfontsize, >>topoffset=.5\bodyfontsize, >>bottomoffset=.5\bodyfontsize] >> >> \setuphead >> [subject] >> [after=, >>command=\MyHead] >> >> \def\MyHead#1#2% >> {\framed >> [background=color, >> backgroundcolor=gray, >> frame=off, >> offset=.5\bodyfontsize, >> corner=3]{#1#2}} >> >> \starttext >> \subject{Test} >> \starttest >> \input tufte >> \stoptest >> \stoptext >> > \setuphead > [subject] > [after=\nointerlineskip, > command=\MyHead] Thank you Hans, that killed the space. Greeting, Andreas ___ 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] Textbackgrounds
On 22-7-2010 3:50, Andreas Harder wrote: \definetextbackground [test] [location=paragraph, % frame=off, % -> no round corners anymore corner=round, % -> corner=1|2|3… would be nice leftoffset=.5\bodyfontsize, rightoffset=.5\bodyfontsize, topoffset=.5\bodyfontsize, bottomoffset=.5\bodyfontsize] \setuphead [subject] [after=, command=\MyHead] \def\MyHead#1#2% {\framed [background=color, backgroundcolor=gray, frame=off, offset=.5\bodyfontsize, corner=3]{#1#2}} \starttext \subject{Test} \starttest \input tufte \stoptest \stoptext \setuphead [subject] [after=\nointerlineskip, command=\MyHead] -- - 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] Textbackgrounds
Hi all, I've played with text backgrounds. Please have a look at the following example. \definetextbackground [test] [location=paragraph, % frame=off, % -> no round corners anymore corner=round, % -> corner=1|2|3… would be nice leftoffset=.5\bodyfontsize, rightoffset=.5\bodyfontsize, topoffset=.5\bodyfontsize, bottomoffset=.5\bodyfontsize] \setuphead [subject] [after=, command=\MyHead] \def\MyHead#1#2% {\framed [background=color, backgroundcolor=gray, frame=off, offset=.5\bodyfontsize, corner=3]{#1#2}} \starttext \subject{Test} \starttest \input tufte \stoptest \stoptext There is a nasty little space between the two backgrounds. How can I avoid it? Further the left borders of the frame are not aligned. I appreciate your help. Andreas ___ 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 ___