ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: \startbackground and verbatims
@ 1998-12-22 20:17 Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 1998-12-22 20:17 UTC (permalink / raw)
  Cc: ntg-context

Gilbert van den Dobbelsteen wrote:

> The backgound crosses the page-size:
> 
> +-----------------+  --> text boundary
> |                 |
> |   +---------+   |  --> Backgound edges
> |   |Some text|   |
> |   |Some text|   |
> |---+_________+---+
> 
> The background box is a bit deeper then the page-boundary (Sorry, I
> mean the \zethoogte).

Ah, depth. You can set the depth and an offset :
\setupbackgrounds[page][offset=3pt] or
\setupbackgrounds[page][depth=4pt]

> If you need more info, I can send you the resulting .pdf file which
> shows these difficulties (I will not post it on the list). I can also
> send you the style file I use, but it is **very* similar to s-pre-01

Later.

> > \framed[background={color,one,two,three},backgroundcolor=red]{Hi there}
> 
> This is *very* cool (I don't need it right now, but I'll keep it in

Ha, if you new all the secret options ... Another nice one is 

\definereference[cool][JS(forgetall),CloseDocument]

.... \goto{Like It Or Not}[cool] ....

once documented, you can also do one-step symbol switching and some
more. 

> The \leavevmode was necessary to make consecutive empty lines show
> up too (normally they are handled like multiple \par, e.g. they are
> changed into a single \par.

probably ugly

> >
> > > \def\startposter#1{\startachtergrond\bgroup\olines}
> >
> > wat doet die #1 daar?
> Dat komt later. Die #1 wordt later:
> 
>   \naar[#1::]{Echter poster}

reverse them: 

  \naar{Echte poster}[#1::]

or (\naar{Echte poster}[file(#1)] or [page(file::1)] or whatever looks
best)

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | fax: 038 477 53 74 | mail: pragma@wxs.nl

                     ConTeXt and PPCHTeX site: www.ntg.nl/context
-----------------------------------------------------------------
From owner-ntg-context@let.uu.nl Fri Jan 15 19:22:48 1999 +0200
Message-Id: <199901151819.TAA00494@dep.eco.rug.nl>
From: Erik Frambach <E.H.M.Frambach@eco.rug.nl>
To: ntg-context@ntg.nl
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Sender: owner-ntg-context@let.uu.nl
Date: Fri, 15 Jan 1999 19:17:13 +0100
Subject: context introduction

Hi all,

Based on Hans's "ConTeXt, an excursion", I've written (rearranged and 
rewritten) a chapter of a book that will be be published soon.
You can get a preview from http://frambach.eco.rug.nl/context.pdf
Any comments on errors or omissions are welcome! Never mind the
details of the layout, first we have to get the content right.

Erik Frambach


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

* Re: \startbackground and verbatims
@ 2002-10-23 16:39 Gilbert van den Dobbelsteen
  0 siblings, 0 replies; 4+ messages in thread
From: Gilbert van den Dobbelsteen @ 2002-10-23 16:39 UTC (permalink / raw)


> Gilbert van den Dobbelsteen wrote:
> 
> > I am having some difficulties with colored backgrounds and verbatim
> > like stuff.
> 
> There are two kinds of backgrounds. When you want a background to a page
> are specific area of the page, use \setupbackgrounds. This has nothing
> to do with the running text. You can put a background behind text, using
> \startbackground etc. This will cross the page boder ok, takes care of
> some offsets etc. 

Yep, well, I am using 

\startbackground Some stuff \stopbackground

> 
> How do you mean beyond? 

The backgound crosses the page-size:

+-----------------+  --> text boundary
|                 |
|   +---------+   |  --> Backgound edges
|   |Some text|   |
|   |Some text|   |
|---+_________+---+

The background box is a bit deeper then the page-boundary (Sorry, I 
mean the \zethoogte).

If you need more info, I can send you the resulting .pdf file which 
shows these difficulties (I will not post it on the list). I can also 
send you the style file I use, but it is **very* similar to s-pre-01

> Yes. Even multiples and mixed with color: 
> 
> \defineoverlay[one][this is one]
> \defineoverlay[two][this is the second one]
> \defineoverlay[three][this is the last one] 
> 
> \setupcolors[state=start]
> 
> \framed[background={color,one,two,three},backgroundcolor=red]{Hi there}

This is *very* cool (I don't need it right now, but I'll keep it in 
mind.

> > % From TeX by Topic:
> > {\catcode`\^^M=13 %
> >  \gdef\olines{\catcode`\^^M=13 \def^^M{\par\leavevmode}}%
> > }
> 
> \obeylines will do. 

The \leavevmode was necessary to make consecutive empty lines show 
up too (normally they are handled like multiple \par, e.g. they are 
changed into a single \par.

>  
> > \def\startposter#1{\startachtergrond\bgroup\olines}
> 
> wat doet die #1 daar? 
Dat komt later. Die #1 wordt later:

  \naar[#1::]{Echter poster}

  where #1.pdf --> poster file of the destination

> Why the obeylines? 

Because the people who wrote the input file needed some basic formatting 
control (simply some newlines will suffice for them).

Gilbert.


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

* \startbackground and verbatims
@ 2002-10-23 16:38 Gilbert van den Dobbelsteen
  0 siblings, 0 replies; 4+ messages in thread
From: Gilbert van den Dobbelsteen @ 2002-10-23 16:38 UTC (permalink / raw)


Hi there,

I am having some difficulties with colored backgrounds and verbatim 
like stuff.

I am sorry, the interface is dutch, so all goreign people will probably 
have some trouble reading the source. 

The trouble is the backgrounds, they seem to go beyond the page 
definition. Is there something I can do about that? Perhaps 
with \startregelcorectie or something like that?

I noticed that behaviour before, but on a A4 page it is usually not a 
problem. But this is a interactive layou, where there is not much space 
available on a page. And since the page has colors too, it is pretty 
obvious that backgrounds go beyond the boundaries.

So please, offend me, I am probably doing everything wrong here.

I also have another problem, with huge butons: I need to create a 
button which is large and contains multiple lines of text (The 
\startposter should do that). I am not very interested in high-lighting 
each word, just highlighting the entire block of text will suffice. Can 
any picture be the background of any macro where achtergrond=xxx is 
available?

%!&cont-nl

% From TeX by Topic:
{\catcode`\^^M=13 %
 \gdef\olines{\catcode`\^^M=13 \def^^M{\par\leavevmode}}%
}

\def\startposter#1{\startachtergrond\bgroup\olines}
\def\stopposter{\egroup\stopachtergrond\blanko[2*groot}

\starttekst

\startposter{external}
Hi there, this is some poster-text
\stopposter

...etcetera (more start/stop poster stuff)

\stoptekst

Gilbert.


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

* Re: \startbackground and verbatims
@ 1998-12-22 10:22 Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 1998-12-22 10:22 UTC (permalink / raw)
  Cc: ntg-context

Gilbert van den Dobbelsteen wrote:

> I am having some difficulties with colored backgrounds and verbatim
> like stuff.

There are two kinds of backgrounds. When you want a background to a page
are specific area of the page, use \setupbackgrounds. This has nothing
to do with the running text. You can put a background behind text, using
\startbackground etc. This will cross the page boder ok, takes care of
some offsets etc. 

> The trouble is the backgrounds, they seem to go beyond the page
> definition. Is there something I can do about that? Perhaps
> with \startregelcorectie or something like that?

How do you mean beyond? 

> I noticed that behaviour before, but on a A4 page it is usually not a
> problem. But this is a interactive layou, where there is not much space
> available on a page. And since the page has colors too, it is pretty
> obvious that backgrounds go beyond the boundaries.

You can set up a screen size. 

> So please, offend me, I am probably doing everything wrong here.

Probably. 

> I also have another problem, with huge butons: I need to create a
> button which is large and contains multiple lines of text (The
> \startposter should do that). I am not very interested in high-lighting
> each word, just highlighting the entire block of text will suffice. Can
> any picture be the background of any macro where achtergrond=xxx is
> available?

Yes. Even multiples and mixed with color: 

\defineoverlay[one][this is one]
\defineoverlay[two][this is the second one]
\defineoverlay[three][this is the last one] 

\setupcolors[state=start]

\framed[background={color,one,two,three},backgroundcolor=red]{Hi there}

> % From TeX by Topic:
> {\catcode`\^^M=13 %
>  \gdef\olines{\catcode`\^^M=13 \def^^M{\par\leavevmode}}%
> }

\obeylines will do. 

> \def\startposter#1{\startachtergrond\bgroup\olines}

wat doet die #1 daar? 

> \def\stopposter{\egroup\stopachtergrond\blanko[2*groot}

\def\startposter{\startachtergrond\startregels}
\def\stopposter {\stopregels\stopachtergrond}

> \starttekst
> 
> \startposter{external}
> Hi there, this is some poster-text
> \stopposter
> 
> ...etcetera (more start/stop poster stuff)

Why the obeylines? 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | fax: 038 477 53 74 | mail: pragma@wxs.nl

                     ConTeXt and PPCHTeX site: www.ntg.nl/context
-----------------------------------------------------------------


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

end of thread, other threads:[~2002-10-23 16:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-22 20:17 \startbackground and verbatims Hans Hagen
  -- strict thread matches above, loose matches on Subject: below --
2002-10-23 16:39 Gilbert van den Dobbelsteen
2002-10-23 16:38 Gilbert van den Dobbelsteen
1998-12-22 10:22 Hans Hagen

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