Re: [NTG-context] figure libraries (mkiv)
Hans Hagen schrieb: > Peter Rolf wrote: >> Hi Hans, >> >> Looks like I'm the only one using resource libs. I have tried to solve >> the problem with figure inclusion, but my lua is still too bad >> (coroutines). At least I have found the place where things go wrong. >> >> >> function figures.bases.find(basename,askedlabel) >> [..] >> if base[2] and base[3] then >> for e, d, k in >> xml.elements(base[3],"/(rlx:library|figurelibrary)/*:figure/*:label") do >> page = page + 1 >> if xml.content(d[k]) == askedlabel then >> t = { >> base = file.replacesuffix(base[2],"pdf"), >> format = "pdf", >> name = xml.filters.text(e,"*:file"), -- always >> empty >> page = page, -- wrong pagenumber (far too high) >> } >> -- tex.sprint(table.serialize(t)) >> figures.bases.found[askedlabel] = t >> break >> end >> end >> end >> [..] >> >> >> And what is the correct namespace for resource libraries? > > we can make that * too ok if i use "/(*:library|figurelibrary)/*:figure/*:label" and exchange '*:file' in the upper code with 'rl:file' i get the correct name and page number. so in the end it's a filter problem (leave that to the experts) ;) btw: currently only the 'name' is supported in mkiv. in mkii you can also use the real filename ('file') to access the graphic. best wishes, peter > > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | fax: 038 477 53 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] figure libraries (mkiv)
Peter Rolf wrote: > Hi Hans, > > Looks like I'm the only one using resource libs. I have tried to solve > the problem with figure inclusion, but my lua is still too bad > (coroutines). At least I have found the place where things go wrong. > > > function figures.bases.find(basename,askedlabel) > [..] > if base[2] and base[3] then > for e, d, k in > xml.elements(base[3],"/(rlx:library|figurelibrary)/*:figure/*:label") do > page = page + 1 > if xml.content(d[k]) == askedlabel then > t = { > base = file.replacesuffix(base[2],"pdf"), > format = "pdf", > name = xml.filters.text(e,"*:file"), -- always > empty > page = page, -- wrong pagenumber (far too high) > } > -- tex.sprint(table.serialize(t)) > figures.bases.found[askedlabel] = t > break > end > end > end > [..] > > > And what is the correct namespace for resource libraries? we can make that * too - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] figure libraries (mkiv)
Hi Hans, Looks like I'm the only one using resource libs. I have tried to solve the problem with figure inclusion, but my lua is still too bad (coroutines). At least I have found the place where things go wrong. function figures.bases.find(basename,askedlabel) [..] if base[2] and base[3] then for e, d, k in xml.elements(base[3],"/(rlx:library|figurelibrary)/*:figure/*:label") do page = page + 1 if xml.content(d[k]) == askedlabel then t = { base = file.replacesuffix(base[2],"pdf"), format = "pdf", name = xml.filters.text(e,"*:file"), -- always empty page = page, -- wrong pagenumber (far too high) } -- tex.sprint(table.serialize(t)) figures.bases.found[askedlabel] = t break end end end [..] And what is the correct namespace for resource libraries? You use rlx for the element, and a joker for . The example in x-res-04.tex should be updated then (uses rl for all). For testing I have changed the prefix to rl (as my test databases use rl). I can send you a small 7z with my test files. Peter ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Figure Libraries
David Arnold wrote: > My workaround was to rename the second instance \externalfigure > [sec4foura], but I am wondering a bit about this mechanism. You really should use unique names for your figures, you know. How else can you differentiate between the one in section 4 and the one in section 2? Greetings, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Figure Libraries
All, I have chapter1.tex: \startproduct chapter1 \project book \startbodymatter \setupheadnumber[chapter][0] \chapter[chap:1]{Functions} \component chapter1/section1 \component chapter1/section2 \component chapter1/section3 \component chapter1/section4 \stopbodymatter \stopproduct All the files for chapter1 are in a folder named chapter1, for example chapter1/section1.tex. All the figures for chapter1 are in chapter1/figures/. section2.tex starts with: \startcomponent section2 \project book \product chapter1 \usemodule[newmat] \usemodule[math-ext] \usemodule[fig-base] \usefigurebase[figures/figlibSection2] \section[section:graph]{The Graph of a Function} In chapter1/figures/figlibSection2.xml, there is: sec2foura.png foura College of the Redwoods Mathematics Department section4.tex starts with: \startcomponent section4 \project book \product chapter1 \usemodule[newmat] \usemodule[math-ext] \usemodule[fig-base] \usefigurebase[figures/figlibSection4] In chapter1/figures/figlibSection4.xml, there is: sec4foura.png foura College of the Redwoods Mathematics Department The difficulty was this. When I compiled chapter1.tex, the \externalfigure[foura] in section4.tex used the foura from figlibSection2.xml. My workaround was to rename the second instance \externalfigure [sec4foura], but I am wondering a bit about this mechanism. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Figure libraries
Hi Hans, Thank you for asking for the whole set of files. While looking for them I detected that the xml file was gone. Then a new set of files was prepared . Testing those however revealed that everything worked to expectation! Sorry for the noise! Willi Hans Hagen wrote: >Willi Egger wrote: > > >>Hi Hans, >> >>It seems that the figurelibrary mechanism is (still, previous post on >>19-9-2005) broken. >> >>TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 >> >> texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 >> texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004 >> tex : pdfeTeX, 3.141592-1.30.3-2.2 (Web2c 7.5.5) >>---> context : ver: 2005.11.30 (This is the latest >>version downloaded on 19-03-2006) >> cont-en : ver: 2005.11.30 fmt: 2006.3.19 mes: english >> >>(The texexec --version reveals that the versionnumber in context has >>not been adjusted since the version 2005-11-30) >> >> >>Referencing by "label" the picture is not found. >>Referencing by page the wrong page is found. >>Referencing the last picture in the file: a fatal error occurs, that >>the page does not exits. >> >>Please refer to the attached example files. >> >>Could you please take a look at this matter? >> >> >> >can you also send me the xml file and the graphic so that i can test it? >context needs the xml file to relate the label to a page > >btw, page 3 is fetched ok, the libs always opens at the page where the >ref section starts > >which makes me wonder ... maybe i should embed the xml file in the pdf >file as well because one can extract it then, something to put on the >wish list (collector/wiki) > >Hans > > > ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Figure libraries
Willi Egger wrote: > Hi Hans, > > It seems that the figurelibrary mechanism is (still, previous post on > 19-9-2005) broken. > > TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 > > texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 > texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004 > tex : pdfeTeX, 3.141592-1.30.3-2.2 (Web2c 7.5.5) > ---> context : ver: 2005.11.30 (This is the latest > version downloaded on 19-03-2006) > cont-en : ver: 2005.11.30 fmt: 2006.3.19 mes: english > > (The texexec --version reveals that the versionnumber in context has > not been adjusted since the version 2005-11-30) > > > Referencing by "label" the picture is not found. > Referencing by page the wrong page is found. > Referencing the last picture in the file: a fatal error occurs, that > the page does not exits. > > Please refer to the attached example files. > > Could you please take a look at this matter? > can you also send me the xml file and the graphic so that i can test it? context needs the xml file to relate the label to a page btw, page 3 is fetched ok, the libs always opens at the page where the ref section starts which makes me wonder ... maybe i should embed the xml file in the pdf file as well because one can extract it then, something to put on the wish list (collector/wiki) Hans -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Figure libraries
Hi Hans, of course, this will happen of list. Willi Hans Hagen wrote: >Willi Egger wrote: > > >>Hi Hans, >> >>It seems that the figurelibrary mechanism is (still, previous post on >>19-9-2005) broken. >> >>TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 >> >> texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 >> texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004 >> tex : pdfeTeX, 3.141592-1.30.3-2.2 (Web2c 7.5.5) >>---> context : ver: 2005.11.30 (This is the latest >>version downloaded on 19-03-2006) >> cont-en : ver: 2005.11.30 fmt: 2006.3.19 mes: english >> >>(The texexec --version reveals that the versionnumber in context has >>not been adjusted since the version 2005-11-30) >> >> >>Referencing by "label" the picture is not found. >>Referencing by page the wrong page is found. >>Referencing the last picture in the file: a fatal error occurs, that >>the page does not exits. >> >>Please refer to the attached example files. >> >>Could you please take a look at this matter? >> >> >> >can you also send me the xml file and the graphic so that i can test it? >context needs the xml file to relate the label to a page > >btw, page 3 is fetched ok, the libs always opens at the page where the >ref section starts > >which makes me wonder ... maybe i should embed the xml file in the pdf >file as well because one can extract it then, something to put on the >wish list (collector/wiki) > >Hans > > > ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Figure libraries
Hm, Strange, I have no duplicate tree-segments. I have the distro in the texmf-local tree. Even after reextractign the file I downloaded yesterday en regenerating the formats I get the same result except that the format gets the date of 20 march. Willi Taco Hoekwater wrote: >Hans Hagen wrote: > > >>Willi Egger wrote: >> >> >> >>>Hi Hans, >>> >>>It seems that the figurelibrary mechanism is (still, previous post on >>>19-9-2005) broken. >>> >>>TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 >>> >>> texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 >>> texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004 >>> tex : pdfeTeX, 3.141592-1.30.3-2.2 (Web2c 7.5.5) >>>---> context : ver: 2005.11.30 (This is the latest >>>version downloaded on 19-03-2006) >>> cont-en : ver: 2005.11.30 fmt: 2006.3.19 mes: english >>> >>>(The texexec --version reveals that the versionnumber in context has >>>not been adjusted since the version 2005-11-30) >>> >>> > >No it does not, it reveals that you regenerated the november 30 format >on march 19, the version in context has definately changed. ;) > >My guess is: you extracted the archive in the wrong place, and none >of it found by any of the runtime programs. > >Cheers, Taco > >___ >ntg-context mailing list >ntg-context@ntg.nl >http://www.ntg.nl/mailman/listinfo/ntg-context > > ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Figure libraries
Hans Hagen wrote: > Willi Egger wrote: > >>Hi Hans, >> >>It seems that the figurelibrary mechanism is (still, previous post on >>19-9-2005) broken. >> >>TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 >> >> texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 >> texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004 >> tex : pdfeTeX, 3.141592-1.30.3-2.2 (Web2c 7.5.5) >>---> context : ver: 2005.11.30 (This is the latest >>version downloaded on 19-03-2006) >> cont-en : ver: 2005.11.30 fmt: 2006.3.19 mes: english >> >>(The texexec --version reveals that the versionnumber in context has >>not been adjusted since the version 2005-11-30) No it does not, it reveals that you regenerated the november 30 format on march 19, the version in context has definately changed. ;) My guess is: you extracted the archive in the wrong place, and none of it found by any of the runtime programs. Cheers, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Figure libraries
Willi Egger wrote: > Hi Hans, > > It seems that the figurelibrary mechanism is (still, previous post on > 19-9-2005) broken. > > TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 > > texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 > texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004 > tex : pdfeTeX, 3.141592-1.30.3-2.2 (Web2c 7.5.5) > ---> context : ver: 2005.11.30 (This is the latest > version downloaded on 19-03-2006) > cont-en : ver: 2005.11.30 fmt: 2006.3.19 mes: english > > (The texexec --version reveals that the versionnumber in context has > not been adjusted since the version 2005-11-30) here i have (in the zip): \def\contextversion{2006.02.20 16:09} - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Figure libraries
Hi David, yes you can. In your doc you can refer to the library's content either by symbolic names as given in the library or by reference to a page in the library \usemodule[fig-base] \usefigurebase[mylibrary] . {\externalfigure[mynicepicture][...]} . {\externalfigure[mylibrary][page=xx]} Willi David Arnold wrote: All, After you run: figures $ texexec --pdf --use=fig-make --mode=letter figlibSection3.xml are the figures embedded in figlibSection3.pdf? That is, could you now remove the files used to create figlibSection3.pdf? ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Figure libraries
Am 2006-01-15 um 04:15 schrieb David Arnold: After you run: figures $ texexec --pdf --use=fig-make --mode=letter figlibSection3.xml are the figures embedded in figlibSection3.pdf? That is, could you now remove the files used to create figlibSection3.pdf? If you see them in the PDF, they're embedded. There's no such like linked pictures in a PDF. (There may be linked media contents like movies, and PDF/X-2 was planned for incomplete PDF files, but the latter never got implemented.) Grüßlis vom Hraban! --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer) ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Figure libraries
All, After you run: figures $ texexec --pdf --use=fig-make --mode=letter figlibSection3.xml are the figures embedded in figlibSection3.pdf? That is, could you now remove the files used to create figlibSection3.pdf? ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context