Re: [NTG-context] directlua in xml-environment
On 11/13/2016 2:56 PM, Meer, Hans van der wrote: Here is something I do not understand. Possibly I am doing something wrong. The following code is fine, within <<>> the current contextversion is printed. \def\mymacro{\directlua{tex.print("\\contextversion")}} \starttext calling mymacro <<\mymacro>>\par \stoptext However calling \mymacro from inside \startxmlsetup .. \stopxmlsetup does not work and results in <<\contextversion>>. I guess that the catcode regime in that environment is to blame. But how do I change that in order to get things working? I looked into the LuaTeX-manual where catcodes in relation to tex.print are treated, but in vain and could not find how to. What do I have to change? \starttexcode ... \stoptexcode 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Another question about definerefereformat
Here is another question, I was wondering about. What is the ConTeXt’s way to provide the “right” (or “left”) argument when \definereferenceformat[text=…] is set? Starting from this example: \starttext \definereferenceformat[infig][text={Figure }] \startplacefigure[reference=fig:A] Some figure. \stopplacefigure This is \infig[fig:A]. \stoptext I would like to output “This is Figure 1 a.” Obviously I can type “This is \infig[fig:A]\,a.” to get the desired result; however it does not seem very “ConTeXt-ish” to me as “This is \in{Figure}{a}[fig:A].” is much more concise. Is there the possibility to have something like \infig[right=a][fig:A]? Thanks again. Benjamin ___ 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 ___
[NTG-context] Setupreferencing[interaction=text] breaks referenceformat[text={…}]
Hi, I’m not sure if this is the intended behaviour of the system, but I want to typeset “This is Figure 1.1 in Chapter A Good Story” in the attached minimal example. However, setting up the referencing interaction to text, this typesets “This is 1.1 in Chapter A Good Story”. The same holds true, when the reference format is not defined via \definereferenceformat, but also in \in{Figure}[fig:A]. Here is the minimal example: \starttext \setupreferencing[ left={}, right={}, interaction=text, % critical ] \definereferenceformat[infig][text={Figure }] \chapter[myreference]{A Good Story} \startplacefigure[reference=fig:A] Some figure. \stopplacefigure This is \infig[fig:A] in Chapter \about[myreference]. \stoptext Thank you very much for your help. Benjamin ___ 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 ___
[NTG-context] directlua in xml-environment
Here is something I do not understand. Possibly I am doing something wrong. The following code is fine, within <<>> the current contextversion is printed. \def\mymacro{\directlua{tex.print("\\contextversion")}} \starttext calling mymacro <<\mymacro>>\par \stoptext However calling \mymacro from inside \startxmlsetup .. \stopxmlsetup does not work and results in <<\contextversion>>. I guess that the catcode regime in that environment is to blame. But how do I change that in order to get things working? I looked into the LuaTeX-manual where catcodes in relation to tex.print are treated, but in vain and could not find how to. What do I have to change? 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___