Re: [NTG-context] cross-references between documents in a project (using \useexternaldocument)

2015-09-09 Thread Jens Bertram

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 
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. :)


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’t loaded (can be seen in the tracker
information in the log).

Wolfgang



\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

\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

\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

\project xr-proj
\startproduct xr-prod1
	\component xr-comp1-1
\stopproduct

\project xr-proj
\startproduct xr-prod2
	\component xr-comp2-1
\stopproduct

___
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
___

Re: [NTG-context] cross-references between documents in a project (using \useexternaldocument)

2015-09-09 Thread Wolfgang Schuster

Hans Hagen 
9. September 2015 01:43
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


i'll see if i can catch the non structured variant

The same happens when you link from on product to another.

Wolfgang
___
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
___

Re: [NTG-context] cross-references between documents in a project (using \useexternaldocument)

2015-09-08 Thread Wolfgang Schuster

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.

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


one.tex
Description: TeX document


two.tex
Description: TeX document
___
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
___

Re: [NTG-context] cross-references between documents in a project (using \useexternaldocument)

2015-09-08 Thread Hans Hagen

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


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’t loaded (can be seen in the tracker
information in the log).

Wolfgang


___
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
___




--

-
  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
-
___
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
___

Re: [NTG-context] cross-references between documents in a project (using \useexternaldocument)

2015-08-11 Thread Hans Hagen

On 8/11/2015 11:00 AM, tala...@fastmail.fm wrote:

Hans, it would be great to have the numbers appearing again sometime in
the future (if it is a bug or a not-yet implemented feature indeed). I
couldn’t find anything in the documentation suggesting not to structure
things this way.


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
-
___
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
___

Re: [NTG-context] cross-references between documents in a project (using \useexternaldocument)

2015-08-11 Thread tala...@fastmail.fm
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

 On 11 Aug 2015, at 10:48, Hans Hagen pra...@wxs.nl wrote:
 
 On 8/11/2015 11:00 AM, tala...@fastmail.fm wrote:
 Hans, it would be great to have the numbers appearing again sometime in
 the future (if it is a bug or a not-yet implemented feature indeed). I
 couldn’t find anything in the documentation suggesting not to structure
 things this way.
 
 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
 -
 ___
 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
 ___

___
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
___

Re: [NTG-context] cross-references between documents in a project (using \useexternaldocument)

2015-08-11 Thread tala...@fastmail.fm
Hans, it would be great to have the numbers appearing again sometime in the 
future (if it is a bug or a not-yet implemented feature indeed). I couldn’t 
find anything in the documentation suggesting not to structure things this way.

Best wishes,
Talal

 On 10 Aug 2015, at 21:33, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:
 
 tala...@fastmail.fm mailto:tala...@fastmail.fm 6. August 2015 19:00
 Perhaps I might ask a more preliminary question: when using project 
 structure, is cross-document referencing possible between two product files, 
 or only between two component files within a single product file?
 You can create hyperlinks between different products and your example (I 
 slightly modified it) works as expected with MkII where I get the chapter 
 number in the links.
 
 The missing numbers with MkIV can be a bug or not yet implemented.
 
 Wolfgang
 ___
 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
 ___

___
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
___

Re: [NTG-context] cross-references between documents in a project (using \useexternaldocument)

2015-08-10 Thread Wolfgang Schuster

tala...@fastmail.fm mailto:tala...@fastmail.fm
6. August 2015 19:00
Perhaps I might ask a more preliminary question: when using project 
structure, is cross-document referencing possible between two product 
files, or only between two component files within a single product file?
You can create hyperlinks between different products and your example (I 
slightly modified it) works as expected with MkII where I get the 
chapter number in the links.


The missing numbers with MkIV can be a bug or not yet implemented.

Wolfgang
___
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
___

Re: [NTG-context] cross-references between documents in a project (using \useexternaldocument)

2015-08-06 Thread tala...@fastmail.fm
Perhaps I might ask a more preliminary question: when using project structure, 
is cross-document referencing possible between two product files, or only 
between two component files within a single product file?

Kind regards,
Talal

 On 5 Aug 2015, at 13:15, tala...@fastmail.fm wrote:
 
 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
 ___
 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
 ___

___
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
___

[NTG-context] cross-references between documents in a project (using \useexternaldocument)

2015-08-05 Thread tala...@fastmail.fm
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
___
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
___