ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* External figures in section headings
@ 2011-01-09 16:33 Felix Ingram
  2011-01-09 20:39 ` luigi scarso
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Ingram @ 2011-01-09 16:33 UTC (permalink / raw)
  To: ntg-context

Hello all,

I need to have an image as part of my section headings. I've read
through an example in the "It's in the details" manual and came up
with the following example:

\definelayer[chapterstart][width=\paperwidth,height=\paperheight]
\definelayerpreset[lefttop][corner={left,top},location={right,bottom}]
\setlayer[chapterstart][preset=lefttop]{\externalfigure[hacker.jpg]}
\setuphead[chapter][before={\setupbackgrounds[page][background=chapterstart]}]
\starttext
\chapter{First chapter}
\chapter{Second chapter}
\stoptext

This works very well for the first chapter: the picture is inserted
behind the text as I want but nothing is inserted behind the second
chapter heading. I've been able to add extra details to the setuphead;
these are repeated but the picture is not.

Can anyone see what I'm doing wrong? I get the same behaviour whether
I use version II or IV.

Many thanks in advance,

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


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

* Re: External figures in section headings
  2011-01-09 16:33 External figures in section headings Felix Ingram
@ 2011-01-09 20:39 ` luigi scarso
  2011-01-09 21:36   ` Felix Ingram
  0 siblings, 1 reply; 3+ messages in thread
From: luigi scarso @ 2011-01-09 20:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, Jan 9, 2011 at 5:33 PM, Felix Ingram <f.ingram.lists@gmail.com> wrote:
> Hello all,
>
> I need to have an image as part of my section headings. I've read
> through an example in the "It's in the details" manual and came up
> with the following example:
>
> \definelayer[chapterstart][width=\paperwidth,height=\paperheight]
> \definelayerpreset[lefttop][corner={left,top},location={right,bottom}]
> \setlayer[chapterstart][preset=lefttop]{\externalfigure[hacker.jpg]}
> \setuphead[chapter][before={\setupbackgrounds[page][background=chapterstart]}]
> \starttext
> \chapter{First chapter}
> \chapter{Second chapter}
> \stoptext
>
> This works very well for the first chapter: the picture is inserted
> behind the text as I want but nothing is inserted behind the second
> chapter heading. I've been able to add extra details to the setuphead;
> these are repeated but the picture is not.
>
> Can anyone see what I'm doing wrong? I get the same behaviour whether
> I use version II or IV.

\definelayer[chapterstart][width=\paperwidth,height=\paperheight]
\definelayerpreset[lefttop][corner={left,top},location={right,bottom}]
\setlayer[chapterstart][preset=lefttop]{\externalfigure[cow]}
\setuphead[chapter][before={%

\setlayer[chapterstart][preset=lefttop]{\externalfigure[cow]}%
		   \setupbackgrounds[page][background={chapterstart}]}]
\starttext
\chapter{First chapter}
\chapter{Second chapter}
\stoptext


(I'm sure that there are other solutions)

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


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

* Re: External figures in section headings
  2011-01-09 20:39 ` luigi scarso
@ 2011-01-09 21:36   ` Felix Ingram
  0 siblings, 0 replies; 3+ messages in thread
From: Felix Ingram @ 2011-01-09 21:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 9 January 2011 20:39, luigi scarso <luigi.scarso@gmail.com> wrote:
> On Sun, Jan 9, 2011 at 5:33 PM, Felix Ingram <f.ingram.lists@gmail.com> wrote:
>> Hello all,
>>
>> I need to have an image as part of my section headings. I've read
>> through an example in the "It's in the details" manual and came up
>> with the following example:
>>
>> \definelayer[chapterstart][width=\paperwidth,height=\paperheight]
>> \definelayerpreset[lefttop][corner={left,top},location={right,bottom}]
>> \setlayer[chapterstart][preset=lefttop]{\externalfigure[hacker.jpg]}
>> \setuphead[chapter][before={\setupbackgrounds[page][background=chapterstart]}]
>> \starttext
>> \chapter{First chapter}
>> \chapter{Second chapter}
>> \stoptext
>>
>> This works very well for the first chapter: the picture is inserted
>> behind the text as I want but nothing is inserted behind the second
>> chapter heading. I've been able to add extra details to the setuphead;
>> these are repeated but the picture is not.
>>
>> Can anyone see what I'm doing wrong? I get the same behaviour whether
>> I use version II or IV.
>
> \definelayer[chapterstart][width=\paperwidth,height=\paperheight]
> \definelayerpreset[lefttop][corner={left,top},location={right,bottom}]
> \setlayer[chapterstart][preset=lefttop]{\externalfigure[cow]}
> \setuphead[chapter][before={%
>
> \setlayer[chapterstart][preset=lefttop]{\externalfigure[cow]}%
>                   \setupbackgrounds[page][background={chapterstart}]}]
> \starttext
> \chapter{First chapter}
> \chapter{Second chapter}
> \stoptext
>
>
> (I'm sure that there are other solutions)

Works perfectly - many thanks.

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


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

end of thread, other threads:[~2011-01-09 21:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-09 16:33 External figures in section headings Felix Ingram
2011-01-09 20:39 ` luigi scarso
2011-01-09 21:36   ` Felix Ingram

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