From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68792 Path: news.gmane.org!not-for-mail From: Jesse Alama Newsgroups: gmane.comp.tex.context Subject: Re: Validate (cross)references Date: Fri, 27 May 2011 18:58:39 +0200 Message-ID: References: <15410263440.20110527170442@gmx.de> <9969F0B4-6FAD-43E7-B58F-6923425027B6@googlemail.com> <1213928373.20110527171930@gmx.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0631627848==" X-Trace: dough.gmane.org 1306515551 27239 80.91.229.12 (27 May 2011 16:59:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 May 2011 16:59:11 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri May 27 18:59:07 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QQ0NL-0006Xb-FP for gctc-ntg-context-518@m.gmane.org; Fri, 27 May 2011 18:59:03 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CA899CAD93; Fri, 27 May 2011 18:59:02 +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 LoZdqpQjz4oI; Fri, 27 May 2011 18:58:59 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BF085CAD8D; Fri, 27 May 2011 18:58:59 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E76A1CAD63 for ; Fri, 27 May 2011 18:58:58 +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 uzMYodXviddV for ; Fri, 27 May 2011 18:58:56 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 77B36CAD8D for ; Fri, 27 May 2011 18:58:56 +0200 (CEST) Original-Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p4RGwt3Y032074 for ; Fri, 27 May 2011 18:58:55 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QQ0NC-0006Oe-CZ for ntg-context@ntg.nl; Fri, 27 May 2011 18:58:54 +0200 Original-Received: from n138232.science.ru.nl ([131.174.138.232]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2011 18:58:54 +0200 Original-Received: from jesse.alama by n138232.science.ru.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2011 18:58:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 143 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: n138232.science.ru.nl User-Agent: Unison/2.1.4 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.91.229.12; country=NO; latitude=62.0000; longitude=10.0000; http://maps.google.com/maps?q=62.0000,10.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0bEMEWToI - d86493e5d0c6 - 20110527 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:68792 Archived-At: This is a multi-part message in MIME format. --===============0631627848== Content-Type: multipart/alternative; boundary=--------------622168979320906847 This is a multi-part message in MIME format. ----------------622168979320906847 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2011-05-27 17:19:30 +0200, Andreas Schneider said: > On Friday, May 27, 2011 17:09 Wolfgang Schuster wrote: >=20 >> Am 27.05.2011 um 17:04 schrieb Andreas Schneider: >=20 >>> Hello, >>>=20 >>> if I use \in, \about, \at or anything else that generates = a >>> cross-reference, and that reference happens to be invalid (typo o= r >>> whatever), it just prints out "nothing". Is there a way to hav= e >>> context throw an error if a reference is invalid? (That probably woul= d >>> only make sense in the second pass of context, since the first pas= s >>> has to collect the references first.) >=20 >> Unknown references are shown as =E2=80=9C??=E2=80=9D in your text. >=20 >> Wolfgang >=20 > True, I was mostly thinking about "\about", which just prints two > quotation marks and nothing in between. But my "problem" (if I can > even call it that, since grep is already a solution, just maybe not > the best one :D) is, that I could easily miss such small changes. I'm > working on technical documentation that even has parts that are > automatically generated (from XML files). I just update whatever is > necessary (the document itself, or just the input files), commit them > to SVN and our CI server grabs them, and runs ConTeXt. If ConTeXt > returns with a return code > 0, the build is marked as "failed" and > all necessary admins (me and my colleague) are informed via eMail > and/or RSS feed. If the build succeeds, the generated PDF is > automatically distributed to the users. I consider wrong references an > error, so I would like the build to fail (imho referencing something > that doesn't exist is like using a macro that doesn't exist, which > fails too). >=20 > But as I said: if context can't treat that as error, I'm fine with it > too and will continue to grep the logfile. It's just curiosity if > there may already be a setting/parameter/whatever to get context to be > more "restrictive". +1 I would also like ConTeXt to help me keep me document sensible in this=20 way. I also resort to grep-type solutions, but sometimes I forget to do=20 this, and sometimes, there are embarrassing consequences of such=20 oversight. If ConTeXt could help me avoid this all-too-common=20 oversight of mine, I'd be delighted. Throwing an error would be one=20 way to do this. If throwing an error is not possible, perhaps being=20 able to customize what gets printed when an undefined reference is=20 encountered. E.g., instead of "??", a big, annoying,=20 impossible-to-miss mark in the margin (as one sees when working with=20 overfull lines) or a giant red stopsign saying "UNDEFINED REFERENCE",=20 would do just as well. --=20 Jesse Alama http://centria.di.fct.unl.pt/~alama/ ----------------622168979320906847 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

