* one small remark and one broad question @ 2012-12-15 16:07 Thomas A. Schmitz 2012-12-16 0:45 ` Cecil Westerhof ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Thomas A. Schmitz @ 2012-12-15 16:07 UTC (permalink / raw) To: mailing list for ConTeXt users Hi all, small remark first: archive.contextgarden.net has been down for a few days now; I suppose because of the new server? And now for the overly broad question: I'm embarking on what could become a long project. One part of it is typesetting a book (with many graphics). On the one hand, it would be wonderful to use the project structure and break it down into several components to make things manageable. On the other hand, it would be great to code in xml (because I might want to publish this as a website too). can these things be combined? Does the xml engine handle xinclude (or could this be added to it)? Or would another approach be better? Thanks for your insights! All best Thomas ___________________________________________________________________________________ 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] 11+ messages in thread
* Re: one small remark and one broad question 2012-12-15 16:07 one small remark and one broad question Thomas A. Schmitz @ 2012-12-16 0:45 ` Cecil Westerhof 2012-12-16 13:46 ` here is ae Hans Hagen 2012-12-19 8:14 ` one small remark and one broad question Thomas A. Schmitz 2 siblings, 0 replies; 11+ messages in thread From: Cecil Westerhof @ 2012-12-16 0:45 UTC (permalink / raw) To: mailing list for ConTeXt users Op zaterdag 15 dec 2012 17:07 CET schreef Thomas A. Schmitz: > And now for the overly broad question: I'm embarking on what could > become a long project. One part of it is typesetting a book (with many > graphics). On the one hand, it would be wonderful to use the project > structure and break it down into several components to make things > manageable. On the other hand, it would be great to code in xml (because > I might want to publish this as a website too). can these things be > combined? Does the xml engine handle xinclude (or could this be added to > it)? Or would another approach be better? Thanks for your insights! I understood that you can generate HTML with ConTeXt also. So there would not be a need to use xml then. (I do not have experience with this.) -- Cecil Westerhof M CLDWesterhof@gmail.com O< ascii ribbon campaign - stop html mail - www.asciiribbon.org Please do not send me Microsoft Office/Apple iWork documents. Send OpenDocument instead! http://fsf.org/campaigns/opendocument/ ___________________________________________________________________________________ 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] 11+ messages in thread
* here is ae 2012-12-15 16:07 one small remark and one broad question Thomas A. Schmitz 2012-12-16 0:45 ` Cecil Westerhof @ 2012-12-16 13:46 ` Hans Hagen 2012-12-16 21:07 ` Schmitz Thomas A. 2012-12-19 8:14 ` one small remark and one broad question Thomas A. Schmitz 2 siblings, 1 reply; 11+ messages in thread From: Hans Hagen @ 2012-12-16 13:46 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Thomas A. Schmitz On 12/15/2012 5:07 PM, Thomas A. Schmitz wrote: > Hi all, > > small remark first: archive.contextgarden.net has been down for a few > days now; I suppose because of the new server? > > And now for the overly broad question: I'm embarking on what could > become a long project. One part of it is typesetting a book (with many > graphics). On the one hand, it would be wonderful to use the project > structure and break it down into several components to make things > manageable. On the other hand, it would be great to code in xml (because > I might want to publish this as a website too). can these things be > combined? Does the xml engine handle xinclude (or could this be added to > it)? Or would another approach be better? Thanks for your insights! Using xml sounds ok to me (esp as you know how to do it) ... with xinclude you mean combining multiple files into one? It's what we do in all xml related projects here. There is actually an \xmlinclude command \xmlinclude{main}{include}{filename|href|name} this will include from elements with tags 'include' and one of the attributes mentioned. Do this as one of the first steps as it merges xml trees. 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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] 11+ messages in thread
* Re: here is ae 2012-12-16 13:46 ` here is ae Hans Hagen @ 2012-12-16 21:07 ` Schmitz Thomas A. 2012-12-16 22:08 ` Sietse Brouwer 2012-12-17 9:15 ` Hans Hagen 0 siblings, 2 replies; 11+ messages in thread From: Schmitz Thomas A. @ 2012-12-16 21:07 UTC (permalink / raw) To: mailing list for ConTeXt users On Dec 16, 2012, at 2:46 PM, Hans Hagen <pragma@wxs.nl> wrote: > Using xml sounds ok to me (esp as you know how to do it) ... with xinclude you mean combining multiple files into one? It's what we do in all xml related projects here. There is actually an \xmlinclude command > > \xmlinclude{main}{include}{filename|href|name} > > this will include from elements with tags 'include' and one of the attributes mentioned. Do this as one of the first steps as it merges xml trees. > > Hans Hi Hans, thanks for your suggestion. Yes, I mean combining multiple files into one document. Sorry that I didn't see \xmlinclude, that's of course just what I was looking for. But after searching the list, I saw a couple old messages by Hans dan der Meer which made me realise I have no idea yet how to use it. Something like this? file chapter_1.xml <chapter> text </chapter> file <chapter_2.xml <chapter> text </chapter> and then file master.xml <document> <xi:include href="chapter_1.xml/> <xi:include href="chapter_2.xml/> </document> Would translate to \startxmlsetups xml:xi:include \startchapter \xmltext{#1}{chapter} \stopchapter \stopchapter Is that the basic structure, or am I misunderstanding the way this could be used? All best Thomas ___________________________________________________________________________________ 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] 11+ messages in thread
* Re: here is ae 2012-12-16 21:07 ` Schmitz Thomas A. @ 2012-12-16 22:08 ` Sietse Brouwer 2012-12-16 22:19 ` Schmitz Thomas A. 2012-12-17 9:15 ` Hans Hagen 1 sibling, 1 reply; 11+ messages in thread From: Sietse Brouwer @ 2012-12-16 22:08 UTC (permalink / raw) To: mailing list for ConTeXt users http://wiki.contextgarden.net/Command/xmlinclude Wikified, but sans example for now. Thomas, could I leave that to you? Writing about things I don't understand is one thing, but producing working code that I don't understand is something I am happy to leave to the experts. ;-) Cheers, Sietse P.s. To anticipate the obvious question "Sietse, do you mean working code that *you* don't understand, or that the *author* doesn't understand?" — the answer is "Yes." :-P On Sun, Dec 16, 2012 at 10:07 PM, Schmitz Thomas A. <thomas.schmitz@uni-bonn.de> wrote: > > On Dec 16, 2012, at 2:46 PM, Hans Hagen <pragma@wxs.nl> wrote: > >> Using xml sounds ok to me (esp as you know how to do it) ... with xinclude you mean combining multiple files into one? It's what we do in all xml related projects here. There is actually an \xmlinclude command >> >> \xmlinclude{main}{include}{filename|href|name} >> >> this will include from elements with tags 'include' and one of the attributes mentioned. Do this as one of the first steps as it merges xml trees. >> >> Hans > > Hi Hans, > > thanks for your suggestion. Yes, I mean combining multiple files into one document. Sorry that I didn't see \xmlinclude, that's of course just what I was looking for. But after searching the list, I saw a couple old messages by Hans dan der Meer which made me realise I have no idea yet how to use it. Something like this? > > file chapter_1.xml > <chapter> > text > </chapter> > > file <chapter_2.xml > <chapter> > text > </chapter> > > and then > > file master.xml > <document> > <xi:include href="chapter_1.xml/> > <xi:include href="chapter_2.xml/> > </document> > > Would translate to > > \startxmlsetups xml:xi:include > \startchapter > \xmltext{#1}{chapter} > \stopchapter > \stopchapter > > Is that the basic structure, or am I misunderstanding the way this could be used? > > All best > > Thomas > ___________________________________________________________________________________ > 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: here is ae 2012-12-16 22:08 ` Sietse Brouwer @ 2012-12-16 22:19 ` Schmitz Thomas A. 2012-12-16 23:22 ` Sietse Brouwer 0 siblings, 1 reply; 11+ messages in thread From: Schmitz Thomas A. @ 2012-12-16 22:19 UTC (permalink / raw) To: mailing list for ConTeXt users On Dec 16, 2012, at 11:08 PM, Sietse Brouwer <sbbrouwer@gmail.com> wrote: > http://wiki.contextgarden.net/Command/xmlinclude > > Wikified, but sans example for now. Thomas, could I leave that to you? > Writing about things I don't understand is one thing, but producing > working code that I don't understand is something I am happy to leave > to the experts. ;-) > > Cheers, > Sietse The horror :-) That was pseudo-code, and I have not the faintest idea if this works at all! But it's good you put this up on the wiki: it will create a disturbance in the space-time continuum which is so strong that Hans will have to tell us how it really works - otherwise, the Mayas may turn out to be right after all... All best Thomas ___________________________________________________________________________________ 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] 11+ messages in thread
* Re: here is ae 2012-12-16 22:19 ` Schmitz Thomas A. @ 2012-12-16 23:22 ` Sietse Brouwer 0 siblings, 0 replies; 11+ messages in thread From: Sietse Brouwer @ 2012-12-16 23:22 UTC (permalink / raw) To: mailing list for ConTeXt users >> Wikified, but sans example for now. Thomas, could I leave that to you? >> Writing about things I don't understand is one thing, but producing >> working code that I don't understand is something I am happy to leave >> to the experts. ;-) > The horror :-) That was pseudo-code, and I have not the > faintest idea if this works at all! But it's good you put > this up on the wiki: it will create a disturbance in the > space-time continuum which is so strong that Hans will > have to tell us how it really works - otherwise, the Mayas > may turn out to be right after all... You see, Hans, you must tell us how it really works. The fate of the Earth lies in your hands! --Sietse ___________________________________________________________________________________ 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] 11+ messages in thread
* Re: here is ae 2012-12-16 21:07 ` Schmitz Thomas A. 2012-12-16 22:08 ` Sietse Brouwer @ 2012-12-17 9:15 ` Hans Hagen 2012-12-17 9:22 ` Thomas A. Schmitz 2012-12-17 15:02 ` Thomas A. Schmitz 1 sibling, 2 replies; 11+ messages in thread From: Hans Hagen @ 2012-12-17 9:15 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Schmitz Thomas A. On 12/16/2012 10:07 PM, Schmitz Thomas A. wrote: > > On Dec 16, 2012, at 2:46 PM, Hans Hagen <pragma@wxs.nl> wrote: > >> Using xml sounds ok to me (esp as you know how to do it) ... with xinclude you mean combining multiple files into one? It's what we do in all xml related projects here. There is actually an \xmlinclude command >> >> \xmlinclude{main}{include}{filename|href|name} >> >> this will include from elements with tags 'include' and one of the attributes mentioned. Do this as one of the first steps as it merges xml trees. >> >> Hans > > Hi Hans, > > thanks for your suggestion. Yes, I mean combining multiple files into one document. Sorry that I didn't see \xmlinclude, that's of course just what I was looking for. But after searching the list, I saw a couple old messages by Hans dan der Meer which made me realise I have no idea yet how to use it. Something like this? > > file chapter_1.xml > <chapter> > text > </chapter> > > file <chapter_2.xml > <chapter> > text > </chapter> > > and then > > file master.xml > <document> > <xi:include href="chapter_1.xml/> > <xi:include href="chapter_2.xml/> > </document> > > Would translate to > > \startxmlsetups xml:xi:include > \startchapter > \xmltext{#1}{chapter} > \stopchapter > \stopchapter > > Is that the basic structure, or am I misunderstanding the way this could be used? well, that bit of code is *not* going so save the world (1) master tex file \startxmlsetups xml:setups \xmlinclude{#1}{xi:include}{href} \xmlsetsetup{#1}{document|chapter}{xml:*} \stopxmlsetups \xmlregistersetup{xml:setups} \startxmlsetups xml:document \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:chapter \startchapter[title=\xmltext{#1}{title}] \xmlall{#1}{content} \stopchapter \stopxmlsetups \starttext \xmlprocessfile{main}{master.xml}{} \stoptext (2) master xml file (with balanced quotes) <document> <xi:include href="chapter_1.xml"/> <xi:include href="chapter_2.xml"/> </document> (3) proper chapters: <chapter> <title>one</title> <content>text</content> </chapter> and <chapter> <title>two</title> <content>text</content> </chapter> 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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] 11+ messages in thread
* Re: here is ae 2012-12-17 9:15 ` Hans Hagen @ 2012-12-17 9:22 ` Thomas A. Schmitz 2012-12-17 15:02 ` Thomas A. Schmitz 1 sibling, 0 replies; 11+ messages in thread From: Thomas A. Schmitz @ 2012-12-17 9:22 UTC (permalink / raw) To: Hans Hagen; +Cc: mailing list for ConTeXt users On 12/17/2012 10:15 AM, Hans Hagen wrote: > well, that bit of code is *not* going so save the world It's going to save my world... Will wikify as soon as I've played a bit with it, thanks a lot! > (2) master xml file (with balanced quotes) that's what I meant - someone forgets to balance their quotes, and next thing we know, the entire internet is coming down and the world ends. All best Thomas ___________________________________________________________________________________ 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] 11+ messages in thread
* Re: here is ae 2012-12-17 9:15 ` Hans Hagen 2012-12-17 9:22 ` Thomas A. Schmitz @ 2012-12-17 15:02 ` Thomas A. Schmitz 1 sibling, 0 replies; 11+ messages in thread From: Thomas A. Schmitz @ 2012-12-17 15:02 UTC (permalink / raw) To: mailing list for ConTeXt users On 12/17/2012 10:15 AM, Hans Hagen wrote: > well, that bit of code is *not* going so save the world OK, after playing with it for a while now: 1. Is it possible to have the benefits of components, i.e. compiling just one chapter with crossrefs, pagenumbers etc. taken over from the main file? 2. Bibliography: I have trouble getting normal bibliography to work, so I guess it would be best to embark on putting the references into an xml file and then writing my own macros for that? Thanks a lot Thomas ___________________________________________________________________________________ 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] 11+ messages in thread
* Re: one small remark and one broad question 2012-12-15 16:07 one small remark and one broad question Thomas A. Schmitz 2012-12-16 0:45 ` Cecil Westerhof 2012-12-16 13:46 ` here is ae Hans Hagen @ 2012-12-19 8:14 ` Thomas A. Schmitz 2 siblings, 0 replies; 11+ messages in thread From: Thomas A. Schmitz @ 2012-12-19 8:14 UTC (permalink / raw) To: mailing list for ConTeXt users On 12/15/2012 05:07 PM, Thomas A. Schmitz wrote: > Hi all, > > small remark first: archive.contextgarden.net has been down for a few > days now; I suppose because of the new server? I don't want to be a pest, but the archive still hasn't come back to life yet... All best Thomas ___________________________________________________________________________________ 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] 11+ messages in thread
end of thread, other threads:[~2012-12-19 8:14 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-12-15 16:07 one small remark and one broad question Thomas A. Schmitz 2012-12-16 0:45 ` Cecil Westerhof 2012-12-16 13:46 ` here is ae Hans Hagen 2012-12-16 21:07 ` Schmitz Thomas A. 2012-12-16 22:08 ` Sietse Brouwer 2012-12-16 22:19 ` Schmitz Thomas A. 2012-12-16 23:22 ` Sietse Brouwer 2012-12-17 9:15 ` Hans Hagen 2012-12-17 9:22 ` Thomas A. Schmitz 2012-12-17 15:02 ` Thomas A. Schmitz 2012-12-19 8:14 ` one small remark and one broad question Thomas A. Schmitz
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).