ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Colored text's background, which the more "lcd-mkiv"?
Date: Fri, 17 Jan 2014 12:16:02 -0500 (EST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1401171213501.20617@nqv-guvaxcnq> (raw)
In-Reply-To: <CAGMMSTCxHUbW5jdVdQHZVKRCWcd7A63Myf3rprTG4Geyg4CdtQ@mail.gmail.com>

On Fri, 17 Jan 2014, Elspeth McGullicuddy wrote:

> [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".

Use this one, unless the underbars are indequate, as was the case for the 
OP of the TeX.SX question.

> 2- Using "\startMPpositionmethod{mpos:placeholder}", found in
> http://tex.stackexchange.com/questions/125162/rounded-box-around-placeholder-text-that-supports-line-breaking/125323
> (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".


(Untested). Normally this means that there is already a variable with the 
name text. You can use:

save text; numeric text;

or

newnumeric text;

which is shortcut for the former.

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
___________________________________________________________________________________


  reply	other threads:[~2014-01-17 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17 16:33 Elspeth McGullicuddy
2014-01-17 17:16 ` Aditya Mahajan [this message]
2014-01-17 19:33   ` Elspeth McGullicuddy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.02.1401171213501.20617@nqv-guvaxcnq \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).