From: Hans Hagen <pragma@wxs.nl>
Subject: Re: \in{hyperref}[tableref] at first char of line causes misplaced paragraph
Date: Thu, 11 Nov 2004 18:25:46 +0100 [thread overview]
Message-ID: <4193A09A.40201@wxs.nl> (raw)
In-Reply-To: <E0B880DE-3402-11D9-855B-0003938543A0@dircon.co.uk>
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
-----------------------------------------------------------------
prev parent reply other threads:[~2004-11-11 17:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-11 16:58 Nigel King
2004-11-11 17:25 ` Hans Hagen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4193A09A.40201@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).