[NTG-context] Illegal parameter number in definition

juh juh+ntg-context at mailbox.org
Fri Jul 17 19:26:40 CEST 2015


Hi all,

I am totally new to ConTeXt. I am a long time LaTeX user and I got
interested in ConTeXt by a posting from Pablo in the Pandoc mailing
list. So he is to blame if you have to read silly questions from me in
the future. ;-)

To learn a bit more about ConTeXt I try to make an environment to
typeset TEI-XML files from http://www.deutschestextarchiv.de (DTA)

I ran into a problem with this XML from DTA:

<head>
 <hi rendition="#g">Zehenter Brief.</hi>
</head><lb/>
<p><hi rendition="#in">S</hi>ie sind also mit mir darinn einig, und
durch den Innhalt meiner

I tried to map the rendition attribute to ConTeXt with this code:

\startxmlsetups xml:teisetups
        \xmlsetsetup{#1}{*}{-}
        \xmlsetsetup{#1}{TEI|text|body|div|head|p|lb}{xml:*}
        \xmlsetsetup{#1}{hi[@rendition='#g']}{xml:hi}
\stopxmlsetups

The attribute of '#g' makes trouble. I get the following error message.

tex error       > error on line 5 in file tei-style.tex: ! Illegal
parameter number in definition of \14>:xml:teisetups

<to be read again>
g
<argument> ...lb}{xml:*}\xmlsetsetup {##1}{hi[@rendition='##g
                                                  ']}{xml:hig}
\syst_setups_start_xml_indeed ...1\expandafter {#3
                                                  }
l.5 \stopxmlsetups


 1     \startxmlsetups xml:teisetups
 2             \xmlsetsetup{#1}{*}{-}
 3             \xmlsetsetup{#1}{TEI|text|body|div|head|p|hi|lb}{xml:*}
 4             \xmlsetsetup{#1}{hi[@rendition='#g']}{xml:hig}
 5 >>  \stopxmlsetups

I think that I kind of understand the message. The hash '#' isn't
allowed in this place. Is it possible to escape the hash somehow or to
solve this issue in an other way?

TIA
juh

-- 
Das ZEN von Pandoc
B├╝cher und E-Books einfach und professionell produzieren
http://www.amazon.de/Das-ZEN-von-Pandoc-professionell/dp/1505218799/
Paperback (232 Seiten) und E-Book


More information about the ntg-context mailing list