From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/87996 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: underbraces get progressively more misaligned (w/ minimal example) Date: Fri, 4 Jul 2014 00:47:29 +0200 Message-ID: References: <87d2dsnhui.fsf@approx.mit.edu> <877g40nhcl.fsf@approx.mit.edu> <87k37u7m4e.fsf@approx.mit.edu> <66D45391-7643-4952-BF98-7439FCEC856B@gmail.com> <87a98q40ks.fsf@approx.mit.edu> <53B5D497.1040108@wxs.nl> <871tu23w7e.fsf@approx.mit.edu> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1633228950==" X-Trace: ger.gmane.org 1404427680 26062 80.91.229.3 (3 Jul 2014 22:48:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Jul 2014 22:48:00 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jul 04 00:47:56 2014 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 1X2pnH-0000Hd-GX for gctc-ntg-context-518@m.gmane.org; Fri, 04 Jul 2014 00:47:55 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 08E4410221 for ; Fri, 4 Jul 2014 00:47:55 +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 wRkcPiIAXYJQ for ; Fri, 4 Jul 2014 00:47:54 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 3731910225 for ; Fri, 4 Jul 2014 00:47:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E27F9101E8 for ; Fri, 4 Jul 2014 00:47:41 +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 iAVxxaE+-AFF for ; Fri, 4 Jul 2014 00:47:37 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 4A90C101E7 for ; Fri, 4 Jul 2014 00:47:32 +0200 (CEST) Original-Received: from mail-qg0-x22f.google.com (mail-qg0-x22f.google.com [IPv6:2607:f8b0:400d:c04::22f]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s63MlUqV011832 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 4 Jul 2014 00:47:31 +0200 Original-Received: by mail-qg0-f47.google.com with SMTP id q108so811175qgd.20 for ; Thu, 03 Jul 2014 15:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=voIAagpOG/wCs0e4G7eWB26t5/+AXbz6wmEoeN4sbjc=; b=uaNM1YcjwcVPYSOZZPtLlxt89GHQ2Z3L32sm2tVePKh7upCZhxQRjpjdKukyaTiip3 USTGjMvxfvlZ0Ov8rBfLsqsIlmPlv0Zhcget+ordBDoS3ViV1tZUS0hAuNz0wosjtowO +u726IP7LhVO7c5Io3jYZx+o3G7gLJnVE1/ij+0ivedlIEd2gfaG/TneKdswBg8vRv9D EqgZaW6/n3n1xf4dQ/om44HUmAMbrV1SeHJLTBKwD9Tx7jg+wTN2UX0hZCHyMB8iXMPo +teDwpLrjijVDxZ1oL06Qfu0/DN6wvm20SAawVTDtelN3iRBdk2YVF63j20tgOt7+NAv 8tig== X-Received: by 10.140.86.139 with SMTP id p11mr12041917qgd.66.1404427649964; Thu, 03 Jul 2014 15:47:29 -0700 (PDT) Original-Received: by 10.140.26.40 with HTTP; Thu, 3 Jul 2014 15:47:29 -0700 (PDT) In-Reply-To: <871tu23w7e.fsf@approx.mit.edu> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2607:f8b0:400d:c04::22f; country=US X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03MlWLvTI - 2624ab03b51f - 20140704 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:87996 Archived-At: --===============1633228950== Content-Type: multipart/alternative; boundary=001a11c13e94305f0a04fd51cbc1 --001a11c13e94305f0a04fd51cbc1 Content-Type: text/plain; charset=UTF-8 On Fri, Jul 4, 2014 at 12:37 AM, Sanjoy Mahajan wrote: > > context --make does a --generate so you can skip that and the luatools > > run is not needed either (selfupdate is seldom needed too) > > So 'context --make' is all one needs? I'll update the wiki. > > > we get a .5pt height difference somewhere (nothing else different in a > > trace) ... smells like a luatex bug (testing that now) > > That is my suspicion as well. But I couldn't reproduce it with plain > luatex. Though maybe I needed to use equation numbers, however that is > done in plain tex (the context run doesn't show the problem without the > \placeformula). > > I suspect some internal state is getting slightly corrupted and getting > progressively worse with the 30,000 repetitions. > > I've been finding many unexplained 0.5pt or so differences, which may be > related to the underbrace problem. The context, so to speak, is that I > am putting in the last edits to the book, after having gone through and > checked every page many times. So I want to ensure that none of the > small changes has a big effect, but I don't want to check every page > again (or I'll vomit). > > Thus, I run my compare-pdfs.sh script on the previous and the latest > pdf. It renders each page to a B/W png (using mupdf) and then compares > corresponding pages using 'compare' (one of the ImageMagick tools). Any > differing pixels are in red, and the shared pixels are in very light > gray. Then all the pages with enough differences are viewed with 'feh', > in order of most-to-least differences. And I check that nothing major > has changed. > > What I keep finding is that pages long after where I make a small change > somehow get changed, with roughly one-pixel shifts to parts of the page. > I'm attaching an example pixel diff. It shows changes on p.72 of the > mss. However, the only change to the source code was on p.58 (and was > designed not to change any page breaks, which it didn't). That same > page (p.72) often gets similar changes with all kinds of small changes. > > [Note to me: In case I need to recreate the source for debugging > purposes, it's the change from rev 41ff54 to 2467d5] > > In case the script is useful to others (earlier versions are in the > contexttest repository somewhere), I am attaching it. I use it as > follows with a bash command line. (The awk in the pipeline makes sure > that only pages with some difference make it to the viewer.) > > DPI=72 compare-pdfs.sh old.pdf new.pdf | tee book-print.compare72dpi | awk > '{if (($3 > 0.02)) print;}' | sort -nr -k3 | awk '{print $1}' | xargs -r feh > > Thank you for the script. Under linux you can also try diffpdf $> aptitude search diffpdf i diffpdf - compare two PDF files textually or visually p diffpdf:i386 - compare two PDF files textually or visually -- luigi --001a11c13e94305f0a04fd51cbc1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



