[NTG-context] Asymptote in Context
I have been trying to put Asymptote graphs in Context with the filter example below. The Asymptote graph is written in a separate PDF file, but is not included in the final completed PDF document. Is there a simple way to achieve this? \usemodule[filter] \defineexternalfilter [ASY] [filtercommand={asy -tex context -View -outformat pdf -outname \externalfilteroutputfile\space \externalfilterinputfile}, output=\externalfilterbasefile.out, readcommand=\typefile, cache=force, location=text, continue=yes] \starttext \startASY[myplot] draw((1,1)--(2,4)); \stopASY \externalfigure[myplot] \stoptext Thanks Jeroen ___ 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 ___
Re: [NTG-context] Problems with repeating layers
On 12/08/2014 08:42 AM, Reza Housseini wrote: Hello I try to use layers to position a figure on top of the leftmargin area. I use code like the following: \definelayer[MyLayer][option=test] \setupbackgrounds[text][leftmargin][background=MyLayer] \setlayer[MyLayer][x=0cm,y=0cm] {\externalfigure[cow][width=2cm]} This image get's repeated every page but I only want it on the first page. The parameter state=start does not change anything. Is there a way to disable the layer on the next page? Hi Reza, I don’t know whether this is a bug or a feature. But this document might achieve what (I guess) you want (as you wrote yourself): \definelayer[MyLayer] \setlayer[MyLayer][x=0cm,y=4.5cm] {\externalfigure[cow][width=2cm]} \setupbackgrounds[page][background=MyLayer] \starttext \dorecurse{5}{\input knuth} \stoptext Also there seems to be a bug with \showframe. When I use this command my figure is only displayed on the first page (as desired). I wasn’t able to reproduce this. Placing \showframe before of after \setupbackgrounds in the previous document, states (http://wiki.contextgarden.net/Layers#State) work fine. I hope 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Pass a lua table to metapost
On 12/7/2014 8:25 PM, DesdeChaves wrote: I would like to pass the lua table keys and values to metapost. In the keys i have information about the paths names and in the values i have information about the label that should be draw in the center of each path (unitsquare). In my code (see attach) the table in question is weekdays_number_and_name. I know that is possible to pass a array from metapost to lua. Is the reverse possible? it's possible to ask values from within mp: \starttext \startluacode document.variables = { labels = { one, two, three, } } \stopluacode \startMPpage numeric dx, dy; dx = 4.4cm; dy = 0.53cm; path b[]; for i=1 upto lua(mp.print(\#document.variables.labels)) : b[i] = unitsquare xscaled dx yscaled dy shifted (0, (i-1)*dy); draw b[i]; label(lua(mp.quoted(document.variables.labels[ decimal i ])), center b[i]); endfor \stopMPpage \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 ___
[NTG-context] Simplefonts: light font weight?
Hi, simplefonts has the following list of weights: condensed, light, normal, medium, heavy (source http://tug.ctan.org/macros/context/contrib/context-simplefonts/tex/context/third/simplefonts/t-simplefonts.mkiv ) how do i use them as argument for any kind of style named argument, e.g. `\setuphead[chapter][style=light]` doesn’t work. best, philipp ___ 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 ___
Re: [NTG-context] Simplefonts: light font weight?
Am 08.12.2014 um 10:40 schrieb Philipp A. flying-sh...@web.de: Hi, simplefonts has the following list of weights: condensed, light, normal, medium, heavy (source http://tug.ctan.org/macros/context/contrib/context-simplefonts/tex/context/third/simplefonts/t-simplefonts.mkiv) how do i use them as argument for any kind of style named argument, e.g. `\setuphead[chapter][style=light]` doesn’t work. The style keys for \setuphead etc. are unrelated to the styles in simplefonts. 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 ___
Re: [NTG-context] Pass a lua table to metapost
Thanks, but I'm not able to run this code in my system. I'm working in ConTeXt ver: 2014.12.06 14:20 MKIV beta fmt: 2014.12.8 int: english/english and the error message is: runscript ! Isolated expression. to be read again ( mlib_luas_luacall-begingroup.runscript( for.s=(TEXT2):if.string.s:s.elsei... lua-..._s,(TEXT3))else:mlib_luas_luacall((TEXT3)) fi.endgroup * ...lua(mp.print(#document.variables.labels)) : b[i] = unitsquare xscal... ! Extra tokens will be flushed. to be read again ( mlib_luas_luacall-begingroup.runscript( for.s=(TEXT2):if.string.s:s.elsei... lua-..._s,(TEXT3))else:mlib_luas_luacall((TEXT3)) fi.endgroup * ...lua(mp.print(#document.variables.labels)) : b[i] = unitsquare xscal... vacuous ! Improper final value has been replaced by 0. to be read again : * ...a(mp.print(#document.variables.labels)) : b[i] = unitsquare xscaled... 2014-12-08 9:21 GMT+00:00 Hans Hagen pra...@wxs.nl: On 12/7/2014 8:25 PM, DesdeChaves wrote: I would like to pass the lua table keys and values to metapost. In the keys i have information about the paths names and in the values i have information about the label that should be draw in the center of each path (unitsquare). In my code (see attach) the table in question is weekdays_number_and_name. I know that is possible to pass a array from metapost to lua. Is the reverse possible? it's possible to ask values from within mp: \starttext \startluacode document.variables = { labels = { one, two, three, } } \stopluacode \startMPpage numeric dx, dy; dx = 4.4cm; dy = 0.53cm; path b[]; for i=1 upto lua(mp.print(\#document.variables.labels)) : b[i] = unitsquare xscaled dx yscaled dy shifted (0, (i-1)*dy); draw b[i]; label(lua(mp.quoted(document.variables.labels[ decimal i ])), center b[i]); endfor \stopMPpage \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 ___ -- Atentamente DesdeChaves ___ 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 ___
Re: [NTG-context] Pass a lua table to metapost
On 12/8/2014 12:27 PM, DesdeChaves wrote: Thanks, but I'm not able to run this code in my system.. I'm working in ConTeXt ver: 2014.12.06 14:20 MKIV beta fmt: 2014.12.8 int: english/english and the error message is: runscript ! Isolated expression. so your luatex is too old - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 ___
[NTG-context] interline space in final notes?
Dear list, I have the following sample: \startsetups[setups:footnote] \setupinterlinespace[line=5ex] \stopsetups \definenote[specialnote] \setupnote[specialnote][setups=setups:footnote] \setupnote[footnote][way=bytext, location=text, setups=setups:footnote] \def\snote#1{\footnote{#1}\specialnote{#1}} \starttext Hi\snote{\input knuth}. \placefootnotes \stoptext And I dont know how to setup the different interline space for final footnotes? Aren’t setups the right way to do this? Many thanks for your help, 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] drops module release
Hi, finally(!?) the release of the drops module for ConTeXt. The module, the manual (also part of the module) and the example documents can be downloaded here https://spideroak.com/browse/share/indiego/public/ConTeXt/drops/ Feel free to copy the files to other servers. Have fun, Peter ___ 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 ___
[NTG-context] two questions on the new simplefonts interface
Dear list, which are the replacements for \definesimplefont and \definesimplefonttypeface in the new simplefonts interface? I need the size option for \definesimplefont and the scale option for \definesimplefonttypeface. Many thanks for your help, 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] issue with t-scancsv.lua
Hello Jaroslav, I have discovered that it is impossible to change letter cases with fields imported with t-scancsv.lua. Here you have a sample: \usemodule[scancsv] \setuppapersize[C6, landscape] \setuppagenumbering[location=] \unexpanded\def\lineaction{ \lowercase{\cA}\crlf \uppercase{\cB}\crlf \cC--\cD\crlf \lowercase{}\crlf \uppercase{}\crlf \page } \setsep{;} \setfiletoscan{mailmergedatatable.csv} \starttext \filelineaction \stoptext The contents of mailmergedatatable.csv would be: name;address;postcode;city; ME;STREET;;HERE; You;Square;;There; Would it be a way to avoid this? Many thanks for your help, 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] drops module release
2014-12-08 13:24 GMT+01:00 Peter Rolf indi...@gmx.net: finally(!?) the release of the drops module for ConTeXt. Which does what? Best Martin ___ 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 ___
Re: [NTG-context] issue with t-scancsv.lua
Hello Pablo. What do you think of this solution: \usemodule[scancsv] \setuppapersize[C6, landscape] \setuppagenumbering[location=] \unexpanded\def\lineaction{ \edef\lcA{\lowercase{\cA}} \edef\ucB{\uppercase{\cB}} cA: \cA -- lowercase cA: \lcA\crlf cB: \cB -- upercase cB: \ucB\crlf cC: \cC -- cD: \cD\crlf \lowercase{}\crlf \uppercase{}\crlf \page } \setsep{;} \setfiletoscan{mailmergedatatable.csv} \starttext \filelineaction \stoptext I greet you Jaroslav Hajtmar Dne 8.12.2014 13:38, Pablo Rodriguez napsal(a): Hello Jaroslav, I have discovered that it is impossible to change letter cases with fields imported with t-scancsv.lua. Here you have a sample: \usemodule[scancsv] \setuppapersize[C6, landscape] \setuppagenumbering[location=] \unexpanded\def\lineaction{ \lowercase{\cA}\crlf \uppercase{\cB}\crlf \cC--\cD\crlf \lowercase{}\crlf \uppercase{}\crlf \page } \setsep{;} \setfiletoscan{mailmergedatatable.csv} \starttext \filelineaction \stoptext The contents of mailmergedatatable.csv would be: name;address;postcode;city; ME;STREET;;HERE; You;Square;;There; Would it be a way to avoid this? Many thanks for your help, Pablo ___ 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 ___
Re: [NTG-context] MP/Lua binding (was: Pass a lua table to metapost)
Hello Hans, it's possible to ask values from within mp: \starttext \startluacode document.variables = { labels = { one, two, three, } } \stopluacode \startMPpage numeric dx, dy; dx = 4.4cm; dy = 0.53cm; path b[]; for i=1 upto lua(mp.print(\#document.variables.labels)) : b[i] = unitsquare xscaled dx yscaled dy shifted (0, (i-1)*dy); draw b[i]; label(lua(mp.quoted(document.variables.labels[ decimal i ])), center b[i]); endfor \stopMPpage \stoptext is there a doc where to study MP/Lua binding (mp members; examples) - like the manual ConTeXt Lua Documents? Here we can see Lua mp.print() and mp.quoted() usage... Best regards, Lukas -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038 ___ 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 ___
Re: [NTG-context] MP/Lua binding
On 12/8/2014 1:45 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello Hans, it's possible to ask values from within mp: \starttext \startluacode document.variables = { labels = { one, two, three, } } \stopluacode \startMPpage numeric dx, dy; dx = 4.4cm; dy = 0.53cm; path b[]; for i=1 upto lua(mp.print(\#document.variables.labels)) : b[i] = unitsquare xscaled dx yscaled dy shifted (0, (i-1)*dy); draw b[i]; label(lua(mp.quoted(document.variables.labels[ decimal i ])), center b[i]); endfor \stopMPpage \stoptext is there a doc where to study MP/Lua binding (mp members; examples) - like the manual ConTeXt Lua Documents? Here we can see Lua mp.print() and mp.quoted() usage... article in bachotek proceedings and upcoming ctx group proceedings ... i might consider a manual indeed Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 ___
Re: [NTG-context] MP/Lua binding
On Mon, 08 Dec 2014 14:32:16 +0100, Hans Hagen pra...@wxs.nl wrote: article in bachotek proceedings and upcoming ctx group proceedings ... i might consider a manual indeed Hans Personally, any printable/buyable manual on this topic would be appreciated... Lukas -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038 ___ 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 ___
Re: [NTG-context] Pass a lua table to metapost
I use the last context minimals. In my system a have a new luatex binary (v. 0.78.2) but I don't know how install it in minimals. If i just copy/paste the new binary to the folder .../tex/texmf-osx-64/bin I found a eeror message This went wrong: .../Context/tex/texmf-context/tex/context/base/spac-ver.lua:933: attempt to index field 'properties' (a nil value) Why context minimals don't coming with the last luatex? Thanks for your support 2014-12-08 12:19 GMT+00:00 Hans Hagen pra...@wxs.nl: On 12/8/2014 12:27 PM, DesdeChaves wrote: Thanks, but I'm not able to run this code in my system.. I'm working in ConTeXt ver: 2014.12.06 14:20 MKIV beta fmt: 2014.12.8 int: english/english and the error message is: runscript ! Isolated expression. so your luatex is too old - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 ___ -- Atentamente DesdeChaves ___ 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 ___
Re: [NTG-context] Pass a lua table to metapost
On 12/8/2014 4:34 PM, DesdeChaves wrote: I use the last context minimals. In my system a have a new luatex binary (v. 0.78.2) but I don't know how install it in minimals. If i just copy/paste the new binary to the folder .../tex/texmf-osx-64/bin I found a eeror message This went wrong: .../Context/tex/texmf-context/tex/context/base/spac-ver.lua:933: attempt to index field 'properties' (a nil value) Why context minimals don't coming with the last luatex? it's the reverse: the latest luatex comes with the latest minimals normally one runs first-setup to update Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 ___
Re: [NTG-context] Pass a lua table to metapost
On Mon, Dec 8, 2014 at 4:34 PM, DesdeChaves wrote: I use the last context minimals. In my system a have a new luatex binary (v. 0.78.2) but I don't know how install it in minimals. If i just copy/paste the new binary to the folder .../tex/texmf-osx-64/bin I found a eeror message This went wrong: .../Context/tex/texmf-context/tex/context/base/spac-ver.lua:933: attempt to index field 'properties' (a nil value) Why context minimals don't coming with the last luatex? Hans, what version of LuaTeX is needed? Jorge, which version of luatex do you have in minimals / what OS are you using? It's not 100% clear to me whether you have 0.78.2 in minimals or somewhere else. If 0.78.2 comes from minimals, you must be using PowerPC or armel and we need to ask the maintainer of these binaries for a rebuild. If LuaTeX 0.79.2 is needed, we just need to send an email to everyone (or rather: we should do that anyway). Maybe I just forgot to send a notice to the builders to make new builds when LuaTeX 0.79.2 came out. Mojca ___ 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 ___
Re: [NTG-context] Pass a lua table to metapost
Sorry for the noise. My LuaTeX version is 0.79.1. I'm using MacOSX This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/dev) (rev 4972) 2014-12-08 15:48 GMT+00:00 Mojca Miklavec mojca.miklavec.li...@gmail.com: On Mon, Dec 8, 2014 at 4:34 PM, DesdeChaves wrote: I use the last context minimals. In my system a have a new luatex binary (v. 0.78.2) but I don't know how install it in minimals. If i just copy/paste the new binary to the folder .../tex/texmf-osx-64/bin I found a eeror message This went wrong: .../Context/tex/texmf-context/tex/context/base/spac-ver.lua:933: attempt to index field 'properties' (a nil value) Why context minimals don't coming with the last luatex? Hans, what version of LuaTeX is needed? Jorge, which version of luatex do you have in minimals / what OS are you using? It's not 100% clear to me whether you have 0.78.2 in minimals or somewhere else. If 0.78.2 comes from minimals, you must be using PowerPC or armel and we need to ask the maintainer of these binaries for a rebuild. If LuaTeX 0.79.2 is needed, we just need to send an email to everyone (or rather: we should do that anyway). Maybe I just forgot to send a notice to the builders to make new builds when LuaTeX 0.79.2 came out. Mojca ___ 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 ___ -- Atentamente DesdeChaves ___ 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 ___
Re: [NTG-context] Pass a lua table to metapost
MacOSX intel 2014-12-08 16:03 GMT+00:00 DesdeChaves desdecha...@gmail.com: Sorry for the noise. My LuaTeX version is 0.79.1. I'm using MacOSX This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/dev) (rev 4972) 2014-12-08 15:48 GMT+00:00 Mojca Miklavec mojca.miklavec.li...@gmail.com : On Mon, Dec 8, 2014 at 4:34 PM, DesdeChaves wrote: I use the last context minimals. In my system a have a new luatex binary (v. 0.78.2) but I don't know how install it in minimals. If i just copy/paste the new binary to the folder .../tex/texmf-osx-64/bin I found a eeror message This went wrong: .../Context/tex/texmf-context/tex/context/base/spac-ver.lua:933: attempt to index field 'properties' (a nil value) Why context minimals don't coming with the last luatex? Hans, what version of LuaTeX is needed? Jorge, which version of luatex do you have in minimals / what OS are you using? It's not 100% clear to me whether you have 0.78.2 in minimals or somewhere else. If 0.78.2 comes from minimals, you must be using PowerPC or armel and we need to ask the maintainer of these binaries for a rebuild. If LuaTeX 0.79.2 is needed, we just need to send an email to everyone (or rather: we should do that anyway). Maybe I just forgot to send a notice to the builders to make new builds when LuaTeX 0.79.2 came out. Mojca ___ 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 ___ -- Atentamente DesdeChaves -- Atentamente DesdeChaves ___ 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 ___
Re: [NTG-context] issue with t-scancsv.lua
Hi Jaroslav, many thanks for your reply. It works fine here. Let’s see what I can do tomorrow with the real documents :-) Many thanks for your help again, Pablo On 12/08/2014 01:56 PM, Jaroslav Hajtmar wrote: Hello Pablo. What do you think of this solution: \usemodule[scancsv] \setuppapersize[C6, landscape] \setuppagenumbering[location=] \unexpanded\def\lineaction{ \edef\lcA{\lowercase{\cA}} \edef\ucB{\uppercase{\cB}} cA: \cA -- lowercase cA: \lcA\crlf cB: \cB -- upercase cB: \ucB\crlf cC: \cC -- cD: \cD\crlf \lowercase{}\crlf \uppercase{}\crlf \page } \setsep{;} \setfiletoscan{mailmergedatatable.csv} \starttext \filelineaction \stoptext I greet you Jaroslav Hajtmar -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] two issues with new hyphenator
On 12/06/2014 01:09 PM, Hans Hagen wrote: On 12/6/2014 12:40 PM, Pablo Rodriguez wrote: On 12/06/2014 12:20 AM, Hans Hagen wrote: On 12/5/2014 8:11 PM, Pablo Rodriguez wrote: [...] BTW, in your sample below, how can I get the underscore under the previous character? (Otherwise, the underscore has no use.) Hm, that was the idea of the example i sent earlier. [...] Hans, many thanks for having fixed the issue with zeros and the new hyphenator. I have discovered that \registerhyphenationexception doesn’t allow names with first letter in capitals (only \registerhyphenationexception[Nietz-sche] will work). This differs from the \hyphenation command. Is this intended? And sorry for asking this again, but I need underscore hyphenation with the underscore character from the font and only for the \tex and \hyphenatedurl commands (not for the rest of the text). How could it be implemented in the following sample? \setupcolor[state=start] \setuplayout[backspace=95mm, width=middle] \definetype[TeXcode][option=TEX, compact=absolute] \unexpanded\def\tex#1{\normalexpanded{\TeXcode{\letterbackslash#1}}} \starttext \tex{thisisaverylongcommand} \hyphenatedurl{http://optimisticwayofthinking.optimist} \input knuth \stoptext Many thanks for your help again, Pablo \startluacode local function addfunnyhyphen(tfmdata) local exheight = tfmdata.parameters.xheight local emwidth = tfmdata.parameters.quad local width= emwidth local height = exheight / 10 local depth= exheight / 2 tfmdata.characters[0xFE000] = { width= 0, height = 0, depth= 0, commands = { { right, -width }, { down, depth }, { rule, height, width }, } } end fonts.constructors.newfeatures(otf).register { name= funnyhyphen, description = funny hyphen, manipulators = { base = addfunnyhyphen, node = addfunnyhyphen, } } \stopluacode \definefontfeature[default][default][funnyhyphen=yes] \starttext \prehyphencharFE000 \hsize 1mm averylongword \stoptext Many thanks for your help, Pablo \definetype [TeXcode] [option=TEX, compact=absolute, lines=hyphenated] \definehyphenationfeatures [whatever] [righthyphenchar=_] \setuphyphenation [method=traditional] \unexpanded\def\TexC#1% {\dontleavehmode\begingroup \sethyphenationfeatures[whatever]% \normalexpanded{\TeXcode{\letterbackslash#1}}% \endgroup} \starttext \input tufte \dorecurse{100}{\TexC{definebodyfont} } \input tufte \stoptext -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Pass a lua table to metapost
After the update to new ConTeXT minimals -- luatex beta-0.79.2 (rev 5084) -- the code runs perfectly. Thanks to all. Jorge 2014-12-08 16:05 GMT+00:00 DesdeChaves desdecha...@gmail.com: MacOSX intel 2014-12-08 16:03 GMT+00:00 DesdeChaves desdecha...@gmail.com: Sorry for the noise. My LuaTeX version is 0.79.1. I'm using MacOSX This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/dev) (rev 4972) 2014-12-08 15:48 GMT+00:00 Mojca Miklavec mojca.miklavec.li...@gmail.com : On Mon, Dec 8, 2014 at 4:34 PM, DesdeChaves wrote: I use the last context minimals. In my system a have a new luatex binary (v. 0.78.2) but I don't know how install it in minimals. If i just copy/paste the new binary to the folder .../tex/texmf-osx-64/bin I found a eeror message This went wrong: .../Context/tex/texmf-context/tex/context/base/spac-ver.lua:933: attempt to index field 'properties' (a nil value) Why context minimals don't coming with the last luatex? Hans, what version of LuaTeX is needed? Jorge, which version of luatex do you have in minimals / what OS are you using? It's not 100% clear to me whether you have 0.78.2 in minimals or somewhere else. If 0.78.2 comes from minimals, you must be using PowerPC or armel and we need to ask the maintainer of these binaries for a rebuild. If LuaTeX 0.79.2 is needed, we just need to send an email to everyone (or rather: we should do that anyway). Maybe I just forgot to send a notice to the builders to make new builds when LuaTeX 0.79.2 came out. Mojca ___ 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 ___ -- Atentamente DesdeChaves -- Atentamente DesdeChaves -- Atentamente DesdeChaves ___ 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 ___
Re: [NTG-context] Pass a lua table to metapost
Am 08.12.2014 um 19:24 schrieb DesdeChaves: After the update to new ConTeXT minimals -- luatex beta-0.79.2 (rev 5084) -- the code runs perfectly. hm, after updating (Linux) I have still 79.1: voss@shania:~/Links/opt/context/tex/texmf-linux-64/bin ./luatex -v This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/dev) (rev 4972) Herbert ___ 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 ___
[NTG-context] [garden] git mirror not syncing
Hi, the garden repo hasn’t been updated for months: http://git.contextgarden.net/context/context/commits/master Maybe a cron job got stuck? Best, Philipp pgptU11xSpZPN.pgp Description: PGP signature ___ 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 ___
Re: [NTG-context] two questions on the new simplefonts interface
Am 08.12.2014 um 13:26 schrieb Pablo Rodriguez oi...@gmx.es: Dear list, which are the replacements for \definesimplefont and \definesimplefonttypeface in the new simplefonts interface? I need the size option for \definesimplefont and the scale option for \definesimplefonttypeface. You can create a typeface with the \definefontfamily (you can find a lot of information in the mail archive) command. The \definesimplefont command has no equivalent in the new code and I have no interest to add it but I showed a different method a while ago [1] but you can also use the \switchtobodyfont command to select a certain font size. [1] http://www.ntg.nl/pipermail/ntg-context/2013/075529.html http://www.ntg.nl/pipermail/ntg-context/2013/075529.html 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 ___
Re: [NTG-context] [garden] git mirror not syncing
On 12/8/2014 8:18 PM, Philipp Gesang wrote: Hi, the garden repo hasn’t been updated for months: http://git.contextgarden.net/context/context/commits/master Maybe a cron job got stuck? just mojca being away for a while and busy now, so eventually it will be up to date again (of course context has been updated a couple of times) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 ___
Re: [NTG-context] [garden] git mirror not syncing
···date: 2014-12-08, Monday···from: Hans Hagen··· On 12/8/2014 8:18 PM, Philipp Gesang wrote: Hi, the garden repo hasn’t been updated for months: http://git.contextgarden.net/context/context/commits/master Maybe a cron job got stuck? just mojca being away for a while and busy now, so eventually it will be up to date again Okay, thanks. (of course context has been updated a couple of times) I hope the script that imports files into the repo is still active. Best, Philipp pgpgT3R05zVui.pgp Description: PGP signature ___ 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 ___
Re: [NTG-context] two issues with new hyphenator
On 12/8/2014 5:47 PM, Pablo Rodriguez wrote: On 12/06/2014 01:09 PM, Hans Hagen wrote: On 12/6/2014 12:40 PM, Pablo Rodriguez wrote: On 12/06/2014 12:20 AM, Hans Hagen wrote: On 12/5/2014 8:11 PM, Pablo Rodriguez wrote: [...] BTW, in your sample below, how can I get the underscore under the previous character? (Otherwise, the underscore has no use.) Hm, that was the idea of the example i sent earlier. [...] Hans, many thanks for having fixed the issue with zeros and the new hyphenator. I have discovered that \registerhyphenationexception doesn’t allow names with first letter in capitals (only \registerhyphenationexception[Nietz-sche] will work). This differs from the \hyphenation command. Is this intended? And sorry for asking this again, but I need underscore hyphenation with the underscore character from the font and only for the \tex and \hyphenatedurl commands (not for the rest of the text). How could it be implemented in the following sample? \setupcolor[state=start] \setuplayout[backspace=95mm, width=middle] \definetype[TeXcode][option=TEX, compact=absolute] \unexpanded\def\tex#1{\normalexpanded{\TeXcode{\letterbackslash#1}}} \starttext \tex{thisisaverylongcommand} \hyphenatedurl{http://optimisticwayofthinking.optimist} \input knuth \stoptext Many thanks for your help again, just a variant of the addfunyhyphen: \startluacode function document.addfunnyhyphen(tfmdata) local underscore = utf.byte(_) local char = tfmdata.characters[underscore] -- logs.report(fonts,adding funny hyphen to font %a,tfmdata.properties.fontname) tfmdata.characters[0xFE000] = { width= 0, height = 0, depth= 0, commands = { { right, -char.width }, { down, char.depth }, { slot, 1, underscore }, } } end utilities.sequencers.appendaction(aftercopyingcharacters,after,document.addfunnyhyphen) \stopluacode \definefontfeature[default][default][funnyhyphen=yes] \definefontfeature[always] [always] [funnyhyphen=yes] \definefontfeature[none] [none] [funnyhyphen=yes] \definetype [TeXcode] [option=TEX, compact=absolute, lines=hyphenated] \definehyphenationfeatures [whatever] [righthyphenchar=FE000] \setuphyphenation [method=traditional] \unexpanded\def\TexC#1% {\dontleavehmode\begingroup \sethyphenationfeatures[whatever]% % \prehyphencharFE000 \normalexpanded{\TeXcode{\letterbackslash#1}}% \endgroup} \starttext \input tufte \dorecurse{100}{\TexC{definebodyfont} } \input tufte \stoptext we can add some of them but first i need to think about what slots to use (shouldn't conflict with other private slots) Pablo \startluacode local function addfunnyhyphen(tfmdata) local exheight = tfmdata.parameters.xheight local emwidth = tfmdata.parameters.quad local width= emwidth local height = exheight / 10 local depth= exheight / 2 tfmdata.characters[0xFE000] = { width= 0, height = 0, depth= 0, commands = { { right, -width }, { down, depth }, { rule, height, width }, } } end fonts.constructors.newfeatures(otf).register { name= funnyhyphen, description = funny hyphen, manipulators = { base = addfunnyhyphen, node = addfunnyhyphen, } } \stopluacode \definefontfeature[default][default][funnyhyphen=yes] \starttext \prehyphencharFE000 \hsize 1mm averylongword \stoptext Many thanks for your help, Pablo \definetype [TeXcode] [option=TEX, compact=absolute, lines=hyphenated] \definehyphenationfeatures [whatever] [righthyphenchar=_] \setuphyphenation [method=traditional] \unexpanded\def\TexC#1% {\dontleavehmode\begingroup \sethyphenationfeatures[whatever]% \normalexpanded{\TeXcode{\letterbackslash#1}}% \endgroup} \starttext \input tufte \dorecurse{100}{\TexC{definebodyfont} } \input tufte \stoptext -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 /
Re: [NTG-context] issue with t-scancsv.lua
Hi Pablo. I am glad that my library for you to use ... I noticed that you have in your CSV file header with column names (ie. head of CSV document). I do not know if you noticed the option put this information into scancsv.lua library. This is done via the command \setheader. In this case library does not consider the first line of the CSV file as a data line. From the header of CSV file are now macros (from header names) contain later data from rows of the CSV file (changing in cycle). In addition, you can also use internal hooks. CSV file can even contain macros (must be defined before processing the CSV file). I greet you. Jaroslav Hajtmar Example of use hooks etc. eg. Here: \usemodule[scancsv] \setuppapersize[C6, landscape] \setuppagenumbering[location=] % Structure of CSV file - you can use macros in CSV table too % name;address;postcode;city;linecolor % ME;STREET;;HERE;\green; % You;Square;;There;\red; % we;another Square;111;anyplace;\blue; % Library is making \name, \address, \postcode, \city and \linecolor macros % when you using \setheader command. % Your example: \unexpanded\def\lineaction{ \edef\lowercasename{\lowercase{\name}} \edef\uppercaseaddress{\uppercase{\address}} name: {\linecolor\name}\ -- lowercase name: \lowercasename\crlf address: \address\ -- upercase address: \uppercaseaddress\crlf \postcode\ \city\crlf \page } % My example with hooks: \unexpanded\def\tablelineaction{% \edef\ehname{\hname}% \edef\ehaddress{\haddress}% \edef\ehpostcode{\hpostcode}% \edef\ehcity{\hcity}% \ehname \ehaddress \ehpostcode \ehcity % } % My simple example with hooks: \def\simpletablelineaction{% \bTD{\linecolor\numline}\eTD\hname\haddress\hpostcode\hcity% } \setsep{;} % set separator \setheader % set information about header \setfiletoscan{mailmergedatatable.csv} \starttext % process all file Here is begin of processing... \filelineaction And here is end \page And now we can use internal hooks: \def\bch{\bTD } % begin column hook \def\ech{\eTD} % end column hook \def\blinehook{\bTR } % begin line hook \def\elinehook{\eTR} % end line hook \def\bfilehook{\bTABLE } % begin CSV file hook \def\efilehook{\eTABLE} % end CSV file hook Here is begin of processing... %process all file too (endless cycle) \doloopif{1}{==}{1}{\tablelineaction} And here is end \page Printing only specific data: \doloopif{\name}{eq}{You}{\tablelineaction} \page Simpletablelineaction: \doloopif{1}{==}{1}{\simpletablelineaction} \page Another using of hooks: \def\bch{\bgroup\linecolor\bf } % begin column hook \def\ech{\egroup,\ } % end column hook \def\blinehook{Here is new \numline. line of CSV file:\crlf } % begin line hook \def\elinehook{\hairline\par} % end line hook \def\bfilehook{Here is all CSV file:\blank[2*big] } % begin CSV file hook \def\efilehook{\par Here is end of file processing\par} % end CSV file hook \doloopif{1}{==}{1}{\tablelineaction} \stoptext Dne 8.12.2014 17:21, Pablo Rodriguez napsal(a): Hi Jaroslav, many thanks for your reply. It works fine here. Let’s see what I can do tomorrow with the real documents :-) Many thanks for your help again, Pablo On 12/08/2014 01:56 PM, Jaroslav Hajtmar wrote: Hello Pablo. What do you think of this solution: \usemodule[scancsv] \setuppapersize[C6, landscape] \setuppagenumbering[location=] \unexpanded\def\lineaction{ \edef\lcA{\lowercase{\cA}} \edef\ucB{\uppercase{\cB}} cA: \cA -- lowercase cA: \lcA\crlf cB: \cB -- upercase cB: \ucB\crlf cC: \cC -- cD: \cD\crlf \lowercase{}\crlf \uppercase{}\crlf \page } \setsep{;} \setfiletoscan{mailmergedatatable.csv} \starttext \filelineaction \stoptext I greet you Jaroslav Hajtmar ___ 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 ___