[NTG-context] Lua and inject.path to make a disconnected MetaPost path?

2024-01-08 Thread Gavin via ntg-context
Hello LuaMetaFun Fans, Can I use mp.inject.path in Lua to create a disconnected path in MetaPost? This is for my module that draws globes. I currently do something like this for drawing the continents. (This MWE has two triangular continents.) \startluacode continents = {} continents[1] =

Re: [NTG-context] lua-widow-control module error in LMTX

2022-05-14 Thread Max Chernoff via ntg-context
Hi all, I've pushed lwc v2.1.0 to CTAN and the Garden Modules site. This new version fully supports the ConTeXt grid snapping (MkIV/MkXL), and it also adds some improved logging. You can download this directly at https://modules.contextgarden.net/dl/lua-widow-control-v2.1.0.zip I

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-29 Thread Eduardo Bohoyo via ntg-context
Now, I don't have any widows in my document, and I only count 2 broken hyphens. However, I think this is at the expense of the shenanigans the module has "perpetrated" elsewhere, because, apart from the crazy horizontal spacing of some paragraph in the bibliography, the module lies to me in

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-28 Thread Max Chernoff via ntg-context
On 2022-04-28 3:30 a.m., Henning Hraban Ramm wrote: I’m afraid the above release introduced a bug; while the offical release ran through, I now get: module  > lua-widow-control > Widow/orphan detected. Attempting to remove. lua error   > lua error on line 112 in file

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-28 Thread Henning Hraban Ramm via ntg-context
Am 28.04.22 um 12:54 schrieb Eduardo Bohoyo via ntg-context: Hi Max: Here testing that beta version. As you know, my book is in grid mode, but I get the same error message as Hraban when the compilation crashes. However, when I comment grid again in my document, it does compile the pdf.

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-28 Thread Eduardo Bohoyo via ntg-context
Hi Max: Here testing that beta version. As you know, my book is in grid mode, but I get the same error message as Hraban when the compilation crashes. However, when I comment grid again in my document, it does compile the pdf. Thanks, Edu El 28/4/22 a las 9:25, Max Chernoff escribió: On

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-28 Thread Henning Hraban Ramm via ntg-context
Am 28.04.22 um 09:25 schrieb Max Chernoff via ntg-context: I _think_ that I've fixed it now. Can you try the beta version at https://github.com/gucci-on-fleek/lua-widow-control/releases/tag/release-47ff19d9804f6ecea64dda59426664680d9756e0 please? Hopefully this solves the issue. Hi

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-28 Thread Max Chernoff via ntg-context
On 2022-04-27 3:59 p.m., Eduardo Bohoyo wrote: When I uncomment grid=yes in my \setuplayout, lwc makes its real appearance on the scene. So it looks like lwc was broken with grid snapping. This surprised me -- I originally wrote lwc *specifically* to use with grid snapping -- but it looks like

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-27 Thread Max Chernoff via ntg-context
Quick question before I begin: are you using any especially "interesting" ConTeXt features? By "interesting" I mean things like grid typesetting, pagecolumns, bidirectional text, etc. I haven't tested lwc with every possible ConTeXt feature, so there may be some adverse interaction. If you are

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-26 Thread Eduardo Bohoyo via ntg-context
Erratum: When I wrote script, I meant hyphen. El 26/4/22 a las 11:45, Eduardo Bohoyo escribió: Hi: No line such as "Widow/orphan detected. Attempting to delete". I see interleaved new groups with the same line always repeating a warning message throughout the whole file. In short, there are

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-26 Thread Eduardo Bohoyo via ntg-context
Hi: No line such as "Widow/orphan detected. Attempting to delete". I see interleaved new groups with the same line always repeating a warning message throughout the whole file. In short, there are 613 new lines with the message "luatex warning > tex: left parfill skip is gone". But I didn't

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-25 Thread Max Chernoff via ntg-context
On 2022-04-25 6:51 p.m., Eduardo Bohoyo wrote: First things first.  I want to acknowledge and thank you for the tough mission that surely involves maintaining this module for the benefit of the TeX community and, most especially, for LMTX in particular, due to the very reasons you have just

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-25 Thread Eduardo Bohoyo via ntg-context
Hi, Max: First things first.  I want to acknowledge and thank you for the tough mission that surely involves maintaining this module for the benefit of the TeX community and, most especially, for LMTX in particular, due to the very reasons you have just explained. Regarding your remarks,

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-25 Thread Max Chernoff via ntg-context
(Please keep me CC'd as I'm not subscribed to the list) Hi, I'm the lua-widow-control author. > lua error > lua error on line 74 in file > /opt/luametatex/texmf-modules/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl > > The odd thing is that line 75 of the t-lua-widow-control

[NTG-context] lua-widow-control module error in LMTX

