From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107749 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: wrong page for annotation and \pagenumber Date: Tue, 16 Jun 2020 13:46:28 -0400 (EDT) Message-ID: References: <0d1a5210-14d6-855d-2d17-d262414379da@gmx.es> <20200616025302.GA102677@nan> <29be14b9-d39a-c918-d227-49221e32b578@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1510156531-1592329588=:1528" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="24857"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Alpine 2.22 (LNX 432 2020-05-21) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jun 16 19:46:52 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlFfg-0006MQ-8v for gctc-ntg-context-518@m.gmane-mx.org; Tue, 16 Jun 2020 19:46:52 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B854D1632DA; Tue, 16 Jun 2020 19:46:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hfvupw6h76vh; Tue, 16 Jun 2020 19:46:32 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A39C01631E4; Tue, 16 Jun 2020 19:46:32 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 95AFE1631E4 for ; Tue, 16 Jun 2020 19:46:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r_DMnQ4wtMfi for ; Tue, 16 Jun 2020 19:46:30 +0200 (CEST) Received-SPF: Softfail (mailfrom) identity=mailfrom; client-ip=132.206.73.2; helo=orford.cim.mcgill.ca; envelope-from=adityam@umich.edu; receiver= Original-Received: from orford.cim.mcgill.ca (smtp.cim.mcgill.ca [132.206.73.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id C8AB916099A for ; Tue, 16 Jun 2020 19:46:30 +0200 (CEST) Original-Received: from adi-thinkpad.local (198-84-255-218.cpe.teksavvy.com [198.84.255.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adityam) by orford.cim.mcgill.ca (Postfix) with ESMTPSA id EFCFAFA6C2 for ; Tue, 16 Jun 2020 13:46:27 -0400 (EDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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.io gmane.comp.tex.context:107749 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1510156531-1592329588=:1528 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 16 Jun 2020, Pablo Rodriguez wrote: > On 6/16/20 4:58 PM, Wolfgang Schuster wrote: >> Pablo Rodriguez schrieb am 16.06.2020 um 16:31: >>> [...] >>> I=E2=80=99m afraid that you get the same result, so there may be a bug = there. >> >> There is no bug. When you take a look at my pagenumber example you see a >> few lines at the top show the number of the previous page, this happens >> because TeX collects more than necessary which means in your example >> above the layer is placed when TeX was still on the first page. > > Many thanks for your reply, Wolfgang. > > I=E2=80=99m afraid that TeX is too tricky for me in that case (or I simpl= y think > that it is misbehaving there). > >> In your example you can add \testpage to \section to force a page break >> when there isn't enough space available to place the heading, this moves >> also the layer placement to the next page. > > I=E2=80=99m afraid this doesn=E2=80=99t work with my real document. > > I need another approach. This sample reflects my problem: > > \setupinteraction[state=3Dstart] > %~ \showframe\showgrid > \starttext > \dorecurse{41}{one line\par} > > \ \comment[location=3D{rightmargin}]{comment} > \stoptext > > Since layers are problematic for the task, I insert the comments right > after the text (which actually comes from \xmlflush{#1} [XML sources]). > > I=E2=80=99m afraid that the paragraph before \comment comes from \xmlflus= h, so I > cannot avoid it. > > This is unproblematic for most cases, but the sample above displays the > problem of adding a comment in a new paragraph. It might add a new page. > > To avoid this issue: how could I prevent the pagebreak before \comment > and the addition of a pagebreak above? > > If that were possible, I could add a \blank[-2*line] that would place > the comment right. Try \removeunwantedwhitespace or \blank[samepage] Aditya --8323329-1510156531-1592329588=:1528 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --8323329-1510156531-1592329588=:1528--