* Re: overlay or layer for chapter head.
@ 2015-04-02 11:15 Robin.Kirkham
2015-04-02 12:46 ` Otared Kavian
0 siblings, 1 reply; 8+ messages in thread
From: Robin.Kirkham @ 2015-04-02 11:15 UTC (permalink / raw)
To: ntg-context
> From: John Culleton <John@wexfordpress.com>
> Subject: [NTG-context] overlay or layer for chapter head.
> Date: 2 April 2015 1:19:03 AEDT
>
> I am redoing a book for a client. Each chapter
> head has a fancy design. I want to reproduce that
> fancy page but still have the "\chapter"
> statement for running heads, TOC etc.
>
> Is there a way that I can overlay the entire
> chapter first page with a graphic, ideally a one
> page pdf file.
>
> I have tried workarounds with
> \startstandardmakeup,\writetolist,
> \definemarking etc. but the whole thing is
> getting too complicated. I just want to overlay a
> the entire page with a graphic yet have
> the real content of the page still available for
> TOC, running head, indexing terms etc.
>
> Any suggestions?
>
> --
> John Culleton
> Wexford Press
Hi John,
I did this recently by defining a layer and putting an image in it using \setlayer, in a macro called just before chapters are started:
\definelayer[chapterbackground]
\setupexternalfigures[location=default]
\unexpanded\def\chapterbefore{
\setlayer[chapterbackground]{%
\externalfigure[mill.png]
[width=\paperwidth,height=\paperheight]
}
\setupbackgrounds[page]
[background=chapterbackground]
}
\setuphead[chapter][before=\chapterbefore]
\starttext
\chapter{Knuth}
\dorecurse{5}{
\input knuth
\par
}
\chapter{Dawkins}
\input dawkins
\stoptext
No doubt there is a neater/better way to do it than that. In fact I tried to set up the background only once, like this:
\definelayer[chapterbackground]
\setupexternalfigures[location=default]
\setlayer[chapterbackground]{%
\externalfigure[mill.png]
[width=\paperwidth,height=\paperheight]
}
\setuphead[chapter]
[before={
\setupbackgrounds[page]
[background=chapterbackground]
}]
\starttext
\chapter{Knuth}
\dorecurse{5}{
\input knuth
\par
}
\chapter{Dawkins}
\input dawkins
\stoptext
But it looks like the layer “forgets” the image each time it is used, and the second chapter does not have the image. I’d be pleased to know the “right way” to do this too ...
Robin
___________________________________________________________________________________
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] 8+ messages in thread
* Re: overlay or layer for chapter head.
2015-04-02 11:15 overlay or layer for chapter head Robin.Kirkham
@ 2015-04-02 12:46 ` Otared Kavian
2015-04-02 13:10 ` Procházka Lukáš Ing. - Pontex s. r. o.
0 siblings, 1 reply; 8+ messages in thread
From: Otared Kavian @ 2015-04-02 12:46 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
Maybe you need to say state=repeat in the definition of your layer:
\definelayer[chapterbackground][state=repeat]
Best regards: OK
>
> On 02 Apr 2015, at 13:15, Robin.Kirkham@csiro.au wrote:
>
>> From: John Culleton <John@wexfordpress.com>
>> Subject: [NTG-context] overlay or layer for chapter head.
>> Date: 2 April 2015 1:19:03 AEDT
>>
>> I am redoing a book for a client. Each chapter
>> head has a fancy design. I want to reproduce that
>> fancy page but still have the "\chapter"
>> statement for running heads, TOC etc.
>>
>> Is there a way that I can overlay the entire
>> chapter first page with a graphic, ideally a one
>> page pdf file.
>>
>> I have tried workarounds with
>> \startstandardmakeup,\writetolist,
>> \definemarking etc. but the whole thing is
>> getting too complicated. I just want to overlay a
>> the entire page with a graphic yet have
>> the real content of the page still available for
>> TOC, running head, indexing terms etc.
>>
>> Any suggestions?
>>
>> --
>> John Culleton
>> Wexford Press
>
> Hi John,
>
> I did this recently by defining a layer and putting an image in it using \setlayer, in a macro called just before chapters are started:
>
> \definelayer[chapterbackground]
> \setupexternalfigures[location=default]
>
> \unexpanded\def\chapterbefore{
> \setlayer[chapterbackground]{%
> \externalfigure[mill.png]
> [width=\paperwidth,height=\paperheight]
> }
> \setupbackgrounds[page]
> [background=chapterbackground]
> }
>
> \setuphead[chapter][before=\chapterbefore]
>
> \starttext
> \chapter{Knuth}
> \dorecurse{5}{
> \input knuth
> \par
> }
>
> \chapter{Dawkins}
> \input dawkins
> \stoptext
>
> No doubt there is a neater/better way to do it than that. In fact I tried to set up the background only once, like this:
>
> \definelayer[chapterbackground]
> \setupexternalfigures[location=default]
> \setlayer[chapterbackground]{%
> \externalfigure[mill.png]
> [width=\paperwidth,height=\paperheight]
> }
>
> \setuphead[chapter]
> [before={
> \setupbackgrounds[page]
> [background=chapterbackground]
> }]
>
> \starttext
> \chapter{Knuth}
> \dorecurse{5}{
> \input knuth
> \par
> }
>
> \chapter{Dawkins}
> \input dawkins
> \stoptext
>
> But it looks like the layer “forgets” the image each time it is used, and the second chapter does not have the image. I’d be pleased to know the “right way” to do this too ...
>
> Robin
>
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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] 8+ messages in thread
* Re: overlay or layer for chapter head.
2015-04-02 12:46 ` Otared Kavian
@ 2015-04-02 13:10 ` Procházka Lukáš Ing. - Pontex s. r. o.
2015-04-02 15:12 ` John Culleton
0 siblings, 1 reply; 8+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2015-04-02 13:10 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hello,
On Thu, 02 Apr 2015 14:46:11 +0200, Otared Kavian <otared@gmail.com> wrote:
> Hi,
>
> Maybe you need to say state=repeat in the definition of your layer:
>
> \definelayer[chapterbackground][state=repeat]
'[state=repeat]' causes all pages have the 'mill' background.
Best regards,
Lukas
--
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4
Tel: +420 241 096 751
Fax: +420 244 461 038
___________________________________________________________________________________
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] 8+ messages in thread
* Re: overlay or layer for chapter head.
2015-04-02 13:10 ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2015-04-02 15:12 ` John Culleton
2015-04-02 17:07 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: John Culleton @ 2015-04-02 15:12 UTC (permalink / raw)
To: ntg-context
On Thu, 02 Apr 2015 15:10:19 +0200
Procházka Lukáš Ing. - Pontex s. r. o.
<LPr@pontex.cz> wrote:
> Hello,
>
> On Thu, 02 Apr 2015 14:46:11 +0200, Otared
> Kavian <otared@gmail.com> wrote:
>
> > Hi,
> >
> > Maybe you need to say state=repeat in the
> > definition of your layer:
> >
> > \definelayer[chapterbackground][state=repeat]
>
> '[state=repeat]' causes all pages have the
> 'mill' background.
>
> Best regards,
>
> Lukas
>
>
I am not seeking a background but rather a
foreground. And I only need this for 7 chapter
heads. Here is how I put the page image into my
context file now:
-------------------------------------------------
\startstandardmakeup[doublesided=no]
\vskip -0.15in
\hskip -0.7in
\hbox{\externalfigure[chaphead2.pdf][width=\paperwidth,
height=\paperheight]} \stopstandardmakeup
\writetolist[chapter]{2}{Chapter 2: Understanding
the Food Industry}%
------------------------------------------------
This works but I want a less fiddly-more
reliable method.
--
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
Updated PDF e-book: "Create Book Covers with
Scribus 1.4.5" coming soon at
http://www.booklocker.com/!
___________________________________________________________________________________
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] 8+ messages in thread
* Re: overlay or layer for chapter head.
2015-04-02 15:12 ` John Culleton
@ 2015-04-02 17:07 ` Wolfgang Schuster
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2015-04-02 17:07 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2107 bytes --]
> Am 02.04.2015 um 17:12 schrieb John Culleton <john@wexfordpress.com>:
>
> On Thu, 02 Apr 2015 15:10:19 +0200
> Procházka Lukáš Ing. - Pontex s. r. o.
> <LPr@pontex.cz <mailto:LPr@pontex.cz>> wrote:
>
>> Hello,
>>
>> On Thu, 02 Apr 2015 14:46:11 +0200, Otared
>> Kavian <otared@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Maybe you need to say state=repeat in the
>>> definition of your layer:
>>>
>>> \definelayer[chapterbackground][state=repeat]
>>
>> '[state=repeat]' causes all pages have the
>> 'mill' background.
>>
>> Best regards,
>>
>> Lukas
>>
>>
>
> I am not seeking a background but rather a
> foreground. And I only need this for 7 chapter
> heads. Here is how I put the page image into my
> context file now:
> -------------------------------------------------
> \startstandardmakeup[doublesided=no]
> \vskip -0.15in
> \hskip -0.7in
> \hbox{\externalfigure[chaphead2.pdf][width=\paperwidth,
> height=\paperheight]} \stopstandardmakeup
> \writetolist[chapter]{2}{Chapter 2: Understanding
> the Food Industry}%
> ------------------------------------------------
> This works but I want a less fiddly-more
> reliable method.
\setupexternalfigures[location=default]
\definelayer[chaptertext][width=\paperwidth,height=\paperheight]
\define[2]\ChapterCommand
{\setlayerframed
[chaptertext]
[x=3cm,
y=8cm]
[frame=off]
{#1 – #2}}
\definemakeup[chapterpage][page]
\setupmakeup
[chapterpage]
[pagestate=start,
before={\setupbackgrounds[page][background=chapterimage]},
bottom={\placelayer[chaptertext]}]
\defineoverlay[chapterimage][\overlayfigure{\structureuservariable{image}}]
\setuphead
[chapter]
[ before={\startmakeup[chapterpage]},
%command=\ChapterCommand,
placehead=empty,
after={\stopmakeup}]
\setuphead
[title]
[ before={\blank[big]},
after={\blank[2*big]},
command=]
\starttext
\completecontent
\startchapter[title={Understanding the Food Industry}][image=mill.png]
\input knuth
\stopchapter
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 18565 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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] 8+ messages in thread
* Re: overlay or layer for chapter head.
2015-04-01 14:19 John Culleton
2015-04-01 19:37 ` Idris Samawi Hamid ادريس سماوي حامد
@ 2015-04-01 20:39 ` Alan BRASLAU
1 sibling, 0 replies; 8+ messages in thread
From: Alan BRASLAU @ 2015-04-01 20:39 UTC (permalink / raw)
To: John Culleton; +Cc: mailing list for ConTeXt users
John,
Do you mean this post?
(It appeared on the mailing list)
Alan
On Wed, 1 Apr 2015 10:19:03 -0400
John Culleton <John@wexfordpress.com> wrote:
> I am redoing a book for a client. Each chapter
> head has a fancy design. I want to reproduce that
> fancy page but still have the "\chapter"
> statement for running heads, TOC etc.
>
> Is there a way that I can overlay the entire
> chapter first page with a graphic, ideally a one
> page pdf file.
>
> I have tried workarounds with
> \startstandardmakeup,\writetolist,
> \definemarking etc. but the whole thing is
> getting too complicated. I just want to overlay a
> the entire page with a graphic yet have
> the real content of the page still available for
> TOC, running head, indexing terms etc.
>
> Any suggestions?
On Wed, 1 Apr 2015 21:13:49 +0200
Hans Hagen <pragma@wxs.nl> wrote:
> -------- Forwarded Message --------
> Subject: My posts.
> Date: Wed, 1 Apr 2015 14:21:41 -0400
> From: John Culleton <John@wexfordpress.com>
> Organization: WexfordPress
> To: Hans Hagen <pragma@wxs.nl>
>
> Recently my posts don't appear on the list. If I
> send you a cc you are kind enough to answer. But
> is there a reason why my recent posts don't
> appear on the mailing list?
>
> Here is the text of my most recent post:
> ----------------------------------------
___________________________________________________________________________________
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] 8+ messages in thread
* Re: overlay or layer for chapter head.
2015-04-01 14:19 John Culleton
@ 2015-04-01 19:37 ` Idris Samawi Hamid ادريس سماوي حامد
2015-04-01 20:39 ` Alan BRASLAU
1 sibling, 0 replies; 8+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2015-04-01 19:37 UTC (permalink / raw)
To: mailing list for ConTeXt users, John Culleton
Hi John,
Per Hans' Fwd: I can confirm that this latest post of yours made it to the
list.
Best wishes
Idris
On Wed, 01 Apr 2015 08:19:03 -0600, John Culleton <John@wexfordpress.com>
wrote:
> I am redoing a book for a client. Each chapter
> head has a fancy design. I want to reproduce that
> fancy page but still have the "\chapter"
> statement for running heads, TOC etc.
>
> Is there a way that I can overlay the entire
> chapter first page with a graphic, ideally a one
> page pdf file.
>
> I have tried workarounds with
> \startstandardmakeup,\writetolist,
> \definemarking etc. but the whole thing is
> getting too complicated. I just want to overlay a
> the entire page with a graphic yet have
> the real content of the page still available for
> TOC, running head, indexing terms etc.
>
> Any suggestions?
>
>
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
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] 8+ messages in thread
* overlay or layer for chapter head.
@ 2015-04-01 14:19 John Culleton
2015-04-01 19:37 ` Idris Samawi Hamid ادريس سماوي حامد
2015-04-01 20:39 ` Alan BRASLAU
0 siblings, 2 replies; 8+ messages in thread
From: John Culleton @ 2015-04-01 14:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
I am redoing a book for a client. Each chapter
head has a fancy design. I want to reproduce that
fancy page but still have the "\chapter"
statement for running heads, TOC etc.
Is there a way that I can overlay the entire
chapter first page with a graphic, ideally a one
page pdf file.
I have tried workarounds with
\startstandardmakeup,\writetolist,
\definemarking etc. but the whole thing is
getting too complicated. I just want to overlay a
the entire page with a graphic yet have
the real content of the page still available for
TOC, running head, indexing terms etc.
Any suggestions?
--
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
Updated PDF e-book: "Create Book Covers with
Scribus 1.4.5" coming soon at
http://www.booklocker.com/!
___________________________________________________________________________________
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] 8+ messages in thread
end of thread, other threads:[~2015-04-02 17:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-02 11:15 overlay or layer for chapter head Robin.Kirkham
2015-04-02 12:46 ` Otared Kavian
2015-04-02 13:10 ` Procházka Lukáš Ing. - Pontex s. r. o.
2015-04-02 15:12 ` John Culleton
2015-04-02 17:07 ` Wolfgang Schuster
-- strict thread matches above, loose matches on Subject: below --
2015-04-01 14:19 John Culleton
2015-04-01 19:37 ` Idris Samawi Hamid ادريس سماوي حامد
2015-04-01 20:39 ` Alan BRASLAU
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).