ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "B. Tommy Jensen" <btoj@frisurf.no>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Verbatim with color background
Date: Thu, 04 Sep 2008 11:49:02 +0200	[thread overview]
Message-ID: <op.ugyav0khsciad5@tommy-pc.i04.local> (raw)
In-Reply-To: <48BF987F.9000304@wxs.nl>

On Thu, 04 Sep 2008 10:12:47 +0200, Hans Hagen <pragma@wxs.nl> wrote:

>> Is there any other easy way of controlling the background
>> color on verbatim areas?
>
> can you make a small example that shows where it goes wrong?
>

The example I used is shown below. Other observations are:

  - The code works with mkIV but not mkII
  - Removing the chapters in the test file also make it work with mkII
  - I am using the latest win32 standalone ConTeXt

Best regards,
Tommy Jensen


% START EXAMPLE

\setupcolors[state=start]

% We use Palatino as the main body font
\usetypescript[palatino][ec]
\setupbodyfont[palatino,10pt]

\definetextbackground[verbatim]
[background=color,
backgroundcolor=yellow,
backgroundoffset=0cm,
offset=0.5cm,
frame=on,
framecolor=black,
location=paragraph,
color=black]

% Setup verbatim
\setuptyping[typing][margin=1cm,bodyfont=8.0pt,
before={\starttextbackground[verbatim]},
after={\stoptextbackground}]

\starttext

\chapter{One}
Chapter one.

\chapter{Two}
Chapter two.

\chapter{Three}
Chapter three.

\starttyping
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
\stoptyping

\stoptext
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2008-09-04  9:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-03 21:50 B. Tommy Jensen
2008-09-04  8:12 ` Hans Hagen
2008-09-04  9:49   ` B. Tommy Jensen [this message]
2008-09-05 17:41     ` Hans Hagen
2008-09-08  0:51       ` Aditya Mahajan
2008-09-08  0:59         ` Aditya Mahajan

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=op.ugyav0khsciad5@tommy-pc.i04.local \
    --to=btoj@frisurf.no \
    --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).