[NTG-context] Problem with margin figures and whitespace in text

Rik Kabel context at rik.users.panix.com
Sun Apr 26 03:32:11 CEST 2015


I have two problems with figures placed into the left or right margin. 
When the figure is in a group, extra whitespace is inserted between the 
paragraphs that precede and follow the placefigure command. This happens 
for figures placed by startplacefigure/stopplacefigure and tradiitonal 
placefigure commands, and paragraphs placed by 
startparagraph/stopparagraph or marked by par or newlines.

When the figure is not in a group, whitespace called for by 
\setupwhitespace is lost, except when the paragraphs are marked by 
traditional means. That is, whitespace is lost when 
startparagraph/stopparagraph is used.

Interestingly, when that is changed to bpar/epar, the problem for 
ungrouped figures disappears, but as I understand it, bpar/epar is not a 
real substitute for startparagraph/stopparagraph.

There is probably a simple explanation, but it eludes me. I prefer to be 
able to use startparagraph/stopparagraph, and it is sometimes desirable 
to place a figure into a group in order to prevent unique settings from 
leaking out.

The following should demonstrate the problem. Turning on grid setting 
makes it worse. I get the same result with current betas and older versions.

    \useMPlibrary   [dum]
    %\showgrid
    \setuplayout    [%grid=yes,
                      backspace=151pt,leftmargin=117pt]
    \setupwhitespace[big]
    \define\Paragraph{\startparagraph\input khatt-en\stopparagraph}
    \starttext
    {
       \subject{Start/stop paragraphs and figures}
       \subsubject{Group, extra whitespace}
       \Paragraph
       \Paragraph
       \begingroup
         \startplacefigure[location={leftmargin,none}]
           \externalfigure[A]
         \stopplacefigure
       \endgroup
       \Paragraph
       \Paragraph
       \subsubject{No group, no whitespace}
       \Paragraph
       \Paragraph
       \startplacefigure[location={leftmargin,none}]
         \externalfigure[A]
       \stopplacefigure
       \Paragraph
       \Paragraph
       \Paragraph
    }
       \page
    {
       \subject{Start/stop paragraphs, traditional figures}
       \subsubject{Group, extra whitespace}
       \Paragraph
       \Paragraph
       {\placefigure[leftmargin,none]{}{\externalfigure[A]}}
       \Paragraph
       \Paragraph
       \subsubject{No group, no whitespace}
       \Paragraph
       \Paragraph
       \placefigure[leftmargin,none]{}{\externalfigure[A]}
       \Paragraph
       \Paragraph
       \Paragraph
    }
       \page
    {
       \subject{Traditional paragraphs, start/stop figures}
       \subsubject{Group, extra whitespace}
       \input khatt-en\par
       \input khatt-en\par
       \begingroup% or \bgroup or {
         \startplacefigure[location={leftmargin,none}]
           \externalfigure[A]
         \stopplacefigure
       \endgroup% or \egroup or }
       \input khatt-en\par
       \input khatt-en\par
       \subsubject{Okay}
       \input khatt-en\par
       \input khatt-en\par
       \startplacefigure[location={leftmargin,none}]
         \externalfigure[A]
       \stopplacefigure
       \input khatt-en\par
       \input khatt-en\par
       \input khatt-en\par
    }
       \page
    {
       \subject{Traditional paragraphs, traditional figures}
       \subsubject{Group, extra whitespace}
       \input khatt-en\par
       \input khatt-en\par
       {\placefigure[leftmargin,none]{}{\externalfigure[A]}}
       \input khatt-en\par
       \input khatt-en\par
       \subsubject{Okay}
       \input khatt-en\par
       \input khatt-en\par
       \placefigure[leftmargin,none]{}{\externalfigure[A]}
       \input khatt-en\par
       \input khatt-en\par
       \input khatt-en\par
    }
    \stoptext

-- 
Rik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150425/7d6f5175/attachment-0001.html>


More information about the ntg-context mailing list