ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem with external cross-references
@ 2012-02-25 16:47 Jean-Philippe Rey
  2012-03-02 19:59 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Jean-Philippe Rey @ 2012-02-25 16:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello everybody,

I'm trying to use external cross-references between two files but I can't make it work with MkIV. I am using ConTeXt current

ConTeXt  ver: 2011.05.18 18:04 MKIV  fmt: 2011.7.31  int: english/english


With MkII, the following minimal example works perfectly well :

% file test_crossref1
\starttext
\chapter[lorem]{Lorem}
Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[lorem].
\stoptext

% file test_crossref2
\usereferences[test_crossref1]
\starttext
Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[lorem].
\stoptext


However with MkIV, I get an unknown reference (??) in test_crossref2 and the following lines in test_crossref2.log

[...]
system          > references from other files are handled automatically
[...]
references      > unknown reference [][lorem]
[...]

With 

% file test_crossref2
\starttext
Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[test_crossref1::lorem].
\stoptext

I still get an unknown reference (??) and the following diagnosis in the log file
[...]
references      > references from document 'test_crossref1' are not exported
references      > unknown reference [][test_crossref1::lorem]
[...]

However when I add the export option in the test_crossref1 file

% file test_crossref1
\setupreferencing[export=yes]
\starttext
\chapter[lorem]{Lorem}
Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[lorem].
\stoptext

I get an error at compile time. Below is the full log file. Does anyone know what I am doing wrong ?

Thank you for your help.



(test_crossref1.tex

ConTeXt  ver: 2011.05.18 18:04 MKIV  fmt: 2011.7.31  int: english/english

system          > cont-new.mkiv loaded
(/Users/jprey/ConTeXt-2011.05.18/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > test_crossref1.top loaded
system          > options > begin of optionfile
system          > options >
system          > options > % runtime options files (command line driven)
system          > options > \unprotect
system          > options > % feedback and basic job control
system          > options > % handy for special styles
system          > options > \startluacode
system          > options > document = document or { }
system          > options > document.arguments={
system          > options >  ["arrange"]=true,
system          > options >  ["synctex"]=true,
system          > options > }
system          > options > document.files={
system          > options >  "test_crossref1.tex",
system          > options > }
system          > options > \stopluacode
system          > options > % process info
system          > options > \setupsystem[inputfile=test_crossref1.tex]
system          > options > \setupsystem[\c!n=1,\c!m=1]
system          > options > % modes
system          > options > % options (not that important)
system          > options > \startsetups *runtime:options
system          > options > \setuparranging[\v!disable]
system          > options > \stopsetups
system          > options > % styles and modules
system          > options > \startsetups *runtime:modules
system          > options > \stopsetups
system          > options > % done
system          > options > \protect \endinput
system          > options >
system          > options > end of optionfile
(test_crossref1.top)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
{/Users/jprey/ConTeXt-2011.05.18/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
(/Users/jprey/ConTeXt-2011.05.18/tex/texmf-context/tex/context/base/type-siz.mkiv) (/Users/jprey/ConTeXt-2011.05.18/tex/texmf-context/tex/context/base/type-otf.mkiv){/Users/jprey/ConTeXt-2011.05.18/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/Users/jprey/ConTeXt-2011.05.18/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > virtual math > unable to resolve name mapsfromchar
fonts           > fallback modern rm 12pt is loaded
system          > begin file test_crossref1.tex at line 2
structure       > sectioning > chapter @ level 2 : 0.1 -> Lorem
references      > unknown reference [][lorem]
backend         > xmp > using file '/Users/jprey/ConTeXt-2011.05.18/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
system          > end file test_crossref1.tex at line 7
! LuaTeX error ...0731/tex/texmf-context/tex/context/base/strc-ref.lua:560: attempt to index global 'jobpages' (a nil value)
stack traceback:
	...0731/tex/texmf-context/tex/context/base/strc-ref.lua:560: in function 'referencer'
	...0731/tex/texmf-context/tex/context/base/strc-ref.lua:609: in function 'export'
	<main ctx instance>:1: in main chunk.

system          > tex > error on line 7 in file test_crossref1.tex: LuaTeX error  ...

1     \setupreferencing[export=yes]
2     \starttext
3     \chapter[lorem]{Lorem}
4     
5     Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[lorem].
6     
7 >>  \stoptext

<argument> ...lua {structures.references.export()}
                                                  
\firstofoneargument #1->#1
                          
\finalend ...se \the \everybye \the \everygoodbye 
                                                  \doifsometokselse \everyno...
l.7 \stoptext
             
? 
! Emergency stop.

system          > tex > error on line 7 in file test_crossref1.tex: Emergency stop ...

1     \setupreferencing[export=yes]
2     \starttext
3     \chapter[lorem]{Lorem}
4     
5     Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[lorem].
6     
7 >>  \stoptext

<argument> ...lua {structures.references.export()}
                                                  
\firstofoneargument #1->#1
                          
\finalend ...se \the \everybye \the \everygoodbye 
                                                  \doifsometokselse \everyno...
l.7 \stoptext
             
End of file on the terminal!

!  ==> Fatal error occurred, no output PDF file produced!




-- 
Jean-Philippe Rey                 Professeur - École Centrale Paris
jean-philippe.rey@ecp.fr          92295 Châtenay-Malabry Cedex - France



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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-03-10 11:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-25 16:47 Problem with external cross-references Jean-Philippe Rey
2012-03-02 19:59 ` Hans Hagen
2012-03-04  0:44   ` Jean-Philippe Rey
2012-03-05  9:18     ` Hans Hagen
2012-03-08 17:30       ` Jean-Philippe Rey
2012-03-10 11:41         ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).