ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problems with headers using margintext alternative
@ 2017-07-23 19:48 Rik Kabel
  2017-07-29 14:52 ` Rik
  2017-07-29 17:10 ` Problems with heads " Pablo Rodriguez
  0 siblings, 2 replies; 10+ messages in thread
From: Rik Kabel @ 2017-07-23 19:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-07-30 13:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-23 19:48 Problems with headers using margintext alternative Rik Kabel
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

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).