From: Rik Kabel <context@rik.users.panix.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Problems with headers using margintext alternative
Date: Sun, 23 Jul 2017 15:48:13 -0400 [thread overview]
Message-ID: <dd5e8654-de68-ad81-2f57-41d0cbc69ec4@rik.users.panix.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 4845 bytes --]
The following example demonstrates two problems with
alternative=margintext in \setuphead:
1. When used with start/stop sectioning, text following the title may
be set on the wrong line.
2. Without regard to the type of sectioning, margintext titles may
spill over the left edge of the margin and beyond the page frame.
\setuppapersize
[letter]
[letter,oversized]
\setuplayout
[location={middle,middle}]
\showframe
\setuphead
[chapter]
[number=no,
alternative=inmargin]
\setuphead
[section]
[
alternative=margintext,
insidesection={\blank[-line]},
]
\starttext
\starttitle
[title={Problem description}]
\bgroup
\setupwhitespace[medium]
\startparagraph
This demonstrates two problems with
\type{alternative=margintext} in \tex{setuphead}:
\startitemize[packed,n]
\startitem
When used with start/stop sectioning, text following the
title may be set on the wrong line.
\stopitem
\startitem
Without regard to the type of sectioning, \type{margintext}
titles may spill over the left edge of the margin and beyond
the page frame. (Oddly, \tex{paperwidth} is less than the
sum of \tex{makeupwidth} and the margin widths and
distances for both letter and A4 paper.)
\stopitem
\stopitemize
\stopparagraph
\startparagraph
With start/stop sectioning, the text following the section
title may begin one line below the start of the title. That
can be remedied if there is no whitespace between paragraphs
with \type{insidesection={\blank[-line]}}, but the remedy
fails when there is whitespace, and increasing the correction
has no effect. With traditional sectioning, the text appears
baseline|-|aligned with the heading, as expected. The
the correction has no effect in any case with traditional
sectioning.
\stopparagraph
\startparagraph
It makes no difference in any test how the paragraphs are
delimited—blank lines, \tex{bpar}/\tex{epar},
\tex{startparagraph}/\tex{stopparagraph}, or \tex{par}.
\stopparagraph
\startparagraph
Tested with standalone beta 2017.07.17 00:20.
\stopparagraph
\egroup
\page
\startchapter
[title={Start/stop sectioning}]
\startsection[title={Mis\-cel\-la\-neous quo\-ta\-tions}]
\startparagraph
\input jojomayer
\stopparagraph
\startparagraph
\input carrol \wordright{No indent no whitespace.}
\stopparagraph
\stopsection
\bgroup
\setupwhitespace[medium]
\startsection[title={Miscellaneous quotations}]
\startparagraph
\input jojomayer
\stopparagraph
\startparagraph
\input carrol \wordright{No indent medium whitespace.}
\stopparagraph
\stopsection
\egroup
\bgroup
\setupindenting[yes,small]
\startsection[title={Miscellaneous quotations}]
\startparagraph
\input jojomayer
\stopparagraph
\startparagraph
\input carrol \wordright{Small indent no whitespace.}
\stopparagraph
\stopsection
\egroup
\bgroup
\setupwhitespace[medium]
\setupindenting[yes,small]
\startsection[title={Miscellaneous quotations}]
\startparagraph
\input jojomayer
\stopparagraph
\startparagraph
\input carrol \wordright{Small indent medium whitespace.}
\stopparagraph
\stopsection
\egroup
\stopchapter
\chapter{Traditional sectioning}
\section{Mis\-cel\-la\-neous quo\-ta\-tions}
\input jojomayer \par
\input carrol \wordright{No indent no whitespace.} \par
No indent no whitespace. \par
\bgroup
\setupwhitespace[medium]
\section{Miscellaneous quotations}
\input jojomayer \par
\input carrol \wordright{No indent medium whitespace.} \par
\egroup
\bgroup
\setupindenting[yes,small]
\section{Miscellaneous quotations}
\input jojomayer \par
\input carrol \wordright{Small indent no whitespace.} \par
\egroup
\bgroup
\setupwhitespace[medium]
\setupindenting[yes,small]
\section{Miscellaneous quotations}
\input jojomayer \par
\input carrol \wordright{Small indent medium whitespace.} \par
\egroup
\showlayout
\stoptext
--
Rik
[-- Attachment #1.2: Type: text/html, Size: 7465 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2017-07-23 19:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-23 19:48 Rik Kabel [this message]
2017-07-29 14:52 ` Rik
2017-07-29 16:18 ` Willi Egger
2017-07-29 17:10 ` Problems with heads " Pablo Rodriguez
2017-07-29 17:34 ` Rik
2017-07-29 18:18 ` Pablo Rodriguez
2017-07-29 18:40 ` Rik Kabel
2017-07-29 21:44 ` Hans Hagen
2017-07-30 7:30 ` Pablo Rodriguez
2017-07-30 13:38 ` Hans Hagen
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=dd5e8654-de68-ad81-2f57-41d0cbc69ec4@rik.users.panix.com \
--to=context@rik.users.panix.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).