[NTG-context] Output result to specified file path
How do you set the target output path and file name? Consider: % SOF \starttext Hello \stoptext % EOF Save as $HOME/test.tex and then: mkdir /tmp/subdir context --result=/tmp/subdir/test.pdf $HOME/test.tex Expected: PDF file is created in /tmp/subdir directory. Actual: PDF file is created in $HOME directory. Version: 2021.03.27 19:09 Thank you! ___ 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 ___
Re: [NTG-context] Issue with \handletokens\with and Lua-defined macros
On 3/29/2021 10:54 AM, Jairo A. del Rio wrote: Hi list! See the following example: \startluacode userdata = userdata or {} --Toy example --My actual function receives an argument, but the problem remains the same userdata.myfunction = function() return "343327959841638047651959775267761420323" .. "657838053757849835434002826851807933276" .. "324327913964298509889902373459201557839" .. "84828001486412574060553756854137069878601" end interfaces.implement{ name = "myfunction", public = true, actions = function () context(userdata.myfunction()) end } \stopluacode \def\colorfulnumbers#1{\colored[h=\luaexpr{40*#1},s=1,v=1]{#1}\ }% \starttext %It doesn't work %\handletokens{\myfunction}\with\colorfulnumbers \expandafter\handletokens\expandafter{\myfunction}\with\colorfulnumbers \stoptext As readily seen from my example, I want to color each figure of the numbers generated by a Lua function. However, the use of \expandafter's is cumbersome in this case. I don't want to loop over the result in Lua because I want to be able to apply \handletokens...\with... (or another macro with a similar purpose) with different macros at the TeX end once Lua has delivered results. How should I do it in ConTeXt? In the usual way: different from what you might expect: \startluacode userdata = userdata or { } userdata.myfunction = function() return "343327959841638047651959775267761420323" .. "657838053757849835434002826851807933276" .. "324327913964298509889902373459201557839" .. "84828001486412574060553756854137069878601" end \stopluacode \doloopovermatch {.} {\luaexpr{userdata.myfunction()}} {% \colored[h=\luaexpr{40*#1},s=1,v=1]{#1}\space } or let youself surprise by: \startluacode userdata = userdata or { } userdata.myfunction = function() return [[ 343327959841638047651959775267761420323 657838053757849835434002826851807933276 324327913964298509889902373459201557839 84828001486412574060553756854137069878601 ]] end \stopluacode \starttext \doloopovermatch {\letterpercent d} {\luaexpr{userdata.myfunction()}} {% \colored[h=\luaexpr{40*#1},s=1,v=1]{#1}\space } (I think it's even documented somewhere.) \handletokens is kind of mkii-ish and old fashioned. Hans - 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] issue field in bibliography
Hi, I have questions related with a journal named "Documentation photographque". Each issue is devoted to another theme. How should I declare this theme in bibliography fields when quoting articles? It is quite important to get it, because the main article is always named « Le point sur… » (I don't know exactly how to translate it in English. Something like "an overview of…") so quoting it makes only sense if the issue is named, at best after the title or the number. I thought issue may do it. Am I right? Or would be comment a better place? Best regards, Damien Thiriet ___ 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 ___
Re: [NTG-context] Radial gradient stops in SVG images
On 3/29/2021 1:47 AM, Thangalin wrote: In the latest release, SVG radial gradients appear to apply colour stops as solid black. Removing the elements produces a solid colour, but without a radial gradient. Hans may be aware of the issue. Meanwhile, here's an MWE. no support for gradientUnits yet - 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 ___
Re: [NTG-context] issue field in bibliography
On 3/29/21 10:45 AM, Damien Thiriet wrote: I have questions related with a journal named "Documentation photographque". Each issue is devoted to another theme. How should I declare this theme in bibliography fields when quoting articles? It is quite important to get it, because the main article is always named « Le point sur… » (I don't know exactly how to translate it in English. Something like "an overview of…") so quoting it makes only sense if the issue is named, at best after the title or the number. I thought issue may do it. Am I right? Or would be comment a better place? Are you asking about the ConTeXt implementation you want to implement or about the actual bibliographic representation you want on the page? If the former, we need more information: what style are you using for the list, what citation style? Show us some code, make a MWE. In both cases, we need an example of what your bibliographic entry should look like. Right now, we can only guess. 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 ___
[NTG-context] Issue with \handletokens\with and Lua-defined macros
Hi list! See the following example: \startluacode userdata = userdata or {} --Toy example --My actual function receives an argument, but the problem remains the same userdata.myfunction = function() return "343327959841638047651959775267761420323" .. "657838053757849835434002826851807933276" .. "324327913964298509889902373459201557839" .. "84828001486412574060553756854137069878601" end interfaces.implement{ name = "myfunction", public = true, actions = function () context(userdata.myfunction()) end } \stopluacode \def\colorfulnumbers#1{\colored[h=\luaexpr{40*#1},s=1,v=1]{#1}\ }% \starttext %It doesn't work %\handletokens{\myfunction}\with\colorfulnumbers \expandafter\handletokens\expandafter{\myfunction}\with\colorfulnumbers \stoptext As readily seen from my example, I want to color each figure of the numbers generated by a Lua function. However, the use of \expandafter's is cumbersome in this case. I don't want to loop over the result in Lua because I want to be able to apply \handletokens...\with... (or another macro with a similar purpose) with different macros at the TeX end once Lua has delivered results. How should I do it in ConTeXt? Thanks in advance. Cordially, Jairo ___ 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 ___