From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Let chapter start on odd page and make the even page before show an image
Date: Fri, 29 May 2020 22:13:16 +0200 [thread overview]
Message-ID: <C4EA002F-49B8-4D37-AB5B-924E8823B877@fiee.net> (raw)
In-Reply-To: <c9126a4d-3dc1-b5a2-5aed-19c2ee410910@mailbox.org>
In a similar setup I wanted to start every chapter with image and short vita the author and came up with the following (of course not without help from our wizards):
\definefont[ChapterFont][Sans*default at 30pt]
\startsetups normalheader
% default numbers of my bodyfont are oldstyle
\setupheadertexts[chapter][{\addff{normnum}\pagenumber}][{\addff{normnum}\pagenumber}][]
\stopsetups
\startsetups noheader
\setupheadertexts[][][][]
\stopsetups
\startsetups bigchapter
\setupalign[flushleft,hz,hanging,verytolerant,nothyphenated]
\doifelse{\structureuservariable{image}}{}{% if image empty
}{%
\directsetup{noheader}
\vbox{%
{\ChapterFont\structurevariable{title}\par}%
\blank[big]
\externalfigure[img/\structureuservariable{image}][width=0.8\textwidth]\par
}
\doifnot{\structureuservariable{vita}}{}{% if vita
\vfill
\vbox{%
{\tf\ss\structureuservariable{vita}}
}%
}%
\page[right]
\vbox{%
\doifnot{\structureuservariable{subtitle}}{}{% if subtitle
{\definedfont[SerifItalic*eka at 30pt]\structureuservariable{subtitle}}
}%
}%
}%
\blank[3*big]
\directsetup{normalheader}
\setupalign[width,hz,hanging,hyphenated]% reset alignment
\stopsetups
\setuphead[chapter][
page=left,
number=no,
command=\gobbletwoarguments,
before=,
after={\directsetup{bigchapter}},
style={\ChapterFont},
]
This is the result:
https://www.dreiviertelhaus.de/editionka/lauf-los-buch/
(see preview images linked at the bottom)
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-05-29 20:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-29 8:29 juh
2020-05-29 10:45 ` Wolfgang Schuster
2020-05-29 13:10 ` Jan U. Hasecke
2020-05-29 13:35 ` Wolfgang Schuster
2020-05-29 15:42 ` Jan U. Hasecke
2020-05-29 16:03 ` Aditya Mahajan
2020-05-29 17:27 ` Jan U. Hasecke
2020-05-29 20:13 ` Henning Hraban Ramm [this message]
2020-05-29 20:18 ` Aditya Mahajan
2020-05-29 21:20 ` Henning Hraban Ramm
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=C4EA002F-49B8-4D37-AB5B-924E8823B877@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).