ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Textbackground inside Layer?
@ 2019-12-06  3:13 Jon Wong
  2019-12-09 21:14 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Wong @ 2019-12-06  3:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

\setupwhitespace[line] % A line's spacing between paragraphs.

\starttext

\definetextbackground[InfoText][
  location=paragraph, frame=on]

\definelayer[testlayer]
\setlayer[testlayer][x=1cm,y=3cm]{%
  \startInfoText
  \stopInfoText
}
\flushlayer[testlayer]

\stoptext

Doesn’t work. Only works if I put text inside the layer.
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Textbackground inside Layer?
  2019-12-06  3:13 Textbackground inside Layer? Jon Wong
@ 2019-12-09 21:14 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2019-12-09 21:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Jon Wong

Jon Wong schrieb am 06.12.2019 um 04:13:
> \setupwhitespace[line] % A line's spacing between paragraphs.
>
> \starttext
>
> \definetextbackground[InfoText][
>    location=paragraph, frame=on]

You can't use "location=paragraph" because the argument of the \setlayer 
command is a simple horizontal box which doesn't create a paragraph 
unless you us additional command which create a paragraph.

> \definelayer[testlayer]
> \setlayer[testlayer][x=1cm,y=3cm]{%
>    \startInfoText
>    \stopInfoText
> }

Simpler method:

\setlayer
   [testlayer]
   [x=1cm,
   y=3cm]
   {\framed[framecolor=red]{TEXT}}

or

\setlayerframed
   [testlayer]
   [x=1cm,
   y=3cm]
   [framecolor=red]
   {TEXT}

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-09 21:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06  3:13 Textbackground inside Layer? Jon Wong
2019-12-09 21:14 ` Wolfgang Schuster

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).