Re: [NTG-context] placefigure right or left error in ver: 2018.04.04 00:51 MKIV
On 9/27/19 2:33 PM, Philippe Oechslin wrote: > Hello there, > > I recently upgraded to ConTeXt ver: 2018.04.04 00:51 MKIV and found that > the following simple code gives an error, where as it compiled without > complaining in ver: 2017.05.15 21:48. > [...] > I am running a freshly installed Ubuntu 19.04. Has anybody run into this > issues, > is there a known workaround ? Hi Philippe, it works fine with latest ConTeXt Suite beta from 2019.09.10 20:03. Since ConTeXt Suite is a portable distribution (you may have it with TeX Live installed), I'd rather install the latest beta. So you avoid dealing with already solved issues. Just in case it helps, Pablo -- http://www.ousia.tk ___ 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] passing variables/data between context and lua
Martin Althoff schrieb am 27.09.2019 um 06:59: Hi, I am trying to pass variables/data between context and lua. Lua would be used for calculations on data coming from context. Unfortunately I can't figure out what to do. The code below doesn't work, but is there to illustrate my idea. Any help would be much appreciated. Thanks, Martin \define\question{44} \defineexpandable\question{44} \starttext \startluacode local points = \question * 92 -- do some calculations with points and return to to context answer=42 \stopluacode % lots of Text in between The answer is \answer \stoptext A solution which uses only existing commands in the document. \startsetups [martin] \startlua local points = tonumber(\getvariable{martin}{question}) or 0 ; points = points * 92 ; local answer = 42 ; context.setvariable("martin","points",points) ; context.setvariable("martin","answer",answer) ; \stoplua \stopsetups \setvariable{martin}{set}{\directsetup{martin}} \starttext \setvariables [martin] [question=44] Points: \getvariable{martin}{points} The answer is \getvariable{martin}{answer}. \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] placefigure right or left error in ver: 2018.04.04 00:51 MKIV
Hello there, I recently upgraded to ConTeXt ver: 2018.04.04 00:51 MKIV and found that the following simple code gives an error, where as it compiled without complaining in ver: 2017.05.15 21:48. \setupexternalfigures[location={local,default}] \starttext \input ward \placefigure[left,none]{}{\externalfigure[cow][width=3cm]} \input ward \stoptext The error happens when the location of placefigure is left or right, but not with center. The error is the following: context test.tex resolvers | trees | analyzing 'home:.texlive2018/texmf-config' mtx-context | run 1: luatex --fmt="/home/philippe/.texlive2018/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/formats/lua tex/cont-en" --jobname="test" --lua="/home/philippe/.texlive2018/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/formats/luate x/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./test.tex" --c:input="./test.tex" --c:kindofrun=1 --c:maxnofruns=9 "co nt-yes.mkiv" This is LuaTeX, Version 1.07.0 (TeX Live 2019/dev/Debian) system commands enabled. resolvers > trees > analyzing 'home:.texlive2018/texmf-config' open source > level 1, order 1, name '/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv' system > system > ConTeXt ver: 2018.04.04 00:51 MKIV beta fmt: 2019.9.25 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv' close source> level 2, order 2, name '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 'test', input './test', result 'test' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name '/home/philippe/test.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded open source > level 3, order 4, name '/usr/share/texmf/tex/context/sample/common/ward.tex' close source> level 3, order 4, name '/usr/share/texmf/tex/context/sample/common/ward.tex' floatblocks > '1' placed (left) tex error > tex error on line 6 in file /home/philippe/test.tex: ! Illegal unit of measure (pt inserted) \global \strc_floats_wrap_free_region ->\global \setbox \floatbox \hpack {\ifconditi... \strc_floats_mark_as_free ...ats_wrap_free_region \anch_mark_tagged_box_free... \strc_floats_mark_par_as_free ...sides_bottomskip \or \strc_floats_mark_as_f... \page_sides_push_float_inline ...mark_par_as_free \ifcase \c_page_sides_floa... \page_sides_place_float ...des_place_float_normal \fi \par \kern -\d_page_si... ... l.6 ...left,none]{}{\externalfigure[cow][width=3cm]} 1 \setupexternalfigures[location={local,default}] 2 3 \starttext 4 \input ward 5 6 >> \placefigure[left,none]{}{\externalfigure[cow][width=3cm]} 7 8 \input ward I am running a freshly installed Ubuntu 19.04. Has anybody run into this issues, is there a known workaround ? thanks in advance, Philippe ___ 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] passing variables/data between context and lua
\starttext \define\question{44} \startluacode -- see "ConTeXt Lua Documents" manual, §7.4 Looking inside local question = tokens.getters.macro("question") -- it's up to you to verify that \question contains a number -- better using the userdata table for your data userdata.points = tonumber( question ) * 92 -- do some calculations with points and return to to context userdata.answer=42 \stopluacode % lots of Text in between The answer is \ctxlua{ context(userdata.answer) }. Points are \ctxlua{ context(userdata.points) }. \stoptext Best wishes, Massi Il 27/09/19 06:59, Martin Althoff ha scritto: Hi, I am trying to pass variables/data between context and lua. Lua would be used for calculations on data coming from context. Unfortunately I can't figure out what to do. The code below doesn't work, but is there to illustrate my idea. Any help would be much appreciated. Thanks, Martin \define\question{44} \starttext \startluacode local points = \question * 92 -- do some calculations with points and return to to context answer=42 \stopluacode % lots of Text in between The answer is \answer \stoptext ___ 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 ___ ___ 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] Error: your system "Linux aarch64" is not supported yet.
On Fri, Sep 27, 2019 at 7:20 AM Mojca Miklavec < mojca.miklavec.li...@gmail.com> wrote: > (But I > could use the binaries from TL as a starting point.) > > well, something that works is better than nothing but of course one can always install a scheme from texlive. > That's either cross-compiling, but probably easier to simply put some > proper hardware in place, so that we can also run the test suite. > > I was thinking of getting hold of another Raspberry and trying to > install a 64-bit system on it. Or maybe dig out my super old Pine64 > and build on that one. ubuntu 64bit is ok on rpi3 & rpi3b+ You can try A64 form olimex, also ok with ubuntu 64bit. And of course the rpi4. -- luigi ___ 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 ___