cross-references between documents in a project (using \useexternaldocument)
Dear all, I am trying to create cross references between two documents in my project. Links between the two are successfully made, but the actual page numbers are not being printed (which, for my purposes, are what I actually need, not links). Am I doing something wrong, or is this a known bug (such that I should cease my attempts)? Is \useexternaldocument the wrong command for this purpose? Minimum example files below: % project \project project_xref \startproduct prd_xref \component xref1 \component xref2 \stopproduct % product \startproject project_xref \environment env_xref \product prd_xref \stopproject % environment \startenvironment env_xref \setupinteraction [state=start, style=, color=blue, contrastcolor=, menu=on, title=Cross referencing Test File, author=Gerard Verhaag] \stopenvironment % component1 [xref1] \project project_xref \startcomponent xref1 \starttext \chapter[cross]{Cross referencing} \chapter[lorem]{Lorem} Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[lorem]. \stoptext \stopcomponent % component2 [xref2] \project project_xref \startcomponent xref2 \useexternaldocument[xrf][xref1] \starttext Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[xrf::lorem]. \stoptext \stopcomponent All the best, Talal
On 8/11/2015 11:00 AM, talazem@fastmail.fm wrote:
i have no clue what you're talking about ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Sorry for not being clear. The original question was whether cross-referencing in a project can only be done between components, or if they can also be done between products. I could never get the latter to work. Wolfgang confirmed that in MkII, intra-product cross-referencing works (even with the examples I had posted),but not in MkIV. He speculated that the numbers in the references were not appearing in MkIV due to a bug, or because the feature was not implemented. Best wishes, Talal
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’t loaded (can be seen in the tracker information in the log). Wolfgang
On 9/8/2015 9:04 PM, Wolfgang Schuster wrote:
not so much a bug but the current mechanism assumes a project/component struture i'll see if i can catch the non structured variant
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 09.09.2015 01:43, Hans Hagen wrote:
Hi, I'm also struggeling with cross-referencing in a project/component 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 empty. I looked at the lua code to see if I'm able to fix it myself and stumbled over the 'identify_inner(set,var,prefix,collected,derived)' function in strc-ref.lua (at around line 1396 in MKVI from 2015.09.04 11:00). It look like identify_inner gets sometimes called with 'prefix' set to nil while 'derived' is also undefined (at 1493 and 1514). If I get the program flow right this looks suspicious, as it always retuns 'false' from 'identify_inner'. If I add 'prefix = prefix or ""' to 'identify_inner' I actually get references printed in the test case. However the links are not working and for the figure the section number is wrong. Finally looking at the uncompressed PDF I can see that references are set not prefixed in xr-prod2.pdf (i.e. link to 'plain'), but are prefixed in xr-prod1.pdf (anchor is 'xr-comp1-1:plain'). Maybe these informations can help in resolving the issue. :)
participants (4)
-
Hans Hagen
-
Jens Bertram
-
talazem@fastmail.fm
-
Wolfgang Schuster