Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id q08AYxiV026251 for ; Sun, 8 Jan 2012 11:35:00 +0100 Received: (qmail 30024 invoked by alias); 8 Jan 2012 10:34:54 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 08 Jan 2012 10:34:54 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx037) with SMTP; 08 Jan 2012 11:34:54 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id q08AWSHo028997 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 Jan 2012 11:32:28 +0100 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id q07N14wr011115; Sun, 8 Jan 2012 11:32:27 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1924784 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sun, 8 Jan 2012 11:32:27 +0100 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id q08AWRfw004737 for ; Sun, 8 Jan 2012 11:32:27 +0100 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id q08AWHY6028964 for ; Sun, 8 Jan 2012 11:32:20 +0100 Received: from mittelbach-online.de (p3EE3FE18.dip.t-dialin.net [62.227.254.24]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0LwIKE-1SnJex0FeI-0184oA; Sun, 08 Jan 2012 11:32:17 +0100 Received: by mittelbach-online.de (Postfix, from userid 783) id 17B429409E4; Sun, 8 Jan 2012 11:32:13 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on Marlowe X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED,AWL autolearn=unavailable version=3.2.5 Received: from [127.0.0.1] (unknown [192.168.123.100]) (Authenticated sender: frank) by mittelbach-online.de (Postfix) with ESMTPSA id 525E59409E1 for ; Sun, 8 Jan 2012 11:32:10 +0100 (CET) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 120107-1, 07.01.2012), Outbound message X-Antivirus-Status: Clean X-Provags-ID: V02:K0:Da9BPWZOiFxYdLbDcsLdZaf/nhNeo/Xon467NpnVyQU nRIhAUv58aHCIUUcApeLAW1bYUjT1dp7lKzy0nYq3MUePByRSc r6tL/eb84F29Uap+Vt5n+HUH48bDdZW5rWCCJH+AprFvg+Tv5k lcxUd7eGVtqCYOrnqkhmwCgPk8ppBIzg+s1G9Epts1SyffcZnA Il9WjzMRrwwulv1Q2fuZ820HbSLYC1Ahos2cDBz7Vwgmm6Acgo flHfocsaFfmSAVVdxGpS6QnJVMFbX+pxfxMTEI6gUCldQzAdvD 6L2O6iSXA7Y7Jl6/AoptfhM3otR6rKT10Rs512p7uQYDPecE9/ NGlFqnrg6NgFwUiOf/omSVE1iTOmrkiLz/fZRWiJJ Message-ID: <4F0970A8.3040503@latex-project.org> Date: Sun, 8 Jan 2012 11:32:08 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Frank Mittelbach Subject: trial typesetting support To: LATEX-L@listserv.uni-heidelberg.de Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (eXpurgate); Detail=5D7Q89H36p5x1RWm4Ldx8pHNe5ytInNcxGfr2yHbdZ282A+Lr4Oy1Yiqszm2aQJNoZYlm T1i5+EXmk9sH0gRq+VnDhy7oQsfw4FOE+8EkTGiVl+fcZMS+Y2C6UU8OFgkkK5CyTILUCsqD9DLX HXFp7AuNaHxRBwVq/1cFQfZch1SD30zbyaTbkIBxk5WNYSuyF0l+1KZAaE=V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6984 I just had a look into the following question on TeX.sx: http://tex.stackexchange.com/questions/40330/centered-captions-containing-vref-may-not-always-appear-as-expected The issue here is the following code: \long\def\@makecaption#1#2{% \vskip\abovecaptionskip \sbox\@tempboxa{#1: #2}% \ifdim \wd\@tempboxa >\hsize #1: #2\par \else \global \@minipagefalse \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip} The problem is that this code trial typesets the caption as \sbox\@tempboxa{#1: #2} but then is not using it if the line is getting to long but instead uses #1: #2\par. If however the line is short enough it reuses the box. There are some reason for doing this (I mean not reusing the box in the multi-line version) as this has other deficiencies, but together with varioref this produces a problem. The problem being that varioref internally increments some counters to add label names and those are then never written to the aux file with bad results (basically a \vref may pick up the wrong information) I wonder if this isn't a more general issue which needs addressing by providing some "trial area" where you can go \trial_start: ... do the trial \trial_end: where changes to counters dimensions etc are being stored away and returned back to their previous values afterwards. what you would need then is a way to flag certain variables for this trial usage so that they can be properly saved and restored. I think I remember that Michael Downes at one time wrote code for this for amsmath to manage labels and the like appearing in places like \mathchoice or in environments that do several trial typesettings to determine placement. A brute force solution (but most certainly wrong with more complication structures in the caption) would be \long\def\@makecaption#1#2{% \vskip\abovecaptionskip \sbox\@tempboxa{\globaldefs=-1\relax #1: #2}% \ifdim \wd\@tempboxa >\hsize #1: #2\par \else \global \@minipagefalse \hb@xt@\hsize{\hfil #1: #2\hfil}% \fi \vskip\belowcaptionskip} ie make all mods local in the trial and then retypeset the whole thing in both cases. But it is not difficult to see who this dies a different death depending on input. Anybody some good ideas how to address topic this in a general fashion? frank