On Fri, Jul 4, 2014 at 12:37 AM, Sanjoy Mahajan &= lt;sanjoy@mit.edu&g= t; wrote:
> context --make does a --generate so y= ou can skip that and the luatools
> run is not needed either (selfupdate is seldom needed too)

So 'context --make' is all one needs? =C2=A0I'll update t= he wiki.

> we get a .5pt height difference somewhere (nothing else different in a=
> trace) ... smells like a luatex bug (testing that now)

That is my suspicion as well. =C2=A0But I couldn't reproduce it w= ith plain
luatex. =C2=A0Though maybe I needed to use equation numbers, however that i= s
done in plain tex (the context run doesn't show the problem without the=
\placeformula).

I suspect some internal state is getting slightly corrupted and getting
progressively worse with the 30,000 repetitions.

I've been finding many unexplained 0.5pt or so differences, which may b= e
related to the underbrace problem. =C2=A0The context, so to speak, is that = I
am putting in the last edits to the book, after having gone through and
checked every page many times. =C2=A0So I want to ensure that none of the small changes has a big effect, but I don't want to check every page again (or I'll vomit).

Thus, I run my compare-pdfs.sh script on the previous and the latest
pdf. It renders each page to a B/W png (using mupdf) and then compares
corresponding pages using 'compare' (one of the ImageMagick tools).= =C2=A0Any
differing pixels are in red, and the shared pixels are in very light
gray. =C2=A0Then all the pages with enough differences are viewed with '= ;feh',
in order of most-to-least differences. =C2=A0And I check that nothing major=
has changed.

What I keep finding is that pages long after where I make a small change somehow get changed, with roughly one-pixel shifts to parts of the page. I'm attaching an example pixel diff. =C2=A0It shows changes on p.72 of = the
mss. =C2=A0However, the only change to the source code was on p.58 (and was=
designed not to change any page breaks, which it didn't). =C2=A0That sa= me
page (p.72) often gets similar changes with all kinds of small changes.

[Note to me: In case I need to recreate the source for debugging
purposes, it's the change from rev 41ff54 to 2467d5]

In case the script is useful to others (earlier versions are in the
contexttest repository somewhere), I am attaching it. =C2=A0I use it as
follows with a bash command line. =C2=A0(The awk in the pipeline makes sure=
that only pages with some difference make it to the viewer.)

DPI=3D72 compare-pdfs.sh old.pdf new.pdf | tee book-print.compare72dpi | aw= k '{if (($3 > 0.02)) print;}' | sort -nr -k3 | awk '{print $= 1}' | xargs -r feh

Thank you for the script.
Under linux you can also try diffpdf<= /div>
$> aptitude search diffpdf=C2=A0
i =C2=A0 diffp= df =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 =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 =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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 - compare two PDF f= iles textually or visually =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 =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 =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
p =C2=A0 diffpdf:i386 =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 =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 =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 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- compare two= PDF files textually or visually =C2=A0
=C2=A0
<= div>
--
luigi
--001a11c13e94305f0a04fd51cbc1-- --===============1633228950== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1633228950==--