Hi Thomas, Thanks for your new suggestions. As a matter of fact, I yesterday found the following suggestion (http://wiki.contextgarden.net/Layers): \definelayer[AddressBg] [location={right,top}, y=6cm, x=12cm, color=red, style=\ss\tfa]. I used this in the sample suggested by you yesterday. The address actually moves to the desired place! However, the color and style instructions (\ss\tfa) have no effect. I tried to solve that, as a first step, by putting \ss before the \xmlall instruction: \startxmlsetups xlm:contact \setlayer[AddressBg] {\framed[width=55mm,height=30mm, align=right,background=color, backgroundcolor=lightgray]{\ss\xmlall{#1}{/address}}} \strut ... \stopxmlsetups This works (see pdf), but there are probably other and better ways. Another persisting problem is that the commands are still not ‘expanded’ (see Pablo’s remarks). According to Pablo for some reason there is only one expansion level. This means that after an \input command, all other commands are not expanded (see pdf). This also applies to your suggestions (see pdf brieven2mkiv5.pdf): in the Knuth sample text the only command \TeX\, is not expanded either. Regards, Robert \startxmlsetups xml:setups \xmlsetsetup{#1}{contacts|contact|p}{xml:*} \stopxmlsetups \xmlregistersetup{xml:setups} \startxmlsetups xml:contacts \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \xmlflush{#1}\par \stopxmlsetups \startxmlsetups xml:contact \setlayer[address][x=20mm,y=40mm]{\framed[width=74mm,height=35mm,frame=on,offset=2mm,align=right]{\ignorespaces\xmltext{#1}{/address}}} \strut \blank [35mm] Subject: your life in \xmltext{#1}{/city} \blank [2*line] Dear \xmltext{#1}{/prefix} \xmltext{#1}{/formalname}, \blank [line] % \input knuth \relax This is a {\bf bold} test. \TeX\ \startitemize \item item \item item \stopitemize \input brieftekst-test.tex \relax \par %this \par is needed, for the last word of the file merges with Kind regards. Kind regards \blank [line] X \page \stopxmlsetups \setuppagenumbering [state=stop] \definelayer[address][width=\paperwidth,height=\paperheight] \setupbackgrounds [page][background={address}] \starttext \xmlprocessbuffer{main}{participants}{} \stoptext
Op 31 jul. 2017, om 23:57 heeft Schmitz Thomas A.
het volgende geschreven: On 31. Jul 2017, at 18:58, r.ermers@hccnet.nl wrote:
Would it be wise to perhaps follow the path set out by Thomas? In that case there should be a way to shift the address.
What efforts have you made to “shift the address”? Here is one way:
\startbuffer[participants] <contacts> <contact class='participant' label='Hendriks'> <formalname>Hendriks</formalname> <informalname>Karel</informalname> <prefix>mr.</prefix> <initials>K.</initials> <city>Arnhem</city> <address> <p>Mr. K. Hendriks</p> <p>Grotestraat 5</p> <p>1234 BB Arnhem</p> </address> <kix>1234bb5</kix> </contact> <contact class='participant' label='Janssen'> <formalname>Janssen</formalname> <informalname>Piet</informalname> <initials>P.</initials> <prefix>mr.</prefix> <city>Nijmegen</city> <address> <p>Mr. P. Janssen</p> <p>Kortestraat 8</p> <p>1234 AA Nijmegen</p> </address> <kix>1234aa8</kix> </contact> </contacts> \stopbuffer
\startxmlsetups xml:setups \xmlsetsetup{#1}{contacts|contact|p}{xml:*} \stopxmlsetups
\xmlregistersetup{xml:setups}
\startxmlsetups xml:contacts \xmlflush{#1} \stopxmlsetups
\startxmlsetups xml:p \xmlflush{#1}\par \stopxmlsetups
\startxmlsetups xml:contact \setlayer[address][x=20mm,y=40mm]{\framed[width=74mm,height=35mm,frame=on,offset=2mm,align=right]{\ignorespaces\xmltext{#1}{/address}}} \strut \blank [35mm] Subject: your life in \xmltext{#1}{/city} \blank [2*line] Dear \xmltext{#1}{/prefix} \xmltext{#1}{/formalname}, \blank [line] \input knuth \relax
Kind regards \blank [line] X \page \stopxmlsetups
\setuppagenumbering [state=stop]
\definelayer[address][width=\paperwidth,height=\paperheight]
\setupbackgrounds [page][background={address}]
\starttext \xmlprocessbuffer{main}{participants}{}
\stoptext
I still don’t see you trying to learn a new language one step at a time.
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 ___________________________________________________________________________________