From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: fancy chapter setup
Date: Sun, 12 Jan 2020 16:07:48 +0100 [thread overview]
Message-ID: <4390F12E-19B6-4AF7-AEA7-00662DB432A7@fiee.net> (raw)
In-Reply-To: <BA1F59DC-F5E4-4CC2-9F02-2FC303B31AA3@fiee.net>
Since the structureuservariables of a section aren’t defined in that section’s "before", I would need a macro or buffer to define the contents of that epigraph page, like this:
\def\PreImg{Dummy}
\startsetups FancyChapter
\setupheadertexts[][][][]
\doifelsebuffer{Quote}{
\doifoddpageelse
{\page[left]}
{\donothing}
{\definedfont[SerifItalic at 16pt]\quotation{\getbuffer[Quote]}\par}
\externalfigure[\PreImg][width=\textwidth]
\resetbuffer[Quote]
}{}
\page[right]
\stopsetups
\setupheadertexts[][pagenumber][pagenumber][chapter]
\setuphead[chapter][
page=yes,
before={\directsetup{FancyChapter}},
]
\setuppagenumbering[alternative=doublesided]
\starttext
\completecontent
\startchapter[title={My Normal Text}]
\input knuth
\stopchapter
\def\PreImg{Real}
\startbuffer[Quote]
I thought that was real.
\stopbuffer
\startchapter[title={My Fancy Story}]
\input tufte
\stopchapter
\def\PreImg{Love}
\startbuffer[Quote]
All you need is love.
\stopbuffer
\startchapter[title={Another Fancy Story}]
\input zapf
\stopchapter
\startchapter[title={Another Normal Text}]
\input knuth
\stopchapter
\stoptext
That’s possible, but ugly. I would really like to set those quotes and image names in the chapter command.
Best, Hraban
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2020-01-12 15:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-11 15:04 Henning Hraban Ramm
2020-01-11 18:49 ` Rik Kabel
2020-01-11 19:24 ` Henning Hraban Ramm
2020-01-12 13:40 ` Henning Hraban Ramm
2020-01-12 15:07 ` Henning Hraban Ramm [this message]
2020-01-13 18:21 ` Henning Hraban Ramm
2020-01-13 21:48 ` Wolfgang Schuster
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=4390F12E-19B6-4AF7-AEA7-00662DB432A7@fiee.net \
--to=texml@fiee.net \
--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).