xml with interaction fails in footnotes
Good evening all, I'm experiencing a weird behaviour when using my module to transliterate stuff in a footnote. ConTeXt fails with an undefined control sequence if an only if I switch on interaction. The issue vanishes when I removing either the footnote environment or the interaction or the transliteration or the tag with the text to be transliterated. In the following minimal example I specified the lines that will make context process the file when commented out. Please note that everything works fine outside xml as the transliteration immediately after “\starttext” demonstrates. Thanks for any help, Philipp ---8<-------------------------------------------------------------------------- \enabletrackers[xml.entities] \enabletrackers[xml.parse] \enabletrackers[xml.path] \enabletrackers[xml.profile] \enabletrackers[xml.remap] \enabletrackers[lxml.access] \enabletrackers[lxml.comments] \enabletrackers[lxml.loading] \enabletrackers[lxml.manipulations] \enabletrackers[lxml.setups] \setupinteraction[state=start] %this one \usemodule[transliterator] \startxmlsetups xml:testsetups \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{ body| content| trru| %this one fn| }{xml:*} \stopxmlsetups \xmlregistersetup{xml:testsetups} \startxmlsetups xml:body \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:content \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:fn \startfootnote %this together with … \xmlflush{#1} \stopfootnote %… this one \stopxmlsetups \startxmlsetups xml:trru \starttransliterate %this together with … \xmlflush{#1} \stoptransliterate %… this one \stopxmlsetups \starttext \transliterate{раз, два, три} \startbuffer <body> <content> Content to include with a footnote <fn> <trru>раз, два, три</trru> %this one </fn> </content> </body> \stopbuffer \xmlprocessbuffer{test}{}{} \stoptext ---8<-------------------------------------------------------------------------- -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
On 2010-03-15 <00:12:03>, Philipp Gesang wrote:
Good evening all,
I'm experiencing a weird behaviour when using my module to transliterate stuff in a footnote. ConTeXt fails with an undefined control sequence if an only if I switch on interaction.
The issue vanishes when I removing either the footnote environment or the interaction or the transliteration or the tag with the text to be transliterated.
In the following minimal example I specified the lines that will make context process the file when commented out. Please note that everything works fine outside xml as the transliteration immediately after “\starttext” demonstrates. Correction: It doesn't work fine outside xml, too, when again put in a footnote.[1] So forget about the xml part. Interaction seems to be the culprit.
Philipp [1] Like this: ---8<-------------------------------------------------------------------------- Words before a footnote\footnote{ \transliterate{раз, два, три} } ---8<--------------------------------------------------------------------------
Thanks for any help,
Philipp
---8<--------------------------------------------------------------------------
\enabletrackers[xml.entities] \enabletrackers[xml.parse] \enabletrackers[xml.path] \enabletrackers[xml.profile] \enabletrackers[xml.remap] \enabletrackers[lxml.access] \enabletrackers[lxml.comments] \enabletrackers[lxml.loading] \enabletrackers[lxml.manipulations] \enabletrackers[lxml.setups]
\setupinteraction[state=start] %this one \usemodule[transliterator]
\startxmlsetups xml:testsetups \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{ body| content| trru| %this one fn| }{xml:*} \stopxmlsetups
\xmlregistersetup{xml:testsetups}
\startxmlsetups xml:body \xmlflush{#1} \stopxmlsetups
\startxmlsetups xml:content \xmlflush{#1} \stopxmlsetups
\startxmlsetups xml:fn \startfootnote %this together with … \xmlflush{#1} \stopfootnote %… this one \stopxmlsetups
\startxmlsetups xml:trru \starttransliterate %this together with … \xmlflush{#1} \stoptransliterate %… this one \stopxmlsetups
\starttext
\transliterate{раз, два, три}
\startbuffer <body> <content> Content to include with a footnote <fn> <trru>раз, два, три</trru> %this one </fn> </content> </body> \stopbuffer
\xmlprocessbuffer{test}{}{}
\stoptext
---8<--------------------------------------------------------------------------
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
___________________________________________________________________________________ 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
Have you updated to the latest context minimals version. That might
solve the problem. I had a similar problem with including a clickable
URL in a footnote. Updating solved it.
On 3/14/10, Philipp Gesang
On 2010-03-15 <00:12:03>, Philipp Gesang wrote:
Good evening all,
I'm experiencing a weird behaviour when using my module to transliterate stuff in a footnote. ConTeXt fails with an undefined control sequence if an only if I switch on interaction.
The issue vanishes when I removing either the footnote environment or the interaction or the transliteration or the tag with the text to be transliterated.
In the following minimal example I specified the lines that will make context process the file when commented out. Please note that everything works fine outside xml as the transliteration immediately after “\starttext” demonstrates. Correction: It doesn't work fine outside xml, too, when again put in a footnote.[1] So forget about the xml part. Interaction seems to be the culprit.
Philipp
[1] Like this: ---8<-------------------------------------------------------------------------- Words before a footnote\footnote{ \transliterate{раз, два, три} } ---8<--------------------------------------------------------------------------
Thanks for any help,
Philipp
---8<--------------------------------------------------------------------------
\enabletrackers[xml.entities] \enabletrackers[xml.parse] \enabletrackers[xml.path] \enabletrackers[xml.profile] \enabletrackers[xml.remap] \enabletrackers[lxml.access] \enabletrackers[lxml.comments] \enabletrackers[lxml.loading] \enabletrackers[lxml.manipulations] \enabletrackers[lxml.setups]
\setupinteraction[state=start] %this one \usemodule[transliterator]
\startxmlsetups xml:testsetups \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{ body| content| trru| %this one fn| }{xml:*} \stopxmlsetups
\xmlregistersetup{xml:testsetups}
\startxmlsetups xml:body \xmlflush{#1} \stopxmlsetups
\startxmlsetups xml:content \xmlflush{#1} \stopxmlsetups
\startxmlsetups xml:fn \startfootnote %this together with … \xmlflush{#1} \stopfootnote %… this one \stopxmlsetups
\startxmlsetups xml:trru \starttransliterate %this together with … \xmlflush{#1} \stoptransliterate %… this one \stopxmlsetups
\starttext
\transliterate{раз, два, три}
\startbuffer <body> <content> Content to include with a footnote <fn> <trru>раз, два, три</trru> %this one </fn> </content> </body> \stopbuffer
\xmlprocessbuffer{test}{}{}
\stoptext
---8<--------------------------------------------------------------------------
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
___________________________________________________________________________________ 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
-- Sent from my mobile device
On 2010-03-14 <22:01:40>, Curiouslearn wrote:
Have you updated to the latest context minimals version. That might solve the problem. I had a similar problem with including a clickable URL in a footnote. Updating solved it. Yes, I did. It's friday's beta and recent minimals but I remember already experiencing this error a while ago and ignoring it back then (by switching off interaction). And note that I don't even have clickable stuff _in_ the footnote, it is the raised footnote marker itself that is clickable.
Thanks anyways, Philipp
On 3/14/10, Philipp Gesang
wrote: On 2010-03-15 <00:12:03>, Philipp Gesang wrote:
Good evening all,
I'm experiencing a weird behaviour when using my module to transliterate stuff in a footnote. ConTeXt fails with an undefined control sequence if an only if I switch on interaction.
The issue vanishes when I removing either the footnote environment or the interaction or the transliteration or the tag with the text to be transliterated.
In the following minimal example I specified the lines that will make context process the file when commented out. Please note that everything works fine outside xml as the transliteration immediately after “\starttext” demonstrates. Correction: It doesn't work fine outside xml, too, when again put in a footnote.[1] So forget about the xml part. Interaction seems to be the culprit.
Philipp
[1] Like this: ---8<-------------------------------------------------------------------------- Words before a footnote\footnote{ \transliterate{раз, два, три} } ---8<--------------------------------------------------------------------------
Thanks for any help,
Philipp
---8<--------------------------------------------------------------------------
\enabletrackers[xml.entities] \enabletrackers[xml.parse] \enabletrackers[xml.path] \enabletrackers[xml.profile] \enabletrackers[xml.remap] \enabletrackers[lxml.access] \enabletrackers[lxml.comments] \enabletrackers[lxml.loading] \enabletrackers[lxml.manipulations] \enabletrackers[lxml.setups]
\setupinteraction[state=start] %this one \usemodule[transliterator]
\startxmlsetups xml:testsetups \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{ body| content| trru| %this one fn| }{xml:*} \stopxmlsetups
\xmlregistersetup{xml:testsetups}
\startxmlsetups xml:body \xmlflush{#1} \stopxmlsetups
\startxmlsetups xml:content \xmlflush{#1} \stopxmlsetups
\startxmlsetups xml:fn \startfootnote %this together with … \xmlflush{#1} \stopfootnote %… this one \stopxmlsetups
\startxmlsetups xml:trru \starttransliterate %this together with … \xmlflush{#1} \stoptransliterate %… this one \stopxmlsetups
\starttext
\transliterate{раз, два, три}
\startbuffer <body> <content> Content to include with a footnote <fn> <trru>раз, два, три</trru> %this one </fn> </content> </body> \stopbuffer
\xmlprocessbuffer{test}{}{}
\stoptext
---8<--------------------------------------------------------------------------
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
___________________________________________________________________________________ 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
-- Sent from my mobile device ___________________________________________________________________________________ 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
On 15-3-2010 0:32, Philipp Gesang wrote:
On 2010-03-15<00:12:03>, Philipp Gesang wrote:
Good evening all,
I'm experiencing a weird behaviour when using my module to transliterate stuff in a footnote. ConTeXt fails with an undefined control sequence if an only if I switch on interaction.
The issue vanishes when I removing either the footnote environment or the interaction or the transliteration or the tag with the text to be transliterated.
In the following minimal example I specified the lines that will make context process the file when commented out. Please note that everything works fine outside xml as the transliteration immediately after “\starttext” demonstrates. Correction: It doesn't work fine outside xml, too, when again put in a footnote.[1] So forget about the xml part. Interaction seems to be the culprit.
you have to make a minial example that i can run here (no fancy module code that can interfere) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 2010-03-15 <14:10:10>, Hans Hagen wrote:
On 15-3-2010 0:32, Philipp Gesang wrote:
On 2010-03-15<00:12:03>, Philipp Gesang wrote:
Good evening all,
I'm experiencing a weird behaviour when using my module to transliterate stuff in a footnote. ConTeXt fails with an undefined control sequence if an only if I switch on interaction.
The issue vanishes when I removing either the footnote environment or the interaction or the transliteration or the tag with the text to be transliterated.
In the following minimal example I specified the lines that will make context process the file when commented out. Please note that everything works fine outside xml as the transliteration immediately after “\starttext” demonstrates. Correction: It doesn't work fine outside xml, too, when again put in a footnote.[1] So forget about the xml part. Interaction seems to be the culprit.
you have to make a minial example that i can run here (no fancy module code that can interfere)
Of course. I could narrow it down to this. Try commenting out the interaction part. ---8<------------------------------------------------------------------------- \setupinteraction[state=start] \def\test{\dosingleempty\dotest} \def\dotest[#1]#2{#2} \starttext Words before a footnote\footnote{ Test \test{Test} } \stoptext % vim:ft=context ---8<------------------------------------------------------------------------- The error I get is the same as with my module: ---8<------------------------------------------------------------------------- ! Undefined control sequence. \dododescriptioncomponent ...entdescriptioncoding \s!tex \fi \ifx \currentde... \@@notemakedescription ...list =,\c!bookmark =,][] \xdef \currentnotenumber {... l.11 } ---8<------------------------------------------------------------------------- Philipp
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 ___________________________________________________________________________________
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
Am 15.03.10 19:01, schrieb Philipp Gesang:
Of course. I could narrow it down to this. Try commenting out the interaction part. ---8<-------------------------------------------------------------------------
\setupinteraction[state=start]
\def\test{\dosingleempty\dotest}
\unexpanded\def\test{\dosingleempty\dotest} Wolfgang
On 2010-03-15 <22:40:39>, Wolfgang Schuster wrote:
Am 15.03.10 19:01, schrieb Philipp Gesang:
Of course. I could narrow it down to this. Try commenting out the interaction part. ---8<-------------------------------------------------------------------------
\setupinteraction[state=start]
\def\test{\dosingleempty\dotest} \unexpanded\def\test{\dosingleempty\dotest}
Great, this works with the simple command. But how would I apply this onto the \long definition you gave me? To be honest I tried almost all the expansion related stuff from Chapter 20 of the TeXbook and the whole unexpanded family from syst-aux.mkiv but could not get it working. ---8<------------------------------------------------------------------------- \tracingcommands=1 \tracingonline=1 \setupinteraction[state=start] \unexpanded\def\test{\dosingleempty\dotest} \def\dotest[#1]#2{#2} \def\startsomething{% \bgroup% \dosingleempty\dostartsomething } %\long\unexpanded\def\dostartsomething[#1]#2\stopsomething{% \long\def\dostartsomething[#1]#2\stopsomething{% \dotest[#1]{#2} \egroup% } \starttext Words before a footnote\footnote{ The Test \test{The other Test} \startsomething[nothing] The next Test \stopsomething } \stoptext % vim:ft=context ---8<------------------------------------------------------------------------- Philipp
On 2010-03-16 <00:33:12>, Wolfgang Schuster wrote:
Am 16.03.10 00:20, schrieb Philipp Gesang:
\def\startsomething{% \bgroup% \dosingleempty\dostartsomething } \unexpanded\def\startsomething{...}
\let\stopsomething\relax
Thanks, but that didn't work either. I'm now convinced it is a bug because ConTeXt's own \[start|stop]commands fail as well. The following code works flawlessly with texexec but not in MkIV: ···8<·········································································· \tracingcommands=1 \tracingonline=1 \setupinteraction[state=start] \unexpanded\def\test{\dosingleempty\dotest} \def\dotest[#1]#2{#2} \def\startsomething{% \bgroup% \dosingleempty\dostartsomething } \unexpanded\def\dostartsomething[#1]#2\stopsomething{% #2 \egroup% } \starttext Words before a footnote% \startfootnote \startnarrower[left] Test \stopnarrower %\startsomething[naught] %Test %\stopsomething \stopfootnote \stoptext % vim:ft=context ···8<··········································································
Am 16.03.10 10:58, schrieb Philipp Gesang:
On 2010-03-16<00:33:12>, Wolfgang Schuster wrote:
Am 16.03.10 00:20, schrieb Philipp Gesang:
\def\startsomething{% \bgroup% \dosingleempty\dostartsomething }
\unexpanded\def\startsomething{...}
\let\stopsomething\relax
Thanks, but that didn't work either.
Then something is wrong in your test file because i tested the above myself and it worked, to get your own module working replace your translate macros with this: \def\dotransliterate[#1]#2{% \bgroup \iffirstargument \getparameters[TRL][#1]% \fi \language[\TRLhyphenate]% \ctxlua{translit.transliterate("\TRLmode","\luaescapestring{#2}")}% \egroup } \unexpanded\def\transliterate{\dosingleempty\dotransliterate} \unexpanded\def\starttransliterate{% \bgroup% \dosingleempty\dostarttransliterate } \let\stoptransliterate\relax \def\dostarttransliterate[#1]#2\stoptransliterate{% \iffirstargument \setuptransliterate[#1]% \fi \language[\TRLhyphenate]% \ctxlua{translit.transliterate("\TRLmode","\luaescapestring{#2}")}% \egroup } Test: \setupinteraction[state=start] \usemodule[transliterator] \starttext Words before a footnote\footnote{ \transliterate[]{раз, два, три} } Words before a footnote\startfootnote \starttransliterate[]раз, два, три\stoptransliterate \stopfootnote \stoptext Wolfgang
On 2010-03-16 <11:48:20>, Wolfgang Schuster wrote:
On 2010-03-16<00:33:12>, Wolfgang Schuster wrote:
Am 16.03.10 00:20, schrieb Philipp Gesang:
\def\startsomething{% \bgroup% \dosingleempty\dostartsomething } \unexpanded\def\startsomething{...}
\let\stopsomething\relax Thanks, but that didn't work either. Then something is wrong in your test file because i tested
Am 16.03.10 10:58, schrieb Philipp Gesang: the above myself and it worked, to get your own module working replace your translate macros with this: Thanks, I had applied your previous suggestion in the wrong order. This now works.
But what about environments like \startnarrower? Are they supposed to work in footnotes? How do I know when writing a document that I can't use them in footnotes when interaction is enabled? (Sorry I can't look up in the wiki right now whether this is mentioned or not.) Philipp Example: ···8<·········································································· \setupinteraction[state=start] \starttext Words before a footnote% \startfootnote \startnarrower[left] Test \stopnarrower \stopfootnote \stoptext ···8<··········································································
\def\dotransliterate[#1]#2{% \bgroup \iffirstargument \getparameters[TRL][#1]% \fi \language[\TRLhyphenate]% \ctxlua{translit.transliterate("\TRLmode","\luaescapestring{#2}")}% \egroup }
\unexpanded\def\transliterate{\dosingleempty\dotransliterate}
\unexpanded\def\starttransliterate{% \bgroup% \dosingleempty\dostarttransliterate }
\let\stoptransliterate\relax
\def\dostarttransliterate[#1]#2\stoptransliterate{% \iffirstargument \setuptransliterate[#1]% \fi \language[\TRLhyphenate]% \ctxlua{translit.transliterate("\TRLmode","\luaescapestring{#2}")}% \egroup }
Test:
\setupinteraction[state=start]
\usemodule[transliterator]
\starttext
Words before a footnote\footnote{ \transliterate[]{раз, два, три} }
Words before a footnote\startfootnote \starttransliterate[]раз, два, три\stoptransliterate \stopfootnote
\stoptext
Wolfgang
___________________________________________________________________________________ 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
On 16-3-2010 0:20, Philipp Gesang wrote:
onto the \long definition you gave me? To be honest I tried almost all
fyi: in mkiv all macros are long (luatex option) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Curiouslearn
-
Hans Hagen
-
Philipp Gesang
-
Wolfgang Schuster