ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* beginner's hazzles with backgrounds and definitions.
@ 2003-07-27  1:07 Matthias Weber
  2003-07-29 17:02 ` Hans Hagen
  0 siblings, 1 reply; 16+ messages in thread
From: Matthias Weber @ 2003-07-27  1:07 UTC (permalink / raw)


Hi,

I am new to context, migrating from latex for the purpose of writing an
online book. I would like to set up a few definitions in the 
environment file
that would replace latex's  \begin{definition} ... \end{definition}
environments. I realize that this can  be done conveniently with 
\defineenumeration,
but I want of course a few more features in it then in latex's setup. 
For example, I'd like to have the
definition typeset in some color against some background. I tried the 
following
in the environment file:

\setupcolors[state=start]

\definetextbackground
[defbackground]
[backgroundcolor=blue,
backgroundoffset=.25cm,
offset=.25cm,
frame=off,
location=paragraph,
color=green]

\defineenumeration
[definition]
[text=Definition,
location=left,
before={\starttextbackground[defbackground]},
after={\stoptextbackground},
letter=it]

Then, in the text, when I use

\startdefinition
This is my definition.
\stopdefinition

the text comes out green all right, but the blue background is  smeared 
all over two pages.
I have tried a few modifications to no avail, so I fear I am doing it 
all wrong.

Curiously, when I typeset the above th first time, I only get the green 
text (no blue), and the
mess shows only up when typesetting the second time.

Any help?

Thanks,

Matthias

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

end of thread, other threads:[~2003-08-03 13:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-27  1:07 beginner's hazzles with backgrounds and definitions Matthias Weber
2003-07-29 17:02 ` Hans Hagen
2003-07-30  1:44   ` Matthias Weber
2003-07-30  8:49     ` Patrick Gundlach
2003-07-30 12:31       ` Matthias Weber
2003-07-30 16:58         ` Hans Hagen
2003-07-30 20:15           ` Henning Hraban Ramm
2003-07-30 20:47           ` Matthias Weber
2003-07-31  8:56             ` Hans Hagen
2003-08-02 16:22               ` installation of ConTeXt Patrick Gundlach
2003-07-31 21:25           ` Re: beginner's hazzles with backgrounds and definitions Gerben Wierda
2003-07-31 21:44             ` Thomas A.Schmitz
2003-08-02  4:33               ` Matthias Weber
2003-08-01  3:20             ` How to run context under mac os x - was(is): " Matthias Weber
2003-08-03 13:09         ` Gerben Wierda
2003-08-03 13:52           ` Matthias Weber

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