ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Matthias Weber <matweber@indiana.edu>
Subject: beginner's hazzles with backgrounds and definitions.
Date: Sat, 26 Jul 2003 20:07:48 -0500	[thread overview]
Message-ID: <BD05E116-BFCE-11D7-9C01-000A959AFACC@indiana.edu> (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

             reply	other threads:[~2003-07-27  1:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-27  1:07 Matthias Weber [this message]
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

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=BD05E116-BFCE-11D7-9C01-000A959AFACC@indiana.edu \
    --to=matweber@indiana.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).