From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/17025 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: \in{hyperref}[tableref] at first char of line causes misplaced paragraph Date: Thu, 11 Nov 2004 18:25:46 +0100 Message-ID: <4193A09A.40201@wxs.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1100194171 4066 80.91.229.6 (11 Nov 2004 17:29:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Nov 2004 17:29:31 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 11 18:29:15 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CSIl1-0001wb-00 for ; Thu, 11 Nov 2004 18:29:15 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D5F78127DA; Thu, 11 Nov 2004 18:29:14 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08416-09; Thu, 11 Nov 2004 18:29:14 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A9F0E127DD; Thu, 11 Nov 2004 18:25:49 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5794B127DD for ; Thu, 11 Nov 2004 18:25:48 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08416-07 for ; Thu, 11 Nov 2004 18:25:47 +0100 (CET) Original-Received: from mailrelay02.solcon.nl (unknown [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id 9763A1276C for ; Thu, 11 Nov 2004 18:25:47 +0100 (CET) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay02.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id iABHPhE7017657 for ; Thu, 11 Nov 2004 18:25:43 +0100 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id DA0B12D237; Thu, 11 Nov 2004 18:25:46 +0100 (CET) Original-Received: from [10.100.1.191] (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 82C3D2C59A for ; Thu, 11 Nov 2004 17:25:45 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: X-Virus-Scanned: ClamAV 0.80/540/Tue Oct 19 14:59:23 2004 clamav-milter version 0.80j on mailrelay02 X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:17025 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:17025 Nigel King wrote: > Hi, > This has bugged me for a number of years and I have only just realised > the exact cause. Previous requests to solve table and figure spacing > problems are all due to this I think. Basically the hyperreference in > the first character of a paragraph mangles the paragraph formatting. > > Below is a minimum (I think) file which demonstrates the problem very > clearly. > > \setupinteraction[state=start] > \setupwhitespace[big] > \starttext > \input tufte > \startbuffer[] > \bTABLE[width=2.5in] > \bTR \bTD \input tufte \eTD\eTR > \eTABLE > \stopbuffer > \placetable > [right] > [tab:1] > {A Table} > {\getbuffer[]} > \input tufte > > \in{Table}[tab:1] this paragraph does not format correctly because the > hypereference is at the first character of the paragraph. Note that the > spacing (before) is incorrect as well as the width. > > T\in{able}[tab:1] this paragraph does format correctly because the > hypereference is not using the first character of the paragraph. > > \input tufte > \stoptext add this to cont-new.tex \newbox\@@dlhbox \def\dontleavehmode {\ifhmode\else \ifmmode\else \setbox\@@dlhbox\hbox {\mathsurround\zeropoint\everymath\emptytoks$ $}\unhbox\@@dlhbox \fi \fi} and test this on all kind of docs! I'm not that sure about the patch. The reason for this is that we cannot use \noindent or \indent and \leavevmode. Future versions of pdftex will provide \quitvmode for this purpose, which has no side effects. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------