ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
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 14:40:50 +0100	[thread overview]
Message-ID: <BA1F59DC-F5E4-4CC2-9F02-2FC303B31AA3@fiee.net> (raw)
In-Reply-To: <7bf16268-905a-d0ed-2953-e98c24ab02bf@rik.users.panix.com>


> Am 2020-01-11 um 19:49 schrieb Rik Kabel <context@rik.users.panix.com>:
> For what it is worth, here is how I address this. This lets me place epigraphs on the facing verso of a chapter, or under the section title, and set lettrines and first line treatment for chapters. I set page numbers in a separate overlay to better control the positioning. Perhaps a bit overthought, but it works for me ...

Here’s my approach. Right/left stuff and placement is good, but I get always the extra contents of the previous chapter, i.e. “Another Fancy Story” gets the subtitle/quote from “My Fancy Story”, while “My Fancy Story” doesn’t show anything.
Is that why you used buffers?
Since I only need two user settings (image name and quote), only one in the example, I’d like to avoid a buffer for every chapter.

\startsetups FancyChapter
  \setupheadertexts[][][][]
  \doifnot{\structureuservariable{subtitle}}{}{
    \doifoddpageelse
      {\page[left]}
      {\donothing}
    {\definedfont[SerifItalic at 16pt]\structureuservariable{subtitle}\par}
    \externalfigure[dummy][width=\textwidth]
  }
  \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

\startchapter[title={My Fancy Story}]
[subtitle={\quotation{I thought that was real.}}]
\input tufte
\stopchapter

\startchapter[title={Another Fancy Story}]
[subtitle={\quotation{Never mind the bollocks.}}]
\input zapf
\stopchapter

\startchapter[title={Another Normal Text}]
\input knuth
\stopchapter

\stoptext


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
___________________________________________________________________________________

  parent reply	other threads:[~2020-01-12 13:40 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 [this message]
2020-01-12 15:07     ` Henning Hraban Ramm
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=BA1F59DC-F5E4-4CC2-9F02-2FC303B31AA3@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).