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
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 -----------------------------------------------------------------
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
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
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 -----------------------------------------------------------------
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
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 -----------------------------------------------------------------
participants (3)
-
Alan Braslau
-
Andreas Harder
-
Hans Hagen