Problem with external cross-references
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
On 25-2-2012 17:47, Jean-Philippe Rey wrote:
\useexternaldocument[xref][test_crossref1] \starttext Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[xref::lorem]. \stoptext ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Hello Hans, Le 2 mars 2012 à 20:59, Hans Hagen a écrit :
Thank you for your answer, but it doesn't work. I still get an undefined reference and the following lines in the log file references > references from document 'test_crossref1' are not exported references > unknown reference [][xref::lorem] -- Jean-Philippe Rey Professeur - École Centrale Paris jean-philippe.rey@ecp.fr 92295 Châtenay-Malabry Cedex - France
On 4-3-2012 01:44, Jean-Philippe Rey wrote:
That version is quite old; I wouldn't be surprised if in that version loading of cross document references was not yet implemented fully. The current version doesn't use the mkii way anyway (no export option, different loading etc). Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Hello Hans, Le 5 mars 2012 à 10:18, Hans Hagen a écrit :
ConTeXt ver: 2011.05.18 18:04 MKIV fmt: 2011.7.31 int: english/english
That version is quite old; I wouldn't be surprised if in that version loading of cross document references was not yet implemented fully. The current version doesn't use the mkii way anyway (no export option, different loading etc).
If I am not mistaken, this is the last current (=stable) version. I have been using MkII for some time and I wanted to switch to MkIV as it seems the way to go. However I am not comfortable using a beta version for production purpose, especially as I am using ConTeXt to write test questions where a small misprint could have tragic consequences. Should I stick to MkII and wait for the next stable version ? Or is there a reasonably stable (e.g. pre-release) version that I could use ? -- Jean-Philippe Rey Professeur - École Centrale Paris jean-philippe.rey@ecp.fr 92295 Châtenay-Malabry Cedex - France
On 8-3-2012 18:30, Jean-Philippe Rey wrote:
It depends ... here I use mkiv exclusively for years already. It is however a fact that currently some mechanisms are being rewritten so betas will be betas indeed. Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Jean-Philippe Rey