From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/91199 Path: news.gmane.org!not-for-mail From: Rik Kabel Newsgroups: gmane.comp.tex.context Subject: Problem with margin figures and whitespace in text Date: Sat, 25 Apr 2015 21:32:11 -0400 Message-ID: <553C401B.9050406@rik.users.panix.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2118055127==" X-Trace: ger.gmane.org 1430012001 15263 80.91.229.3 (26 Apr 2015 01:33:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Apr 2015 01:33:21 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Apr 26 03:33:07 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YmBRQ-0007ph-Ow for gctc-ntg-context-518@m.gmane.org; Sun, 26 Apr 2015 03:33:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DB7F21020B for ; Sun, 26 Apr 2015 03:33:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id f-ovFVvSgV7K for ; Sun, 26 Apr 2015 03:33:01 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 2AD9710240 for ; Sun, 26 Apr 2015 03:32:31 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 964A61020B for ; Sun, 26 Apr 2015 03:32:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id dL4cVJXtJpQA for ; Sun, 26 Apr 2015 03:32:23 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id C1D65101E6 for ; Sun, 26 Apr 2015 03:32:16 +0200 (CEST) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t3Q1WEpm013318 for ; Sun, 26 Apr 2015 03:32:15 +0200 Original-Received: from [192.168.201.10] (cpe-67-240-48-174.nycap.res.rr.com [67.240.48.174]) by mailbackend.panix.com (Postfix) with ESMTPSA id 895F6121AE for ; Sat, 25 Apr 2015 21:32:13 -0400 (EDT) User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=166.84.1.89; country=US; region=New York; city=New York; latitude=40.7553; longitude=-73.9924; http://maps.google.com/maps?q=40.7553,-73.9924&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QOkpwe1a - 1816fba63f30 - 20150426 (trained as not-spam) Received-SPF: pass (filter2-ams.mf.surf.net: domain of context@rik.users.panix.com designates 166.84.1.89 as permitted sender) receiver=filter2-ams.mf.surf.net; client-ip=166.84.1.89; envelope-from=; helo=mailbackend.panix.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:91199 Archived-At: This is a multi-part message in MIME format. --===============2118055127== Content-Type: multipart/alternative; boundary="------------010902050507090201030303" This is a multi-part message in MIME format. --------------010902050507090201030303 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------010902050507090201030303 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=C2=A0=C2=A0 [dum]
%\showgrid
\setuplayout=C2=A0=C2=A0=C2=A0 [%grid=3Dyes,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 backspace=3D151pt,leftmargin=3D117pt]
\setupwhitespace[big]
\define\Paragraph{\startparagraph\input khatt-en\stopparagraph}
\starttext
{
=C2=A0 \subject{Start/stop paragraphs and figures}
=C2=A0 \subsubject{Group, extra whitespace}
=C2=A0 \Paragraph
=C2=A0 \Paragraph
=C2=A0 \begingroup
=C2=A0=C2=A0=C2=A0 \startplacefigure[location=3D{leftmargin,non= e}]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \externalfigure[A]
=C2=A0=C2=A0=C2=A0 \stopplacefigure
=C2=A0 \endgroup
=C2=A0 \Paragraph
=C2=A0 \Paragraph
=C2=A0 \subsubject{No group, no whitespace}
=C2=A0 \Paragraph
=C2=A0 \Paragraph
=C2=A0 \startplacefigure[location=3D{leftmargin,none}]
=C2=A0=C2=A0=C2=A0 \externalfigure[A]
=C2=A0 \stopplacefigure
=C2=A0 \Paragraph
=C2=A0 \Paragraph
=C2=A0 \Paragraph
}
=C2=A0 \page
{
=C2=A0 \subject{Start/stop paragraphs, traditional figures}
=C2=A0 \subsubject{Group, extra whitespace}
=C2=A0 \Paragraph
=C2=A0 \Paragraph
=C2=A0 {\placefigure[leftmargin,none]{}{\externalfigure[A]}}
=C2=A0 \Paragraph
=C2=A0 \Paragraph
=C2=A0 \subsubject{No group, no whitespace}
=C2=A0 \Paragraph
=C2=A0 \Paragraph
=C2=A0 \placefigure[leftmargin,none]{}{\externalfigure[A]}=
=C2=A0 \Paragraph
=C2=A0 \Paragraph
=C2=A0 \Paragraph
}
=C2=A0 \page
{
=C2=A0 \subject{Traditional paragraphs, start/stop figures}
=C2=A0 \subsubject{Group, extra whitespace}
=C2=A0 \input khatt-en\par
=C2=A0 \input khatt-en\par
=C2=A0 \begingroup% or \bgroup or {
=C2=A0=C2=A0=C2=A0 \startplacefigure[location=3D{leftmargin,non= e}]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \externalfigure[A]
=C2=A0=C2=A0=C2=A0 \stopplacefigure
=C2=A0 \endgroup% or \egroup or }
=C2=A0 \input khatt-en\par
=C2=A0 \input khatt-en\par
=C2=A0 \subsubject{Okay}
=C2=A0 \input khatt-en\par
=C2=A0 \input khatt-en\par
=C2=A0 \startplacefigure[location=3D{leftmargin,none}]
=C2=A0=C2=A0=C2=A0 \externalfigure[A]
=C2=A0 \stopplacefigure
=C2=A0 \input khatt-en\par
=C2=A0 \input khatt-en\par
=C2=A0 \input khatt-en\par
}
=C2=A0 \page
{
=C2=A0 \subject{Traditional paragraphs, traditional figures}
=C2=A0 \subsubject{Group, extra whitespace}
=C2=A0 \input khatt-en\par
=C2=A0 \input khatt-en\par
=C2=A0 {\placefigure[leftmargin,none]{}{\externalfigure[A]}}
=C2=A0 \input khatt-en\par
=C2=A0 \input khatt-en\par
=C2=A0 \subsubject{Okay}
=C2=A0 \input khatt-en\par
=C2=A0 \input khatt-en\par
=C2=A0 \placefigure[leftmargin,none]{}{\externalfigure[A]}=
=C2=A0 \input khatt-en\par
=C2=A0 \input khatt-en\par
=C2=A0 \input khatt-en\par
}
\stoptext
--
Rik
--------------010902050507090201030303-- --===============2118055127== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============2118055127==--