On 2010-03-17 <11:28:30>, Hans van der Meer wrote:
Typesetting material containing macro's from inside a xml-node does not give TeX-ed results. How can this be accomplished? Hi Hans,
I'm using extra tags with setups because no TeX code seems to be processed directly from the xml file. ---8<-test.xml----------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <test> This must be {\bf bold text}. This is <bf>bold text</bf>. </test> ---8<-------------------------------------------------------------------------- ---8<-test.tex----------------------------------------------------------------- \startxmlsetups xml:testsetups \xmlsetsetup{test}{test|bf}{xml:*} \stopxmlsetups \xmlregistersetup{xml:testsetups} \startxmlsetups xml:bf {\bold \xmlflush{#1}} \stopxmlsetups \startxmlsetups xml:test \xmlflush{#1}% same with: \xmltext{#1}{} \stopxmlsetups \setuppapersize[A6][A6] \starttext By \type{\xmlprocessfile{test}{test.xml}{}}:\par \xmlprocessfile{test}{test.xml}{} \blank Directly:\par This must be {\bf bold text}. \stoptext ---8<-------------------------------------------------------------------------- Like this it works here, Philipp
==== Minimal example ConTeXt code: \startxmlsetups xml:testsetups \xmlsetsetup{test}{test}{xml:*} \stopxmlsetups \xmlregistersetup{xml:testsetups} \startxmlsetups xml:test \xmlflush{#1}% same with: \xmltext{#1}{} \stopxmlsetups \setuppapersize[A6][A6] \starttext By \type{\xmlprocessfile{test}{test.xml}{}}:\par \xmlprocessfile{test}{test.xml}{} \blank Directly:\par This must be {\bf bold text}. \stoptext
==== Input: <?xml version="1.0" encoding="UTF-8"?> <test> This must be {\bf bold text}. </test>
==== Output:
Hans van der Meer
___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments