From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/92523 Path: news.gmane.org!not-for-mail From: Jens Bertram Newsgroups: gmane.comp.tex.context Subject: Re: cross-references between documents in a project (using \useexternaldocument) Date: Wed, 9 Sep 2015 11:50:33 +0200 Message-ID: <55F000E9.6020400@jens-bertram.net> References: <2ABE61EB-256E-40A2-AF97-0FBC4281B164@fastmail.fm> <55C90AA3.6010706@gmail.com> <55C9C4D4.8030801@wxs.nl> <55EF315B.30708@gmail.com> <55EF72B6.9010309@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080005090504050805000509" X-Trace: ger.gmane.org 1441792308 8810 80.91.229.3 (9 Sep 2015 09:51:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Sep 2015 09:51:48 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 09 11:51:36 2015 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 1ZZc2K-0000vd-9J for gctc-ntg-context-518@m.gmane.org; Wed, 09 Sep 2015 11:51:28 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2050110219 for ; Wed, 9 Sep 2015 11:51:28 +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 WkntO1gw9EyE for ; Wed, 9 Sep 2015 11:51:27 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id C611410234 for ; Wed, 9 Sep 2015 11:50:49 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2037E101F6 for ; Wed, 9 Sep 2015 11:50:46 +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 dlNVo9F7RT55 for ; Wed, 9 Sep 2015 11:50:45 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 0C4A7101E8 for ; Wed, 9 Sep 2015 11:50:40 +0200 (CEST) Original-Received: from spica.uberspace.de (spica.uberspace.de [185.26.156.17]) by filter4-til.mf.surf.net (8.14.4/8.14.4/Debian-4) with ESMTP id t899ocXt021237 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 9 Sep 2015 11:50:39 +0200 Original-Received: (qmail 24426 invoked from network); 9 Sep 2015 09:50:37 -0000 Original-Received: from localhost (HELO ?192.168.238.39?) (127.0.0.1) by spica.uberspace.de with SMTP; 9 Sep 2015 09:50:37 -0000 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: <55EF72B6.9010309@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=185.26.156.17; country=DE; latitude=51; longitude=9.0000; http://maps.google.com/maps?q=51,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VPeVOCR1 - e170bc70ff82 - 20150909 (trained as not-spam) Received-SPF: none (filter4-til.mf.surf.net: domain of context@jens-bertram.net does not designate permitted sender hosts) receiver=filter4-til.mf.surf.net; client-ip=185.26.156.17; envelope-from=; helo=spica.uberspace.de; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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" Xref: news.gmane.org gmane.comp.tex.context:92523 Archived-At: This is a multi-part message in MIME format. --------------080005090504050805000509 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 09.09.2015 01:43, Hans Hagen wrote: > On 9/8/2015 9:04 PM, Wolfgang Schuster wrote: >>> Hans Hagen >>> 11. August 2015 11:48 >>> >>> >>> i have no clue what you're talking about >> There is a bug in the reference mechanism between documents. > > not so much a bug but the current mechanism assumes a project/component > struture > Hi, I'm also struggeling with cross-referencing in a project/component=20 layout. I attached a minimal example that resembles the layout I use. If you compile xr-prod1 and xr-prod2 all cross-references are simply empt= y. I looked at the lua code to see if I'm able to fix it myself and=20 stumbled over the 'identify_inner(set,var,prefix,collected,derived)'=20 function in strc-ref.lua (at around line 1396 in MKVI from 2015.09.04=20 11:00). It look like identify_inner gets sometimes called with 'prefix'=20 set to nil while 'derived' is also undefined (at 1493 and 1514). If I=20 get the program flow right this looks suspicious, as it always retuns=20 'false' from 'identify_inner'. If I add 'prefix =3D prefix or ""' to=20 'identify_inner' I actually get references printed in the test case.=20 However the links are not working and for the figure the section number=20 is wrong. Finally looking at the uncompressed PDF I can see that references are=20 set not prefixed in xr-prod2.pdf (i.e. link to 'plain'), but are=20 prefixed in xr-prod1.pdf (anchor is 'xr-comp1-1:plain'). Maybe these informations can help in resolving the issue. :) > i'll see if i can catch the non structured variant > >> When you produce a PDF from the attached documents you can use the >> hyperlinks to jump to the chapter page in the other document but no >> information is printed because the information with the section number= , >> page number or title isn=E2=80=99t loaded (can be seen in the tracker >> information in the log). >> >> Wolfgang --------------080005090504050805000509 Content-Type: text/x-tex; name="xr-proj.tex" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xr-proj.tex" \enabletrackers[ system.jobfiles, structures.referencing, structures.referencing.importing, structures.referencing.identifying] \setupinteraction[state=start] \useexternaldocument[xr1][xr-prod1][XR Product One] \useexternaldocument[xr2][xr-prod2][XR Product Two] \nopdfcompression \startproject xr-proj \product xr-prod1 \product xr-prod2 \stopproject --------------080005090504050805000509 Content-Type: text/x-tex; name="xr-comp2-1.tex" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xr-comp2-1.tex" \startcomponent xr-comp2-1 \starttext plain\\ ABOUT: \about[xr1::plain]\\ IN: \in[xr1::plain]\\ AT: \at[xr1::plain] \\\\ page2\\ ABOUT: \about[xr1::pagetwo]\\ IN: \in[xr1::pagetwo]\\ AT: \at[xr1::pagetwo] \\\\ figone\\ ABOUT: \about[xr1::figone]\\ IN: \in[xr1::figone]\\ AT: \at[xr1::figone] \\\\ figtwo\\ ABOUT: \about[xr1::figtwo]\\ IN: \in[xr1::figtwo]\\ AT: \at[xr1::figtwo] \stoptext \stopcomponent --------------080005090504050805000509 Content-Type: text/x-tex; name="xr-comp1-1.tex" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xr-comp1-1.tex" \setupinteraction[state=start] \startcomponent xr-comp1-1 \startchapter[reference=plain, title={Plain chapter}] Lorem ipsum dolor sit amet, consectetur adipiscing elit. \stopchapter \page \startchapter[reference=pagetwo, title={Plain chapter page two}] Lorem ipsum dolor sit amet, consectetur adipiscing elit. \startsection[reference=secwithpic, title={Section with image}] \startplacefigure[reference=figone, title={Figure 1}] \externalfigure[cow.pdf] \stopplacefigure \stopsection \stopchapter \startchapter[reference=chaptwo, title={Plain chapter two}] Lorem ipsum dolor sit amet, consectetur adipiscing elit. \startsection[reference=sectwowithpic, title={Section chap2 with image}] \startplacefigure[reference=figtwo, title={Figure 2}] \externalfigure[cow.pdf] \stopplacefigure \stopsection \stopchapter \stopcomponent --------------080005090504050805000509 Content-Type: text/x-tex; name="xr-prod1.tex" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xr-prod1.tex" \project xr-proj \startproduct xr-prod1 \component xr-comp1-1 \stopproduct --------------080005090504050805000509 Content-Type: text/x-tex; name="xr-prod2.tex" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xr-prod2.tex" \project xr-proj \startproduct xr-prod2 \component xr-comp2-1 \stopproduct --------------080005090504050805000509 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --------------080005090504050805000509--