[NTG-context] Colored text's background, which the more "lcd-mkiv"?

Elspeth McGullicuddy elspethmcgullicuddy at gmail.com
Fri Jan 17 17:33:48 CET 2014

[Colored text's background, which the more "lcd-mkiv"?;
plus: Metapost variable "text" with "\definetextbackground";
plus: {\input ward}]

Hi list,

What would be the best, also the more up to date, way to put colored
background behind text, that could cross page boundaries.

I have found three ways of doing this: I would like to know which is
best practice, and also the more "lua context document" fashion.

1- Using "\startbar[underbar] \input zapf \stopbar" as described p. 39
of "hybrid.pdf".

2- Using "\startMPpositionmethod{mpos:placeholder}", found in
(Thanks to Aditya).
A bit tricky, but perhaps the more versatile or universal?

3- Start with: "\definetextbackground" (same ref. as previous).


% About the third one I have had some difficulties, that might be
thought of as a bug.
% You might want and try the following example: it doesn't work if you
have a MetaPost variable
% whose name is "text".



%  numeric text; %% Try and uncomment this line

  drawarrow (0,0)--(3cm,1cm);


\definecolor [lightblue] [r=0.5, g=0.5, b=1]


\placeholder{\input ward }

% \placeholder{\input ward} %% Try and uncomment this line


% Local Variables:
% mode: context
% coding: utf-8
% End:


More information about the ntg-context mailing list