2022-04-21 Thread Eduardo Bohoyo via ntg-context
Hi, I would like to know if anyone has experienced the same error with the lua-widow-control module when compiling the pdf: modules > 'lua-widow-control' is loaded open source > level 2, order 3, name

Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-21 Thread Eduardo Bohoyo via ntg-context
El 21/4/22 a las 22:08, Eduardo Bohoyo escribió: Hi, I would like to know if anyone has experienced the same error with the lua-widow-control module when compiling the pdf: modules > 'lua-widow-control' is loaded open source > level 2, order 3, name

Re: [NTG-context] lua

2021-08-17 Thread Hans Hagen via ntg-context
On 8/17/2021 4:47 PM, Taco Hoekwater via ntg-context wrote: Hi Hans, On 17 Aug 2021, at 16:39, Hans van der Meer via ntg-context wrote: I am still interested in this luacondition 733 allthough the culprit has been spotted. Very nasty typo and hard to spot fo me. The “luacondition 733” is

Re: [NTG-context] lua

2021-08-17 Thread Hans Hagen via ntg-context
On 8/17/2021 4:39 PM, Hans van der Meer via ntg-context wrote: I am still interested in this luacondition 733 allthough the culprit has been spotted. Very nasty typo and hard to spot fo me. Shudder and enjoy: \ifxmlatt{#1}{regime}{xml}\let\Flush\ModuleFlushXML\else\let\FlushModuleFlushTEX\fi

Re: [NTG-context] lua

2021-08-17 Thread Hans Hagen via ntg-context
On 8/17/2021 3:49 PM, Hans van der Meer via ntg-context wrote: Where is this message on luacondition 733 coming from? I would be glad to get rid of it. The message does not pinpoint the problem location enough for me to find its cause. close source    > level 2, order 7, name

Re: [NTG-context] lua

2021-08-17 Thread Taco Hoekwater via ntg-context
Hi Hans, > On 17 Aug 2021, at 16:39, Hans van der Meer via ntg-context > wrote: > > I am still interested in this luacondition 733 allthough the culprit has been > spotted. Very nasty typo and hard to spot fo me. The “luacondition 733” is the \ifxmlatt . You get these numbers because the

Re: [NTG-context] lua

2021-08-17 Thread Hans van der Meer via ntg-context
I am still interested in this luacondition 733 allthough the culprit has been spotted. Very nasty typo and hard to spot fo me. Shudder and enjoy: \ifxmlatt{#1}{regime}{xml}\let\Flush\ModuleFlushXML\else\let\FlushModuleFlushTEX\fi instead of

[NTG-context] lua

2021-08-17 Thread Hans van der Meer via ntg-context
Where is this message on luacondition 733 coming from? I would be glad to get rid of it. The message does not pinpoint the problem location enough for me to find its cause. close source> level 2, order 7, name './modules-docs.tex' close source> level 1, order 7, name 'cont-yes.mkiv'

Re: [NTG-context] Lua code and table

2021-02-20 Thread Fabrice Couvreur
Hi Hans The xx.tex file works for me Thanks Fabrice Le ven. 19 févr. 2021 à 14:28, Hans Hagen a écrit : > On 2/19/2021 2:12 PM, Jano Kula wrote: > > Hi, > > > > On Fri, 19 Feb 2021 at 13:06, Hans Hagen > > wrote: > > > > On 2/19/2021 12:42 PM, Fabrice Couvreur

Re: [NTG-context] Lua code and table

2021-02-19 Thread Hans Hagen
On 2/19/2021 2:12 PM, Jano Kula wrote: Hi, On Fri, 19 Feb 2021 at 13:06, Hans Hagen > wrote: On 2/19/2021 12:42 PM, Fabrice Couvreur wrote: > Hi Hans,Thanks again for the ideas to improve my code. However, I am new > to Lua and my level is far from

Re: [NTG-context] Lua code and table

2021-02-19 Thread Jano Kula
Hi, On Fri, 19 Feb 2021 at 13:06, Hans Hagen wrote: > On 2/19/2021 12:42 PM, Fabrice Couvreur wrote: > > Hi Hans,Thanks again for the ideas to improve my code. However, I am new > > to Lua and my level is far from sufficient to understand everything. Why > > in no table do the crosses appear in

Re: [NTG-context] Lua code and table

2021-02-19 Thread Hans Hagen
On 2/19/2021 12:42 PM, Fabrice Couvreur wrote: Hi Hans,Thanks again for the ideas to improve my code. However, I am new to Lua and my level is far from sufficient to understand everything. Why in no table do the crosses appear in the cells; which was my original idea.Thank you.Fabrice I get a

Re: [NTG-context] Lua code and table

2021-02-19 Thread Fabrice Couvreur
Hi Hans, Thanks again for the ideas to improve my code. However, I am new to Lua and my level is far from sufficient to understand everything. Why in no table do the crosses appear in the cells; which was my original idea. Thank you. Fabrice Le jeu. 18 févr. 2021 à 16:28, Fabrice Couvreur a

Re: [NTG-context] Lua code and table

2021-02-18 Thread Fabrice Couvreur
Hello Jano, Thanks. Fabrice Le jeu. 18 févr. 2021 à 16:27, Jano Kula a écrit : > Hello Fabrice, > > > > On Thu, 18 Feb 2021 at 16:19, Fabrice Couvreur < > fabrice1.couvr...@gmail.com> wrote: > >> Hi all, Thanks to you, I'm not at your level with Lua, but I'm learning >> thanks to you >> Hans, I

Re: [NTG-context] Lua code and table

2021-02-18 Thread Jano Kula
Hello Fabrice, On Thu, 18 Feb 2021 at 16:19, Fabrice Couvreur wrote: > Hi all, Thanks to you, I'm not at your level with Lua, but I'm learning > thanks to you > Hans, I compiled your code and I get an error message : > > lua error > lua error on line 50 in file ./table_1.tex: > > token

Re: [NTG-context] Lua code and table

2021-02-18 Thread Fabrice Couvreur
Hi all, Thanks to you, I'm not at your level with Lua, but I'm learning thanks to you Hans, I compiled your code and I get an error message : lua error > lua error on line 50 in file ./table_1.tex: token call, syntax: [ctxlua]:11: unexpected symbol near '=' 13 \startluacode 14

Re: [NTG-context] Lua code and table

2021-02-18 Thread Hans Hagen
On 2/18/2021 12:22 AM, Bruce Horrocks wrote: On 17 Feb 2021, at 17:40, Fabrice Couvreur wrote: Hi, The code works, but is it possible to make it shorter ? OK, here is my take, based on earlier posts, bringing together some 'technologies': (1) make a document function which isolatees the

Re: [NTG-context] Lua code and table

2021-02-17 Thread Bruce Horrocks
> On 17 Feb 2021, at 17:40, Fabrice Couvreur > wrote: > > Hi, The code works, but is it possible to make it shorter ? > Thank you > Fabrice > You can reduce the size of the test by storing the pattern in a table: \startluacode local background_one = { align = "middle", style =

Re: [NTG-context] Lua code and table

2021-02-17 Thread Hans Hagen
On 2/17/2021 10:26 PM, Wolfgang Schuster wrote: Fabrice Couvreur schrieb am 17.02.2021 um 18:40: Hi,The code works, but is it possible to make it shorter ? Thank you Fabrice \startuseMPgraphic{DiagonalRule}     rulethickness := \frameddimension{rulethickness};     drawoptions(       withpen

Re: [NTG-context] Lua code and table

2021-02-17 Thread Wolfgang Schuster
Fabrice Couvreur schrieb am 17.02.2021 um 18:40: Hi,The code works, but is it possible to make it shorter ? Thank you Fabrice \startuseMPgraphic{DiagonalRule}    rulethickness := \frameddimension{rulethickness};    drawoptions(      withpen pencircle scaled rulethickness      withcolor

Re: [NTG-context] Lua code and table

2021-02-17 Thread Tomas Hala
Hi Fabrice, see below, I attached two ideas how to do it. The best, Tomáš Wed, Feb 17, 2021 ve 06:40:54PM +0100 Fabrice Couvreur napsal(a): #Hi, The code works, but is it possible to make it shorter ? #Thank you #Fabrice #\startuseMPgraphic{DiagonalRule} #   rulethickness

[NTG-context] Lua code and table

2021-02-17 Thread Fabrice Couvreur
Hi, The code works, but is it possible to make it shorter ? Thank you Fabrice \startuseMPgraphic{DiagonalRule} rulethickness := \frameddimension{rulethickness}; drawoptions( withpen pencircle scaled rulethickness withcolor \MPcolor{\framedparameter{framecolor}}); pair

[NTG-context] Lua equivalent of \getvariable{}{}

2020-10-11 Thread Pablo Rodriguez
Dear list, I have the following sample: \starttext \ctxlua{ context.setvariable("environment", "filename", "abc123") } \ctxlua{ c = context.getvariable("environment", "filename") or "a" } \ctxlua{ d = [[\env{filename}]] } c: \cldcontext{c}\\

Re: [NTG-context] Lua related change in LuaMetaTeX?

2020-07-29 Thread Marcel Fabian Krüger
On Wed, Jul 29, 2020 at 09:37:13PM -0700, Hans Hagen wrote: > > One other question about LuaMetaTeX 2.7.1: I noticed that the > > terminal_input callback is gone. Does this mean that the current > > behaviour of basically freezing when previously terminal input was > > requested is hardcoded or is

Re: [NTG-context] Lua related change in LuaMetaTeX?

2020-07-29 Thread Hans Hagen
On 7/29/2020 6:11 PM, Marcel Fabian Krüger wrote: there have been a couple of bug fixes after the formal 5.4.0 release but afaik not in the virtual machine code (which normally is the most sensitive); i used to mark low level changes so that it got signaled (in context) but the byte code

Re: [NTG-context] Lua related change in LuaMetaTeX?

2020-07-29 Thread Marcel Fabian Krüger
> there have been a couple of bug fixes after the formal 5.4.0 release but > afaik not in the virtual machine code (which normally is the most sensitive); > i used to mark low level changes so that it got signaled (in context) but the > byte code version info changed late in 5.4 dev so i no

Re: [NTG-context] Lua related change in LuaMetaTeX?

2020-07-29 Thread Hans Hagen
On 7/29/2020 6:22 AM, Marcel Fabian Krüger wrote: Hi, starting with LuaMetaTeX 2.07.01, a C library I load from Lua started to segfault and valgrind indicates that it accesses invalid memory in multiple places in the middle of Lua internal functions?! The whole thing looks almost like the Lua

[NTG-context] Lua related change in LuaMetaTeX?

2020-07-28 Thread Marcel Fabian Krüger
Hi, starting with LuaMetaTeX 2.07.01, a C library I load from Lua started to segfault and valgrind indicates that it accesses invalid memory in multiple places in the middle of Lua internal functions?! The whole thing looks almost like the Lua versions in LuaMetaTeX and in the library are

Re: [NTG-context] Lua/TeX/METAPOST/textext string issue/puzzle

2020-04-02 Thread Gerben Wierda
Actually, the backslashes disappear before the call to textext() G > On 1 Apr 2020, at 23:44, Aditya Mahajan wrote: > > On Wed, 1 Apr 2020, Gerben Wierda wrote: >> >> My route is probably to complex anyway, but what can I do for the curly >> braces to be actually typeset? > > MkII had a

Re: [NTG-context] Lua/TeX/METAPOST/textext string issue/puzzle

2020-04-01 Thread Aditya Mahajan
On Wed, 1 Apr 2020, Gerben Wierda wrote: My route is probably to complex anyway, but what can I do for the curly braces to be actually typeset? MkII had a feature called \sometxt http://dl.contextgarden.net/myway/sometxt.pdf I wonder if that still works in MkIV. Aditya

[NTG-context] Lua/TeX/METAPOST/textext string issue/puzzle

2020-04-01 Thread Gerben Wierda
I have lua code that generates this for METAPOST: ApplicationComponentLogo( w, h, "withcolor (0.686,1.000,1.000) withtransparency (1,0.200)", "withcolor (0.000,0.000,0.000) withtransparency (1,1.000) withpen pencircle scaled 1.000", "\{Hello\}, "&"(a)"&" [World]!") shifted (x, -y); draw pic;

Re: [NTG-context] Lua error using module pgfplots and shader=interp

2019-05-30 Thread Luca Donetti
On Thu, May 30, 2019 at 11:00 AM Hans Hagen wrote: > On 5/29/2019 10:36 PM, Luca Donetti wrote: > > Dear all, > > > > The following example using module pgfplots does not work in an updated > > context standalone nor with the texlive 2019 version. > fixed in next beta > Thank you.

Re: [NTG-context] Lua error using module pgfplots and shader=interp

2019-05-30 Thread Hans Hagen
On 5/29/2019 10:36 PM, Luca Donetti wrote: Dear all, The following example using module pgfplots does not work in an updated context standalone nor with the texlive 2019 version. fixed in next beta -

[NTG-context] Lua error using module pgfplots and shader=interp

2019-05-29 Thread Luca Donetti
Dear all, The following example using module pgfplots does not work in an updated context standalone nor with the texlive 2019 version. %% Workaround for using tikz version in texlive 2019. %% See https://github.com/pgf-tikz/pgf/issues/675 %\unprotect %\def\XC@tgt@mod#1{#1}

[NTG-context] Lua os.date() localization in context

2019-04-29 Thread Romain Diss
Hi all, I would like to print the day name of a date in french using my current locale. In lua I can do: > os.setlocale('fr_FR.UTF-8',all) > print(os.date("%A")) But in a cld document it doesn't work. Context complains about using "os.locale in a supposedly locale neutral enviroment" and it

[NTG-context] Lua error in latest beta?

2019-04-29 Thread Alan Bowen
When I process files using the latest standalone ConTeXt ver: 2019.04.29 08:52 MKIV beta fmt: LuaTeX, Version 1.10.0 (TeX Live 2019)), I now get the following error message: lua error > lua error on line 8 in file env_Brill-01.tex:

Re: [NTG-context] Lua error with fontstrip in today’s beta

2019-04-12 Thread Hans Hagen
On 4/12/2019 11:19 PM, Henning Hraban Ramm wrote: I just updated my minimals installation (2019.04.12 17:43, still not lmtx) and run into this error: lua error > lua error on line 1 in file fontstriptest.tex: ...xmf/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:284: attempt to

Re: [NTG-context] Lua error with fontstrip in today’s beta

2019-04-12 Thread Alan Braslau
On Fri, 12 Apr 2019 23:19:34 +0200 Henning Hraban Ramm wrote: > minimals installation (2019.04.12 17:43, still not lmtx) Ah, when I first started using ConTeXt, MkIV was somewhat experimental and it was still recommended to use MkII (with pdftex) for "production". Now we are generally

[NTG-context] Lua error with fontstrip in today’s beta

2019-04-12 Thread Henning Hraban Ramm
I just updated my minimals installation (2019.04.12 17:43, still not lmtx) and run into this error: lua error > lua error on line 1 in file fontstriptest.tex: ...xmf/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:284: attempt to call a nil value (global 'setfield') 1 >>

Re: [NTG-context] lua-error when asking for the fontame

2019-03-09 Thread Willi Egger
Thank you Hans! > On 9 Mar 2019, at 10:12, Hans Hagen wrote: > > On 3/8/2019 11:16 PM, Willi Egger wrote: >> \setupbodyfont[pagella,rm,12pt] >> \starttext >> This text is written in \font\fontname >> \stoptext > > > This text is written in \fontname\font > > Hans > > > >

Re: [NTG-context] lua-error when asking for the fontame

2019-03-09 Thread Alan Braslau
On Sat, 9 Mar 2019 10:12:06 +0100 Hans Hagen wrote: > On 3/8/2019 11:16 PM, Willi Egger wrote: > > \setupbodyfont[pagella,rm,12pt] > > \starttext > > This text is written in \font\fontname > > \stoptext > > > This text is written in \fontname\font We also have: \fontclass

Re: [NTG-context] lua-error when asking for the fontame

2019-03-09 Thread Hans Hagen
On 3/8/2019 11:16 PM, Willi Egger wrote: \setupbodyfont[pagella,rm,12pt] \starttext This text is written in \font\fontname \stoptext > This text is written in \fontname\font Hans -

[NTG-context] lua-error when asking for the fontame

2019-03-08 Thread Willi Egger
Hello, today I updated ConTeXt to the version of 2019-03-05. While testing a type-script I got an error, when I ask for the font name. lua error > lua error on line 1 in file /test.tex: ...ext/tex/texmf-context/tex/context/base/mkiv/font-syn.lua:519: bad argument #1 to 'lower' (string

Re: [NTG-context] lua lpeg + utf8

2019-01-06 Thread Thomas A. Schmitz
On 06.01.19 23:08, Hans Hagen wrote: what do you mean with "running luatex alone" ; you can run scripts with mtxrun --script yourscript foo.txt (or do you mean something different) Hi Hans, thanks, this is what I meant! I guess I was trying to reinvent the wheel and doing things in pure

Re: [NTG-context] lua lpeg + utf8

2019-01-06 Thread Hans Hagen
On 1/6/2019 8:14 PM, Thomas A. Schmitz wrote: On 06.01.19 19:20, Wolfgang Schuster wrote: \starttext \startluacode print("abcdeφὴὰabcde") local remap = utf.remapper { a = "y", c = "z", ὴ = "ή", ὰ = "ά" } print(remap("abcdeφὴὰabcde")) \stopluacode \stoptext Wolfgang, thank you, I should

Re: [NTG-context] lua lpeg + utf8

2019-01-06 Thread Thomas A. Schmitz
On 06.01.19 19:20, Wolfgang Schuster wrote: \starttext \startluacode print("abcdeφὴὰabcde") local remap = utf.remapper { a = "y", c = "z", ὴ = "ή", ὰ = "ά" } print(remap("abcdeφὴὰabcde")) \stopluacode \stoptext Wolfgang, thank you, I should have looked into this manual! Is there an easy

Re: [NTG-context] lua lpeg + utf8

2019-01-06 Thread Wolfgang Schuster
Thomas A. Schmitz schrieb am 06.01.19 um 18:53: Hi everybody, best wishes for (the still new) 2019! My question is not strictly a ConTeXt problem, but about the way luatex (and pure Lua) can handle utf8 in lpeg. Here is my Lua example: mystring = "abcdeφὴὰabcde" local replace_table = {  

[NTG-context] lua lpeg + utf8

2019-01-06 Thread Thomas A. Schmitz
Hi everybody, best wishes for (the still new) 2019! My question is not strictly a ConTeXt problem, but about the way luatex (and pure Lua) can handle utf8 in lpeg. Here is my Lua example: mystring = "abcdeφὴὰabcde" local replace_table = { a = "y", c = "z", ὴ = "ή", ὰ = "ά", }

Re: [NTG-context] Lua problem with tagging or setups

2017-10-09 Thread Hans Hagen
On 10/9/2017 6:11 PM, Rik Kabel wrote: Consider the following almost-minimal example: \setuptagging    [state=start] \setuppapersize  [A6] \setupexternalfigures[location=default] \definemakeup    [cover4][page=left,doublesided=no] \definelayer

Re: [NTG-context] Lua problem with tagging or setups

2017-10-09 Thread Rik Kabel
No, cow.pdf is in the default location and is found with no problem when tagging is off or the setlayer is moved out of the setup. The Lua error does not occur with most commands, but does occur with external figures. -- Rik On 2017-10-09 12:32, Floris van Manen wrote: if i omit the line

Re: [NTG-context] Lua problem with tagging or setups

2017-10-09 Thread Floris van Manen
if i omit the line with the \externalfigure it does work is that cow.pdf missing? > On 9 Oct 2017, at 18:11, Rik Kabel wrote: > > Consider the following almost-minimal example: > > \setuptagging[state=start] > \setuppapersize [A6] >

[NTG-context] Lua problem with tagging or setups

2017-10-09 Thread Rik Kabel
Consider the following almost-minimal example: \setuptagging    [state=start] \setuppapersize  [A6] \setupexternalfigures[location=default] \definemakeup    [cover4][page=left,doublesided=no] \definelayer [isbn][width=\pagewidth,height=\pageheight] \define   

Re: [NTG-context] lua error when --synctex is used

2017-07-14 Thread Hans Hagen
On 7/13/2017 11:40 PM, Ulrike Fischer wrote: When I run a minimal context file with the -synctex-switch context --synctex context-test.tex then I get a lua error: lua error > lua error on line 1 in file C:/Users/XXX/Documents/tests/contexttext/context-test.tex:

Re: [NTG-context] lua error when --synctex is used

2017-07-13 Thread Henri Menke
On Fri, 2017-07-14 at 00:55 +0200, Ulrike Fischer wrote: > Am Fri, 14 Jul 2017 10:32:44 +1200 schrieb Henri Menke: > > > > > > > > > When I run a minimal context file with the -synctex-switch > > > > > > context --synctex context-test.tex > > > > > > then I get a lua error: > > See 

Re: [NTG-context] lua error when --synctex is used

2017-07-13 Thread Ulrike Fischer
Am Fri, 14 Jul 2017 10:32:44 +1200 schrieb Henri Menke: >> When I run a minimal context file with the -synctex-switch >> >> context --synctex context-test.tex >> >> then I get a lua error: > > See https://mailman.ntg.nl/pipermail/ntg-context/2017/089121.html Ah. Thanks I hadn't seen this (or

Re: [NTG-context] lua error when --synctex is used

2017-07-13 Thread Henri Menke
On Thu, 2017-07-13 at 23:40 +0200, Ulrike Fischer wrote: > When I run a minimal context file with the -synctex-switch > > context --synctex context-test.tex > > then I get a lua error: See https://mailman.ntg.nl/pipermail/ntg-context/2017/089121.html > > lua error   > lua error on line 1

[NTG-context] lua error when --synctex is used

2017-07-13 Thread Ulrike Fischer
When I run a minimal context file with the -synctex-switch context --synctex context-test.tex then I get a lua error: lua error > lua error on line 1 in file C:/Users/XXX/Documents/tests/contexttext/context-test.tex: ...ext/tex/texmf-context/tex/context/base/mkiv/node-syn.lua:490:

Re: [NTG-context] Lua code and percent sign

2017-02-27 Thread Antoine Cailliau
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 /

Re: [NTG-context] Lua code and percent sign

2017-02-27 Thread Hans Hagen
On 2/27/2017 2:11 PM, Antoine Cailliau wrote: The following code, from the wiki, results in a compilation error: \starttext \ctxlua{context(string.format("\%.2f", math.pi))} \stoptext \startluacode ... \stopluacode but not in macros where the % is normally a comment again

[NTG-context] Lua code and percent sign

2017-02-27 Thread Antoine Cailliau
The following code, from the wiki, results in a compilation error: \starttext > \ctxlua{context(string.format("\%.2f", math.pi))} > \stoptext The error is: [\directlua]:1: invalid escape sequence near '\%' > 1 \starttext > 2 > 3 >> \ctxlua{context(string.format("\%.2f", math.pi))} > 4 > 5

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Hans Hagen
g list for ConTeXt users <mailto:ntg-context@ntg.nl> *Objet :*[NTG-context] lua tables - how do you cope? This is less a specific question about ConTeXt than a hope for good advice: I’m maltreating my xml files with a mixture of TeX and Lua. I want to extract and typeset information in dif

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Hans Hagen
On 7/30/2016 11:01 PM, Schmitz Thomas A. wrote: Thank you, but this is not what I’m looking for. I know how to sort a table, and I know the Lua table tutorial (the Lua wiki is, IMHO, really terrible and disorganized). I have to construct deeply nested tables and sometimes lose track of what

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Schmitz Thomas A.
> On 30 Jul 2016, at 23:46, Lukas Prochazka wrote: > > Hello Thomas, > > here is my "dump()" I've been using for several years: Arthur, Lukas, these are both great and very helpful, thanks a lot! I feel bad for not knowing table.serialize (which can even be used with the

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Lukas Prochazka
le, of course... Best regards, Lukas - Original Message - From: Schmitz Thomas A. [mailto:thomas.schm...@uni-bonn.de] To: mailing list for ConTeXt users [mailto:ntg-context@ntg.nl] Sent: Sat, 30 Jul 2016 23:01:29 +0100 Subject: Re: [NTG-context] lua tables - how do you cope? > Tha

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Arthur Reutenauer
On Sat, Jul 30, 2016 at 11:01:29PM +0200, Schmitz Thomas A. wrote: > Thank you, but this is not what I’m looking for. I know how to sort a table, > and I know the Lua table tutorial (the Lua wiki is, IMHO, really terrible and > disorganized). I have to construct deeply nested tables and

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Schmitz Thomas A.
Thank you, but this is not what I’m looking for. I know how to sort a table, and I know the Lua table tutorial (the Lua wiki is, IMHO, really terrible and disorganized). I have to construct deeply nested tables and sometimes lose track of what is at what level of my table, so I was wondering if

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Wolfgang Schuster
Joseph Canedo 30. Juli 2016 um 15:04 If the requirement is to iterate on a table having the keys, values sorted by key (assuming the keys can be sorted), there are ways to do this. Please see http://lua-users.org/wiki/SortedIteration for an example (this just

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Joseph Canedo
If the requirement is to iterate on a table having the keys, values sorted by key (assuming the keys can be sorted), there are ways to do this. Please see http://lua-users.org/wiki/SortedIteration for an example (this just replaces pairs(t) with orderedPairs(t)). Hope this helps Joseph De :

[NTG-context] lua tables - how do you cope?

2016-07-30 Thread Schmitz Thomas A.
This is less a specific question about ConTeXt than a hope for good advice: I’m maltreating my xml files with a mixture of TeX and Lua. I want to extract and typeset information in different forms, so I first collect everything in lua tables, rearrange and order these tables and typeset the

Re: [NTG-context] Lua file finder for \externalimage

2015-09-24 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, the reason I'm asking is that I'd need to perform the same lookup as is performed during \externalfigure with a specific "directory=" key. In other words - when \externalfigure is able to find a picture in e.g. "../../../Images/Small" path, is there a a file finder in Lua (context

[NTG-context] Lua file finder for \externalimage

2015-09-17 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, what is the name of a Lua function (if such function exists) which performs lookup for an image inside \externalimage? I'm asking especially due to the fact that the path here can be modified by [location={...}]. Best regards, Lukas -- Ing. Lukáš Procházka | mailto:l...@pontex.cz

Re: [NTG-context] lua code prevents compilation

2015-04-02 Thread Pablo Rodriguez
On 04/02/2015 02:23 AM, Hans Hagen wrote: On 4/2/2015 1:21 AM, Pablo Rodriguez wrote: [...] Both lack the underscore glyph. This causes the crash, since it works fine if I replace the glyph with an existing glyph in the font. [...] Would it be possible that ConTeXt silently ignores that the

Re: [NTG-context] lua code prevents compilation

2015-04-01 Thread Hans Hagen
On 4/2/2015 1:21 AM, Pablo Rodriguez wrote: On 03/30/2015 10:33 PM, Hans Hagen wrote: On 3/30/2015 5:19 PM, Pablo Rodriguez wrote: [...] For some reason unknown to me, the only way to compile the sample is to remove the luacode snippet. I need the lua code to have underscore hyphenation in

Re: [NTG-context] lua code prevents compilation

2015-04-01 Thread Pablo Rodriguez
On 03/30/2015 10:33 PM, Hans Hagen wrote: On 3/30/2015 5:19 PM, Pablo Rodriguez wrote: [...] For some reason unknown to me, the only way to compile the sample is to remove the luacode snippet. I need the lua code to have underscore hyphenation in type commands. And I need two extra

[NTG-context] lua code prevents compilation

2015-03-30 Thread Pablo Rodriguez
Dear list, I have the following sample: \startluacode function document.addfunnyhyphen(tfmdata) local underscore = utf.byte(_) local char = tfmdata.characters[underscore] tfmdata.characters[0xFE000] = { width= 0, height = 0,

Re: [NTG-context] lua code prevents compilation

2015-03-30 Thread Hans Hagen
On 3/30/2015 5:19 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \startluacode function document.addfunnyhyphen(tfmdata) local underscore = utf.byte(_) local char = tfmdata.characters[underscore] tfmdata.characters[0xFE000] = {

Re: [NTG-context] Lua to Context Table

2014-08-02 Thread John Kitzmiller
On Aug 2, 2014, Aditya Mahajan adit...@umich.edu wrote: On Sat, 2 Aug 2014, luigi scarso wrote: On Sat, Aug 2, 2014, John Kitzmiller k...@inradius.net wrote: Here is Lua code that prints the first nine fibonacci numbers: local function fib(n) f={1,1} ...the Wiki entries, CLD, and tried

[NTG-context] Lua to Context Table

2014-08-01 Thread John Kitzmiller
Here is Lua code that prints the first nine fibonacci numbers: local function fib(n) f={1,1} for i=3,9 do f[i]=f[i-1]+f[i-2] end return(f[n]) end for n=1,9 do print(fib(n)) end Here is Context+Lua that prints 3 x 3 table of the first nine natural numbers: \starttext

Re: [NTG-context] Lua to Context Table

2014-08-01 Thread luigi scarso
On Sat, Aug 2, 2014 at 12:59 AM, John Kitzmiller k...@inradius.net wrote: Here is Lua code that prints the first nine fibonacci numbers: local function fib(n) f={1,1} for i=3,9 do f[i]=f[i-1]+f[i-2] end return(f[n]) end for n=1,9 do print(fib(n)) end Here is Context+Lua

Re: [NTG-context] Lua to Context Table

2014-08-01 Thread Aditya Mahajan
On Sat, 2 Aug 2014, luigi scarso wrote: On Sat, Aug 2, 2014 at 12:59 AM, John Kitzmiller k...@inradius.net wrote: Here is Lua code that prints the first nine fibonacci numbers: local function fib(n) f={1,1} for i=3,9 do f[i]=f[i-1]+f[i-2] end return(f[n]) end for n=1,9 do

[NTG-context] Lua \let

2013-10-04 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello all, how to call \let from within Lua? I'd need to \let\T=4 using Lua. The following code doesn't work (not so surprisingly): \startluacode a = 4 \stopluacode \expandafter\let\expandafter\T=\cldcontext{a} \starttext Test \T. \stoptext What's the correct way? TIA.

Re: [NTG-context] Lua \let

2013-10-04 Thread Hans Hagen
On 10/4/2013 10:47 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello all, how to call \let from within Lua? I'd need to \let\T=4 using Lua. The following code doesn't work (not so surprisingly): \startluacode a = 4 \stopluacode \expandafter\let\expandafter\T=\cldcontext{a}

Re: [NTG-context] Lua \let

2013-10-04 Thread Wolfgang Schuster
Am 04.10.2013 um 10:47 schrieb Procházka Lukáš Ing. - Pontex s. r. o. l...@pontex.cz: Hello all, how to call \let from within Lua? I'd need to \let\T=4 using Lua. The following code doesn't work (not so surprisingly): \startluacode a = 4 \stopluacode

Re: [NTG-context] Lua \let

2013-10-04 Thread Procházka Lukáš Ing . - Pontex s . r . o .
On Fri, 04 Oct 2013 10:54:37 +0200, Hans Hagen pra...@wxs.nl wrote: On 10/4/2013 10:47 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello all, how to call \let from within Lua? I'd need to \let\T=4 using Lua. The following code doesn't work (not so surprisingly): \startluacode

[NTG-context] Lua inmargin inframed

2013-01-04 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, the inframed B in margin created by Lua doesn't appear, although corresponding Ctx code works: \starttext \inmargin{\inframed{A}} \input knuth \blank \directlua{context.inmargin(context.delayed.inframed(B)); context(Test.)} \stoptext What am I doing wrong? TIA.

Re: [NTG-context] Lua inmargin inframed

2013-01-04 Thread Wolfgang Schuster
Am 04.01.2013 um 16:22 schrieb Procházka Lukáš Ing. - Pontex s. r. o. l...@pontex.cz: Hello, the inframed B in margin created by Lua doesn't appear, although corresponding Ctx code works: \starttext \inmargin{\inframed{A}} \input knuth \blank

  1   2   3   >