Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Mon, 17 Mar 2008 00:55:02 +0100 Received: by mail.proteosys.com (8.13.8/8.13.8) with ESMTP id m2GNsxgN017224 for ; Mon, 17 Mar 2008 00:54:59 +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 m2GNoPFc001521 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 Mar 2008 00:50:25 +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 m2GN1Gn2023745; Mon, 17 Mar 2008 00:50:17 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 209612 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 17 Mar 2008 00:50:17 +0100 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id m2GNoGFJ024681 for ; Mon, 17 Mar 2008 00:50:16 +0100 Received: from fmmailgate01.web.de (fmmailgate01.web.de [217.72.192.221]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id m2GNnxNA024920 for ; Mon, 17 Mar 2008 00:50:03 +0100 Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate01.web.de (Postfix) with ESMTP id AC625D7352C6; Mon, 17 Mar 2008 00:50:00 +0100 (CET) Received: from [89.51.181.144] (helo=uwe.lueck) by smtp08.web.de with esmtp (SSLv3:DES-CBC3-SHA:168) (WEB.DE 4.109 #226) id 1Jb2c1-0001uZ-00; Mon, 17 Mar 2008 00:49:57 +0100 X-Sender: uwe.lueck@pop3.web.de X-Mailer: QUALCOMM Windows Eudora Version 5.1 References: <18385.42387.268037.81145@morse.mittelbach-online.de> <85wsoeto1k.fsf@lola.goethe.zz> <18385.42387.268037.81145@morse.mittelbach-online.de> <5.1.0.14.0.20080310115827.01e05a70@pop3.web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed X-Sender: uwe.lueck@web.de X-Provags-ID: V01U2FsdGVkX187SuzeGh4znZnBTfNL/U96ytFR7qerPFovE0W4 kCP4n1dJwup6KGp9m2hp1Q+13DF1qF/bgOXlnkJ696mqP3v0U0 l9xTol5zo= Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id m2GNoHFJ024682 Message-ID: <5.1.0.14.0.20080312161539.02aed020@pop3.web.de> Date: Mon, 17 Mar 2008 00:46:17 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Uwe =?iso-8859-1?Q?L=FCck?= Subject: many labels (was: A really, really bad bug.) To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <85zlt66pus.fsf_-_@lola.goethe.zz> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -2.464 () BAYES_00,FORGED_RCVD_HELO X-Scanned-By: MIMEDefang 2.64 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 16 Mar 2008 23:55:02.0302 (UTC) FILETIME=[266AA3E0:01C887C1] Status: R X-Status: X-Keywords: X-UID: 5188 1st: I suppose the discussion about the STRANGE GROUP in \enddocument -- embracing the final processing of .aux files, challenging save stack size in case there are thousands of (internally generated) labels -- is missing on the LaTeX BUG DATABASE. (Is there a Kastrup way to LaTeX bug reports?) 2nd: Bill Hammond and I supported David Kastrup's view that the problem is RELEVANT, pointing at large CRITICAL EDITIONS.[1] Now David Kastrup has told us that he has equipped his PERPAGE.STY with a patch to deal with the strange \enddocument.[2] This indicates (a) how he found the bug; (b) a CLASS of related mass usages of LaTeX's label mechanism, applied by some MORE LaTeX USERs than authors of critical editions (David Kastrup, me, some others I know); (c) a kind of BUG in PERPAGE.sty! As to (b): The most common use of PERPAGE.sty is (I guess) numbering footnotes PAGEWISE. There are other pagewise jobs to do with LaTeX. It is natural to implement them by using the .aux files, and it's useful to use the final test on label changings to warn the author when the pagewise job has failed due to a page break change. However, macro writers have become careful to keep the number of \newlabel's small, already for hash size. I know of the following instances: (i) NUMBERING LINES pagewise. This is standard in -- sorry -- critical editions again. I had reported here how once the footnotes generated too many labels in a critical edition. However, I had discovered this when the author reported that, after expanding his volume considerably, the PAGEWISE mode of NUMBERING LINES stopped working. Well, the labels from some thousand footnotes didn't leave the 400 control strings that numbering lines pagewise needed. -- Besides critical editions, numbering lines is used for the REVISION process for submissions (Elsevier recommends lineno.sty) or among collaborating authors -- so here are users OUTSIDE the HUMANITIES needing the feature, indeed; indeed scientists. (ii) MARGINPAR/mparhack.sty: Marginal notes usually are wanted in the outer margins in two-side mode, and this is what standard LaTeX sometimes proves to be unable to provide. mparhack.sty does better by using -- labels! For hash size considerations, however, the authors have managed to generate just one \newlabel per page. -- USERs: At least German LAW COMMENTARIES are typeset in the following style: paragraphs are numbered in their MARGINS, and cross-references refer to these numbers. The dangerous labels come not so much from the cross-references as (rather) from mparhack.sty for keeping the paragraph numbers on the outer margins. There are 1000-pages volumes on very thin paper treating an entire main branch of law like the "Bürgerliches Gesetzbuch" or the "Zivilprozessordnung" in detail, so here it would be essential not to write several \newlabel's per page. But what if I need 10 pagewise jobs for 500 pages each of which "safely" generates just one \newlabel per page? -- For example: As to (c) and (a): PERPAGE.sty can number PAGEWISE almost whatever you want. However, even if David Kastrup numbers FOOTNOTEs pagewise and nothing else, each one writes a version of \newlabel to the .aux file, perhaps many more than one per page.[3] This is a weakness of perpage.sty, I would say, reminding me of MicroSoft programmers who are too lazy to write safe code.[4][5] -- Is this an acceptable way of sending a bug report for perpage.sty? David Kastrup might become the second person understanding Stephan Boettcher's (lineno.sty's) method of numbering lines pagewise using one command string per page only. TO CONCLUDE: Dear LaTeX Project Team, please remove the \begingroup ... \endgroup from \enddocument, but only after careful discussion, and please report it somewhere. I'd like to know about earlier versions of \enddocument. Maybe once there was something between \endgroup and \deadcycles. Or was it about TeX's final statistics? But this group means spoiling the save stack statistic. Or did Leslie Lamport think "When in doubt, a group is always the safe way", as with the \relax after assignments? -- David Kastrup's patch is, in my view, perfect, and should someone else encounter the problem, he will find somebody to help him with such a patch. Good night, Uwe. ________________________________ [1] Cf. below: At 01:55 11.03.08, you wrote: >William F Hammond writes: > > >>>5000 labels is easy to reach if you are using the label mechanism > >>>extensively. > >> > >> This is real life with critical editions in the "classical" style > >> where footnotes don't refer by footnote marks but by line numbers. > >> ednotes.sty originally used three labels for one footnote > >> and broke with, say, 400 pages. > > > > A LaTeX translation of the largest of the four religious texts > > (English language) in Jon Bosak's 1998 XML demos might reasonably have > > at least 24000 labels. > > See http://www.ibiblio.org/bosak/ > > http://metalab.unc.edu/bosak/xml/eg/rel200.zip > >Here is the conditional fix that I am placing in perpage.sty. It is not >all too pretty, but I think it should do the trick as long as LaTeX is >not fixed, and do nothing once this happens. [2] See above. [3] I have read this claim from the code and tested it on a 2-page example. [4] Or might we think of creators of LaTeX too lazy to write safe code? Apart from being too lazy to "literalize" the code lines we mostly wonder about. [5] I have just decided not to complete the apparatus tonight. I am dreaming of hyper-emails.