* please keep message small (>40K is rejected)
@ 2002-08-04 22:01 Hans Hagen
0 siblings, 0 replies; only message in thread
From: Hans Hagen @ 2002-08-04 22:01 UTC (permalink / raw)
To: ntg-context-approval@let.uu.nl
Subject: BOUNCE ntg-context@let.uu.nl: Message too long (>40000 chars)
> Hello again,
>
> after editing a few simple documents with ConTeXt. I want to imitate some
> house style that my company uses for courses. I was able to imitate the
>style quite well: headers, footers, fonts, colors ... great!! But ...
>(there's always a but ;-)) ...
>
>Every chapter of the style occupies a page and its some sort of drawing. The
>chapter number and the chapter text go in a specific location within this
>drawing (the ligth gray box). While I could try to recreate the drawing in
>MetaFun (which I want to do some day in the future), I took the drawing and
>include it in my ConText document.
>
>Here is what I've tried. In attachment I have the a low res image and a
>simple source file if somebody is interested.
>
>============================================================================
>======================
>\setuphead[section][page=yes,continue=no,after=\blank]
>\defineoverlay[jnalogo][{\externalfigure[images/chapter-front][type=png,widt
>h=\overlaywidth,height=\overlayheight]}]
>\def\JNAChapter#1#2%
>{{\framed[height=24cm,width=11.1cm,background=jnalogo]{#1 : #2%this should
>go in the grey box
>}}}
>
>\setuphead[chapter][before=\noheaderandfooterlines,
> command=\JNAChapter
> ]
>============================================================================
>=======================
better:
\setuphead
[chapter]
[headerstate=none,
footerstate=none,
command=\JNAChapter]
\starttext
\chapter{Text}
\stoptext
>Now my only problem is:
>- position the entire chapter figure in the middle of the page
you could define a special layout, or use layers
>- position the number and the text in the middle of the gray box of the
>image
>
>I read about layers and stuff, but I don't have a clue how I could position
>a piece of text at a specific location of a frame so that it appears at the
>right spot on top of the drawing (if you look at the image, it should go
>into the middle of the light gray box).
>
>any ideas?
>
>thanks,
>
>Kris Hermans.
untested:
\defineoverlay
[jnalogo]
[\overlayfigure{images/chapter-front}]
\definelayer
[jnatext]
\def\JNAChapter#1#2%
{\setlayerframed
[jnatext]
[x=2cm,
y=4cm]
[width=10cm,
height=5cm]
{#1 : #2}%
\framed
[height=24cm,
width=11.1cm,
background={jnalogo,jnatext}]}
an option is to add background=color,backgroundcolor=gray to the layerframed
concerning the middle of the page:
\definelayer
[page]
\setuplayer
[page]
[width=\paperwidth,
height=\paperheight]
\setupbackgrounds
[page]
[background=page]
\def\JNAchapter#1#2%
{\setlayer
[x=.5\paperwidth,
y=.5\paperheight,
location=c]
{\externalfigure....}
\setlayer
[....]
{#1 #2}
% force new page
\page[empty]}
>PS: before I actually investigate time in it: is it possible to re-draw the
>attached image using metafun?
dunno since there is no attachment -)
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-08-04 22:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-04 22:01 please keep message small (>40K is rejected) 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).