typesetting serial letters in Context
Hello all,
I have been using Context mkii with the x-corres.mkii module for a number of years now, for many different purposes (mailings, certificates, etc). The module works with an xml (actually rng) file with the following structure:
<contacts>
On Tue, Jun 13, 2017 at 9:40 AM,
Hello all,
I have been using Context mkii with the x-corres.mkii module for a number of years now, for many different purposes (mailings, certificates, etc). The module works with an xml (actually rng) file with the following structure:
<contacts>
<formalname>Janssen</formalname> <informalname>Piet</informalname> </contact> </contacts> The contents of each item is grabbed and put in the document by means of the command \XMLflush{formalname}.
I would like to shift to mkiv now with all its possibilities.
Yet there is no x-corres.mkiv. Who can help me out?
I don't remember x-corres.mkiv, but mkiv has a guide tex/texmf-context/doc/context/documents/general/manuals/xml-mkiv.pdf -- luigi
On 13. Jun 2017, at 09:53, luigi scarso
wrote: Yet there is no x-corres.mkiv. Who can help me out?
I don't remember x-corres.mkiv, but mkiv has a guide tex/texmf-context/doc/context/documents/general/manuals/xml-mkiv.pdf
Yes, typesetting xml in mkiv is a completely different beast from mkii. It is vastly superior and very powerful, but you will have to relearn and recode. There is the manual Luigi mentioned, there are also some pages on the wiki to facilitate the transition. Thomas
The problem is that I am not a programmer: I do not know where to start … Robert
Op 13 jun. 2017, om 10:31 heeft Thomas A. Schmitz
het volgende geschreven: On 13. Jun 2017, at 09:53, luigi scarso
wrote: Yet there is no x-corres.mkiv. Who can help me out?
I don't remember x-corres.mkiv, but mkiv has a guide tex/texmf-context/doc/context/documents/general/manuals/xml-mkiv.pdf
Yes, typesetting xml in mkiv is a completely different beast from mkii. It is vastly superior and very powerful, but you will have to relearn and recode. There is the manual Luigi mentioned, there are also some pages on the wiki to facilitate the transition.
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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
I can take the information out of the nodes. The main problem is to use them in a layout and in a sequences other the one they appear in the xml data file. In the current (mkii) file I have something like this: \midaligned{\XMLflush{formalname}, \XMLflush{informalname}}. Another point on my wishlist is to change the background of the certificate depending on the type of certificate. In mkii I manage to do this as follows: File: participants.xml <contacts> <contact> <formalname>Janssen</formalname> <informalname>Piet</informalname> <courselevel>levelA</courselevel> </contact> </contacts> certificates.tex: \resetlayer[module]{} \setlayer[module][][]{\externalfigure[\XMLflush{courselevel}[width=\paperwidth,height=\paperheight]} \useexternalfigure[levelA][sjablonen/backgroundlevelA.pdf] Help is very much appreciated! Robert
Op 13 jun. 2017, om 09:53 heeft luigi scarso
het volgende geschreven: On Tue, Jun 13, 2017 at 9:40 AM,
wrote: Hello all,
I have been using Context mkii with the x-corres.mkii module for a number of years now, for many different purposes (mailings, certificates, etc). The module works with an xml (actually rng) file with the following structure:
<contacts>
<formalname>Janssen</formalname> <informalname>Piet</informalname> </contact> </contacts> The contents of each item is grabbed and put in the document by means of the command \XMLflush{formalname}.
I would like to shift to mkiv now with all its possibilities.
Yet there is no x-corres.mkiv. Who can help me out?
I don't remember x-corres.mkiv, but mkiv has a guide tex/texmf-context/doc/context/documents/general/manuals/xml-mkiv.pdf
-- luigi ___________________________________________________________________________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
I still cannot generate letters from my xml database, although there is apparently a solution to use csv files through lua code (https://tex.stackexchange.com/questions/72735/how-to-create-form-letters-fro... https://tex.stackexchange.com/questions/72735/how-to-create-form-letters-fro...). Your help is much appreciated! Yet I found out how to generate certificates with backgrounds changing according to the candidate's course level, which I would like to share with you: %%%%% participants.xml <contacts> <contact> <formalname>Janssen</formalname> <informalname>Piet</informalname> <initials>P.</initials> <courselevel>levelA</courselevel> <coursedate>1 june 2017</coursedate> <city>Nijmegen</city> </contact> </contacts> %%%% certificates.tex \setuppapersize[A4,landscape][A4,landscape] \setuplayout[width=170mm,topspace=60mm,rightmargindistance=2.5mm] \definelayer[module][width=\paperwidth,height=\paperheight,preset=middle] \useexternalfigure[levelA][sjablonen/CourseLevelA.pdf] \resetlayer[level]{} \setupbackgrounds[page][background={level}] \startxmlsetups xml:setups \xmlsetsetup{#1}{contacts}{xml:contacts} \xmlsetsetup{#1}{contact}{xml:contacts:contact} \stopxmlsetups \xmlregistersetup{xml:setups} \startxmlsetups xml:contacts \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:contacts:contact \setlayer[module][][]{\externalfigure[\xmltext{#1}{/courselevel}][factor=550]} \startalignment [middle] \color[red]{{\tfd \xmltext{#1}{/initials}} {\tfd \xmltext{#1}{/formalname}}\par \blank[10mm] {\ss \xmltext{#1}{/city}, \xmltext{#1}{/coursedate}} \stopalignment \page[yes] \stopxmlsetups \starttext \xmlprocessfile{main}{./participants.xml}{} \stoptext Kind regards, Robert
Op 13 jun. 2017, om 15:59 heeft r.ermers@hccnet.nl het volgende geschreven:
I can take the information out of the nodes. The main problem is to use them in a layout and in a sequences other the one they appear in the xml data file.
In the current (mkii) file I have something like this: \midaligned{\XMLflush{formalname}, \XMLflush{informalname}}.
Another point on my wishlist is to change the background of the certificate depending on the type of certificate. In mkii I manage to do this as follows:
File: participants.xml <contacts> <contact> <formalname>Janssen</formalname> <informalname>Piet</informalname> <courselevel>levelA</courselevel> </contact> </contacts>
certificates.tex: \resetlayer[module]{} \setlayer[module][][]{\externalfigure[\XMLflush{courselevel}[width=\paperwidth,height=\paperheight]}
\useexternalfigure[levelA][sjablonen/backgroundlevelA.pdf]
Help is very much appreciated!
Robert
Op 13 jun. 2017, om 09:53 heeft luigi scarso
het volgende geschreven: On Tue, Jun 13, 2017 at 9:40 AM,
wrote: Hello all,
I have been using Context mkii with the x-corres.mkii module for a number of years now, for many different purposes (mailings, certificates, etc). The module works with an xml (actually rng) file with the following structure:
<contacts>
<formalname>Janssen</formalname> <informalname>Piet</informalname> </contact> </contacts> The contents of each item is grabbed and put in the document by means of the command \XMLflush{formalname}.
I would like to shift to mkiv now with all its possibilities.
Yet there is no x-corres.mkiv. Who can help me out?
I don't remember x-corres.mkiv, but mkiv has a guide tex/texmf-context/doc/context/documents/general/manuals/xml-mkiv.pdf
-- luigi ___________________________________________________________________________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (3)
-
luigi scarso
-
r.ermers@hccnet.nl
-
Thomas A. Schmitz