ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Framed text question
Date: Wed, 19 Jan 2005 18:35:55 +0100	[thread overview]
Message-ID: <41EE9A7B.7000806@wxs.nl> (raw)
In-Reply-To: <41EE96AF.5090900@freescale.com>

[-- Attachment #1: Type: text/plain, Size: 1734 bytes --]

Brian Kahne wrote:
> 
> Hi,
> 
> I'm new to Context, so hopefully this isn't a completely obvious 
> question, but I was wondering whether it was possible to have framed 
> text split across a page. In this particular case, I have a code sample 
> that I want to be framed and have a different background color than the 
> rest of the text, so I have it surrounded by \startframedtext and 
> \stopframedtext.  Is it possible to use \splitfloat to split this if the 
> code sample is too large to fit on a single page?  If so, what would be 
> the syntax?  If not, is there another mechanism?

the following background mechanism splits across pages, works over columns, can 
be used nested, can be applied for very dirty tricks, etc

\setupcolors[state=start]

\starttext

\definetextbackground[more][state=start,backgroundcolor=red] % location=paragraph
\definetextbackground[test][state=start,backgroundcolor=green]

\page \placefigure[left]{}{}

\starttextbackground[test]
   \readfile{ward}{}{}
   \starttextbackground[more]
     \readfile{ward}{}{}
   \stoptextbackground
   \readfile{ward}{}{}
\stoptextbackground

\page \placefigure[right]{}{}

\starttextbackground[test]
   \readfile{ward}{}{}
   \starttextbackground[more]
     \readfile{ward}{}{}
   \stoptextbackground
   \readfile{ward}{}{}
\stoptextbackground

\stoptext


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

[-- Attachment #2: test.pdf --]
[-- Type: application/pdf, Size: 16211 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

  reply	other threads:[~2005-01-19 17:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-19 17:19 Brian Kahne
2005-01-19 17:35 ` Hans Hagen [this message]
2009-04-21 10:46 framed " Jos van Gisbergen
2009-04-21 13:10 ` 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=41EE9A7B.7000806@wxs.nl \
    --to=pragma@wxs.nl \
    --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).