From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Grey background for pages belonging to last section of every chapter
Date: Fri, 30 Jan 2015 20:05:01 +0100 [thread overview]
Message-ID: <2DDCC73C-2FCE-4D38-8DAF-932ECDCCC31A@gmail.com> (raw)
In-Reply-To: <c241db2a4dfeaed14ce104d22e71f0ec.squirrel@webmail.xs4all.nl>
[-- Attachment #1.1: Type: text/plain, Size: 2736 bytes --]
> Am 30.01.2015 um 19:28 schrieb Rob Heusdens <robheus@xs4all.nl>:
>
>> Use text backgrounds.
>>
>> \definetextbackground
>> [SummaryBackground]
>> [frame=off,
>> background=color,
>> backgroundcolor=gray]
>>
>> \definehead[summary][section]
>>
>> \setuphead
>> [summary]
>> [before=,
>> beforesection={\blank\starttextbackground[SummaryBackground]},
>> aftersection={\stoptextbackground\blank}]
>>
>> \starttext
>>
>> \startsection[title=Knuth]
>>
>> \input{knuth}
>>
>> \stopsection
>>
>> \startsummary[title=Zapf]
>>
>> \input{zapf}
>>
>> \stopsummary
>>
>> \stoptext
>>
>> Wolfgang
>
> Hello Wolfgang,
>
> Your example works. After adjusting the \summary to using \startsummary,
> \stopsummary, and using your code, with only minor additions, as below:
>
> \definetextbackground
> [SummaryBackground]
> [frame=off,
> background=color,
> backgroundcolor=gray,
> backgroundoffset=2ex] % <- added
>
> \definehead[summary][section]
>
> \setuphead[summary]
> [number=no, % <- added
> style=bold, % <- added
> before=,
> beforesection={\page\starttextbackground[SummaryBackground]}, % <-
> changed \blank to \page
> aftersection={\stoptextbackground\page}] % <- changed \blank to \page
>
> I get some unwanted result. See the picture.
>
> The bold does not show up, and a small portion of the topleft corner of
> the background frame is missing....
>
> Changing bold to italic also has no effect.
>
> Something strange....
>
> Also trying with \blank instead of \page, the background then starts right
> after the previous section, and it seems the indentation causes the
> missing background on the first line.
>
> So I placed "\noindentation\page" into beforesection (replacing \blank)
> and get the background result I want, but still the bold is missing in the
> summary title, and too much whitespace appears before the section title.
>
> The title should be placed in the same position as normal text would
> appear (and as a side note: in fact I am copying a style that was used in
> a printed book that I typeset, in which each section title - except for
> the summary - is just a normal sentence (or 2) typeset bold, with the rest
> of the text appearing after the section title just as after a normal
> sentence, so no vertical space between title and first sentence of the
> section. Since it appears in the content also, I had to use section
> commands, but is this behaviour duplicatable using setuphead for section?)
>
>
> How can I adjust that?
Make a working minimal example which shows the problem because I’cant
reproduce the problems you mention.
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 34815 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
___________________________________________________________________________________
next prev parent reply other threads:[~2015-01-30 19:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-30 15:13 Rob Heusdens
2015-01-30 16:18 ` Rob Heusdens
2015-01-30 16:34 ` Wolfgang Schuster
2015-01-30 17:17 ` Rob Heusdens
2015-01-30 17:27 ` Wolfgang Schuster
2015-01-30 18:28 ` Rob Heusdens
2015-01-30 19:05 ` Wolfgang Schuster [this message]
2015-01-30 20:36 ` Rob Heusdens
2015-01-30 20:43 ` Rob Heusdens
2015-02-02 11:51 ` Wolfgang Schuster
2015-02-02 13:00 ` TOC with " Keith J. Schultz
2015-02-02 22:23 ` 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=2DDCC73C-2FCE-4D38-8DAF-932ECDCCC31A@gmail.com \
--to=schuster.wolfgang@gmail.com \
--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).