* Textbackgrounds
@ 2010-07-22 13:50 Andreas Harder
2010-07-22 14:37 ` Textbackgrounds Hans Hagen
0 siblings, 1 reply; 9+ messages in thread
From: Andreas Harder @ 2010-07-22 13:50 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Textbackgrounds
2010-07-22 13:50 Textbackgrounds Andreas Harder
@ 2010-07-22 14:37 ` Hans Hagen
2010-07-22 18:34 ` Textbackgrounds Andreas Harder
0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2010-07-22 14:37 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Andreas Harder
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Textbackgrounds
2010-07-22 14:37 ` Textbackgrounds Hans Hagen
@ 2010-07-22 18:34 ` Andreas Harder
2011-11-07 13:59 ` Textbackgrounds Alan Braslau
0 siblings, 1 reply; 9+ messages in thread
From: Andreas Harder @ 2010-07-22 18:34 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Textbackgrounds
2010-07-22 18:34 ` Textbackgrounds Andreas Harder
@ 2011-11-07 13:59 ` Alan Braslau
2011-11-07 15:58 ` Textbackgrounds Hans Hagen
0 siblings, 1 reply; 9+ messages in thread
From: Alan Braslau @ 2011-11-07 13:59 UTC (permalink / raw)
To: mailing list for ConTeXt users
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,
4 frame=off,
5 leftoffset=.5\bodyfontsize,
6 rightoffset=.5\bodyfontsize,
7 topoffset=.5\bodyfontsize,
8 bottomoffset=.5\bodyfontsize]
9
10 \starttext
11
<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.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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Textbackgrounds
2011-11-07 13:59 ` Textbackgrounds Alan Braslau
@ 2011-11-07 15:58 ` Hans Hagen
2011-11-15 14:40 ` Textbackgrounds Alan Braslau
0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2011-11-07 15:58 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Textbackgrounds
2011-11-07 15:58 ` Textbackgrounds Hans Hagen
@ 2011-11-15 14:40 ` Alan Braslau
2011-11-17 8:20 ` Textbackgrounds Hans Hagen
0 siblings, 1 reply; 9+ messages in thread
From: Alan Braslau @ 2011-11-15 14:40 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Textbackgrounds
2011-11-15 14:40 ` Textbackgrounds Alan Braslau
@ 2011-11-17 8:20 ` Hans Hagen
0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2011-11-17 8:20 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: textbackgrounds
2003-03-27 11:33 textbackgrounds Patrick Gundlach
@ 2003-03-27 17:51 ` Hans Hagen
0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2003-03-27 17:51 UTC (permalink / raw)
At 12:33 PM 3/27/2003 +0100, you wrote:
>Dear ConTeXt users,
>
>i have a question about textbackgrounds. Is there
>
>a) something like \setuptextbackground[all][frame=on,...]
> that sets frame=on for all the textbackgrounds out there?
>
>Or better:
>
>b) is there any way to inherit parameters?
> \definetextbackground[A][frame=off]
> \definetextbackground[B][A]
>
> so that B also has frame=off set?
no, for the moment this is a pretty low level command; however (look in
core-pos) you can set some MP variables if needed
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* textbackgrounds
@ 2003-03-27 11:33 Patrick Gundlach
2003-03-27 17:51 ` textbackgrounds Hans Hagen
0 siblings, 1 reply; 9+ messages in thread
From: Patrick Gundlach @ 2003-03-27 11:33 UTC (permalink / raw)
Dear ConTeXt users,
i have a question about textbackgrounds. Is there
a) something like \setuptextbackground[all][frame=on,...]
that sets frame=on for all the textbackgrounds out there?
Or better:
b) is there any way to inherit parameters?
\definetextbackground[A][frame=off]
\definetextbackground[B][A]
so that B also has frame=off set?
Patrick
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-11-17 8:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-22 13:50 Textbackgrounds Andreas Harder
2010-07-22 14:37 ` Textbackgrounds Hans Hagen
2010-07-22 18:34 ` Textbackgrounds Andreas Harder
2011-11-07 13:59 ` Textbackgrounds Alan Braslau
2011-11-07 15:58 ` Textbackgrounds Hans Hagen
2011-11-15 14:40 ` Textbackgrounds Alan Braslau
2011-11-17 8:20 ` Textbackgrounds Hans Hagen
-- strict thread matches above, loose matches on Subject: below --
2003-03-27 11:33 textbackgrounds Patrick Gundlach
2003-03-27 17:51 ` textbackgrounds Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).