On 2011-05-27 17:19:30 +0200, Andreas Schneider said:


On Friday, May 27, 2011 17:09 Wolfgang Schuster wrote:


Am 27.05.2011 um 17:04 schrieb Andreas Schneider:


Hello,


if=C2=A0 I=C2=A0 use=C2=A0 \in,=C2=A0 \about,=C2=A0 \at=C2=A0 or=C2=A0 anything=C2=A0 else=C2=A0 = that=C2=A0 generates<= span class=3D"Apple-converted-space">=C2=A0 a

cross-reference,=C2= =A0 and=C2=A0 that=C2=A0 reference=C2=A0 happens to be invalid (typo or

whatever),=C2=A0 it=C2=A0 just=C2=A0 prints=C2=A0 out=C2=A0= "nothing".=C2=A0 Is<= span class=3D"Apple-converted-space">=C2=A0 there a way to have

context throw an error if a reference is invalid? (That p= robably would

only=C2=A0 m= ake=C2=A0 sense=C2=A0 in the second pass of context, sinc= e the first pass

has to collect the references first.)


Unknown references are shown as =E2=80=9C??=E2=80=9D in y= our text.


Wolfgang


True,=C2=A0 = I=C2=A0 was=C2=A0 mostly=C2=A0 thinking=C2=A0 = about "\about", which just prints two

quotation=C2=A0 marks=C2=A0 and=C2=A0 nothing=C2=A0 in between. But my "problem" (if I can

even=C2=A0 c= all=C2=A0 it=C2=A0 that, since grep is already a solutio= n, just maybe not

the=C2=A0 be= st one :D) is, that I could easily miss such small changes. I'm

working=C2=A0 on=C2=A0 technical=C2=A0 documentation=C2=A0 that=C2=A0 even=C2=A0 has=C2=A0 parts that are

automatically=C2=A0= generated=C2=A0 (fro= m=C2=A0 XML files). I just u= pdate whatever is

necessary=C2=A0 (the document itself, or just the input files), commit them

to=C2=A0 SVN= =C2=A0 and=C2=A0 our=C2=A0 CI=C2=A0 ser= ver grabs them, and runs ConTeXt. If ConTeXt

returns=C2=A0 with=C2=A0 a=C2=A0 return code > 0, the build is ma= rked as "failed" and

all=C2=A0 ne= cessary=C2=A0 admins=C2=A0 (me=C2=A0 and=C2=A0= my colleague) are informed via eMail

and/or=C2=A0 RSS=C2=A0 feed.=C2=A0 If=C2=A0 the=C2=A0 build=C2=A0 succeeds,=C2=A0 the=C2=A0 generated=C2=A0 PDF=C2=A0 is=

automatically distributed to the users. I consider wrong = references an

error,=C2=A0 so=C2=A0 I would like the b= uild to fail (imho referencing something

that=C2=A0 d= oesn't=C2=A0 exist=C2=A0 is=C2=A0 like using a macro that doesn't exist, which

fails too).


But=C2=A0 as= I said: if context can't treat that as error, I'm fine with it

too=C2=A0 an= d=C2=A0 will=C2=A0 continue=C2=A0 to=C2=A0 grep the logfile. It's just curiosity if

there may already be a setting/parameter/whatever to get = context to be

more "restrictive".


+1


I would also like ConTeXt to help me keep me document se= nsible in this way. I also resort to grep-type solutions, but sometimes I= forget to do this, and sometimes, there are embarrassing consequences of= such oversight.=C2=A0 If Co= nTeXt could help me avoid this all-too-common oversight of mine, I'd be d= elighted.=C2=A0 Throwing an = error would be one way to do this.=C2= =A0 If throwing an error is not possible, perhaps being able to cu= stomize what gets printed when an undefined reference is encountered.=C2=A0 E.g., instead of "??", a = big, annoying, impossible-to-miss mark in the margin (as one sees when wo= rking with overfull lines) or a giant red stopsign saying "UNDEFINED REFE= RENCE", would do just as well.


--=C2=A0

Jesse Alama

http://centria.di.fct.unl.pt/~alama/

----------------622168979320906847-- --===============0631627848== 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 ___________________________________________________________________________________ --===============0631627848==--