I'm getting the following error when running this command: luatools -- ini --verbose --compile cont-en LuaTools | running command: luatex --ini --lua="cont-en.luc" "/usr/ local/texlive/2007/texmf-dist/tex/context/base/cont-en.tex" \\dump This is LuaTeX, Version snapshot-0.25.2-2008041101 (Web2C 7.5.6) (INITEX) (/usr/local/texlive/2007/texmf-dist/tex/context/base/cont-en.tex (/usr/local/texlive/2007/../texmf-local/tex/context/base/context.tex (/usr/local/texlive/2007/../texmf-local/tex/context/base/syst-pln.tex) (/usr/local/texlive/2007/../texmf-local/tex/context/base/syst-prm.tex) (/usr/local/texlive/2007/../texmf-local/tex/context/base/luat-env.tex ! LuaTeX error [string "luas[0]"]:1: attempt to call field 'luafilechunk' (a ni l value). \ctxluabyteload ...nvironment.luafilechunk("#1") } \ ...fproductionrun \else \ctxluabyteload {#1}{#2} \fi \global \everyloadluac... l.168 \registerctxluafile{luat-env}{1.001} ? I see that it is similar to an error that ZS had. http://www.ntg.nl/pipermail/ntg-context/2008/030012.html But while ZS's problem was solved by updating, I'm installing for the first time with the newest versions. What might be amiss? Thanks! mjg
Michael Green wrote:
I'm getting the following error when running this command: luatools -- ini --verbose --compile cont-en
LuaTools | running command: luatex --ini --lua="cont-en.luc" "/usr/ local/texlive/2007/texmf-dist/tex/context/base/cont-en.tex" \\dump This is LuaTeX, Version snapshot-0.25.2-2008041101 (Web2C 7.5.6) (INITEX) (/usr/local/texlive/2007/texmf-dist/tex/context/base/cont-en.tex (/usr/local/texlive/2007/../texmf-local/tex/context/base/context.tex (/usr/local/texlive/2007/../texmf-local/tex/context/base/syst-pln.tex) (/usr/local/texlive/2007/../texmf-local/tex/context/base/syst-prm.tex) (/usr/local/texlive/2007/../texmf-local/tex/context/base/luat-env.tex ! LuaTeX error [string "luas[0]"]:1: attempt to call field 'luafilechunk' (a nil value).
The environment.luafilechunk is defined in luat-env.lua, that should have been loaded at this point ( a bit earlier in luat-env.tex ). I think either /usr/local/texlive/texmf-local/tex/context/base/luat-env.tex is not the one from the latest context distribution, or an extra luatools --generate command is needed. You can check the \contextversion by looking at /usr/local/texlive/texmf-local/tex/context/base/context.tex around line 45, it should say \edef\contextversion{2008.04.11 14:48} There can be some more esoteric causes, but these are the two most likely ones. Best wishes, Taco
Taco Hoekwater wrote:
Michael Green wrote:
I'm getting the following error when running this command: luatools -- ini --verbose --compile cont-en
LuaTools | running command: luatex --ini --lua="cont-en.luc" "/usr/ local/texlive/2007/texmf-dist/tex/context/base/cont-en.tex" \\dump This is LuaTeX, Version snapshot-0.25.2-2008041101 (Web2C 7.5.6) (INITEX) (/usr/local/texlive/2007/texmf-dist/tex/context/base/cont-en.tex (/usr/local/texlive/2007/../texmf-local/tex/context/base/context.tex (/usr/local/texlive/2007/../texmf-local/tex/context/base/syst-pln.tex) (/usr/local/texlive/2007/../texmf-local/tex/context/base/syst-prm.tex) (/usr/local/texlive/2007/../texmf-local/tex/context/base/luat-env.tex ! LuaTeX error [string "luas[0]"]:1: attempt to call field 'luafilechunk' (a nil value).
The environment.luafilechunk is defined in luat-env.lua, that should have been loaded at this point ( a bit earlier in luat-env.tex ).
I think either
/usr/local/texlive/texmf-local/tex/context/base/luat-env.tex
is not the one from the latest context distribution, or an extra luatools --generate command is needed.
You can check the \contextversion by looking at
/usr/local/texlive/texmf-local/tex/context/base/context.tex
around line 45, it should say
\edef\contextversion{2008.04.11 14:48}
There can be some more esoteric causes, but these are the two most likely ones.
in previou sversions the env was loaded runtime (this behaviour originated in the stepwise development of embedding bytecodes in the format, in the beginning all chunks were loaded at runtime); i managed to get rid of that; in addition to taco's suggestions ... so it could be that old code and new code is mixed. ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Le 12 avril à 22:53:53 Michael Green
| LuaTools | running command: luatex --ini --lua="cont-en.luc" "/usr/ | local/texlive/2007/texmf-dist/tex/context/base/cont-en.tex" \\dump | This is LuaTeX, Version snapshot-0.25.2-2008041101 (Web2C 7.5.6) | (INITEX) | (/usr/local/texlive/2007/texmf-dist/tex/context/base/cont-en.tex | (/usr/local/texlive/2007/../texmf-local/tex/context/base/context.tex | (/usr/local/texlive/2007/../texmf-local/tex/context/base/syst-pln.tex) | (/usr/local/texlive/2007/../texmf-local/tex/context/base/syst-prm.tex) | (/usr/local/texlive/2007/../texmf-local/tex/context/base/luat-env.tex | ! LuaTeX error [string "luas[0]"]:1: attempt to call field | 'luafilechunk' (a ni | l value). | \ctxluabyteload ...nvironment.luafilechunk("#1") }
| \ ...fproductionrun \else \ctxluabyteload {#1}{#2} | \fi \global | \everyloadluac... | l.168 \registerctxluafile{luat-env}{1.001}
| ?
| I see that it is similar to an error that ZS had. [...] Hey, also exactly the same problem I posted yesterday in "updating minimals"! You're not alone! -- Jean
Michael Green
I'm getting the following error when running this command: luatools -- ini --verbose --compile cont-en
[...] Hi, I am getting a similar error on debian unstable. Following the instructions in the debian README.MarkIV when I get to: luatools --ini --compile --verbose cont-en I get the error ! LuaTeX error [string "luas[0]"]:1: attempt to call field 'luafilechunk' (a nil value). (full listing at end of mail). I have not run the ctxtools --update since I m not sure if is appropriate for debian... Any ideas? ============================================================ luatools --ini --compile --verbose cont-en LuaTools | version 1.1.1 - 2006+ - PRAGMA ADE / CONTEXT LuaTools | loading configuration for /usr/share/texmf/web2c from ///home/jd/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028/trees/f7d1b3c25487ab1e1035aff1c53b90da LuaTools | locating list of /home/jd/.texmf-config LuaTools | locating list of /home/jd/.texmf-var LuaTools | locating list of /home/jd/texmf LuaTools | locating list of /etc/texmf LuaTools | locating list of /var/lib/texmf LuaTools | locating list of /usr/local/share/texmf LuaTools | locating list of /usr/share/texmf LuaTools | locating list of /usr/share/texmf-texlive LuaTools | loading files for /etc/texmf from ///home/jd/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028/trees/76f9d14d3870a3ca17c588db81902d3d LuaTools | loading files for /var/lib/texmf from ///home/jd/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028/trees/49ce9fb6981e7315a79363280fdfe510 LuaTools | loading files for /usr/local/share/texmf from ///home/jd/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028/trees/5044cbe2799fe389b078f26ff6b9ee8e LuaTools | loading files for /usr/share/texmf from ///home/jd/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028/trees/0638a6bb4aac17125bf8bd1aa29dc0c8 LuaTools | loading files for /usr/share/texmf-texlive from ///home/jd/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028/trees/3187e2337ee4b2115b66aeca116ccb56 LuaTools | creating initialization file cont-en LuaTools | using library path : /usr/local/share/texmf/tex/context/base LuaTools | using lua libraries: l-string.lua l-lpeg.lua l-table.lua l-boolean.lua l-number.lua l-set.lua l-unicode.lua l-md5.lua l-os.lua l-io.lua l-file.lua l-dir.lua l-utils.lua l-tex.lua luat-lib.lua luat-inp.lua luat-tmp.lua luat-zip.lua luat-tex.lua LuaTools | using compiled initialization file cont-en.luc LuaTools | using lua initialization file cont-en.luc LuaTools | running command: luatex --ini --lua="cont-en.luc" "/usr/local/share/texmf/tex/context/base/cont-en.tex" \\dump (/usr/local/share/texmf/tex/context/base/cont-en.tex (/usr/local/share/texmf/tex/context/base/context.tex (/usr/local/share/texmf/tex/context/base/syst-pln.tex) (/usr/local/share/texmf/tex/context/base/syst-prm.tex) (/usr/local/share/texmf/tex/context/base/luat-env.tex ! LuaTeX error [string "luas[0]"]:1: attempt to call field 'luafilechunk' (a nil value). \ctxluabyteload ...nvironment.luafilechunk("#1") } \ ...fproductionrun \else \ctxluabyteload {#1}{#2} \fi \global \everyloadluac... l.168 \registerctxluafile{luat-env}{1.001} ? -- John Devereux
John Devereux wrote:
Michael Green
writes: I'm getting the following error when running this command: luatools -- ini --verbose --compile cont-en
Hi, I am getting a similar error on debian unstable.
Both of you, can you check that luatools luat-env.lua finds the file? If not, try running luatools --generate Best wishes, Taco
Taco Hoekwater
John Devereux wrote:
Michael Green
writes: I'm getting the following error when running this command: luatools -- ini --verbose --compile cont-en
Hi, I am getting a similar error on debian unstable.
Both of you, can you check that
luatools luat-env.lua
I just get a blank line printed. And I get the same if I feed it the name of a random, non-existent file. Which is not encouraging...
finds the file? If not, try running luatools --generate
This produces: LuaTools | skipping /texmf-local/web2c/texmf.cnf LuaTools | skipping /texmf/web2c/texmf.cnf LuaTools | LuaTools | runtime: 0.003 seconds I then still get the same error unfortunately :( -- John Devereux
John Devereux wrote:
Taco Hoekwater
writes: John Devereux wrote:
Michael Green
writes: I'm getting the following error when running this command: luatools -- ini --verbose --compile cont-en Hi, I am getting a similar error on debian unstable. Both of you, can you check that
luatools luat-env.lua
I just get a blank line printed. And I get the same if I feed it the name of a random, non-existent file. Which is not encouraging...
finds the file? If not, try running luatools --generate
This produces:
LuaTools | skipping /texmf-local/web2c/texmf.cnf LuaTools | skipping /texmf/web2c/texmf.cnf LuaTools | LuaTools | runtime: 0.003 seconds
aha, so how about setting the env variables TEXMFCNF and TEXMF Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen
John Devereux wrote:
Taco Hoekwater
writes: John Devereux wrote:
Michael Green
writes: I'm getting the following error when running this command: luatools -- ini --verbose --compile cont-en Hi, I am getting a similar error on debian unstable. Both of you, can you check that
luatools luat-env.lua
I just get a blank line printed. And I get the same if I feed it the name of a random, non-existent file. Which is not encouraging...
finds the file? If not, try running luatools --generate
This produces:
LuaTools | skipping /texmf-local/web2c/texmf.cnf LuaTools | skipping /texmf/web2c/texmf.cnf LuaTools | LuaTools | runtime: 0.003 seconds
aha, so how about setting the env variables TEXMFCNF and TEXMF
Hans
aha indeed! Setting TEXMF was missing from the instructions in debian... Or perhaps I messed up my configuration in the past. luatools --ini --compile cont-en works now. I will start playing with it. A quick try of the example snippet did not work (see dump at end of message) but I will look into it more and try Mojcas advice re ctxtools --update. Thanks. ============================================================ ~$cat temp.tex \starttext \ctxlua{a = 1.5 ; b = 1.8 ; c = a*b ; tex.print(c) ;} \stoptext ~$ texexec --lua temp.tex TeXExec | processing document 'temp.tex' TeXExec | no ctx file found TeXExec | tex processing method: context TeXExec | TeX run 1 TeXExec | writing option file temp.top TeXExec | using randomseed 1151 TeXExec | tex engine: luatex TeXExec | tex format: cont-en (./temp.tex ConTeXt ver: 2008.01.28 21:28 MKIV fmt: 2008.4.15 int: english/english language : language en is active report >> utilityfile: not present system : cont-new loaded (/usr/share/texmf/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (/usr/share/texmf/tex/context/base/cont-new.mkiv lua : used config path - /usr/share/texmf/web2c/texmf.cnf lua : used cache path - //home/jd/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028 ) (/usr/share/texmf/tex/context/base/cont-mtx.tex)) system : cont-old loaded (/usr/share/texmf/tex/context/base/cont-old.tex loading : Context Old Macros ) system : cont-fil loaded (/usr/share/texmf/tex/context/base/cont-fil.tex loading : Context File Synonyms ) bodyfont : 12pt rm is loaded error >> define font: font with name msam7 is not found error >> define font: name: msam7, loading aborted ! Font \*7ptmmmarm*:=msam7 at 7pt not loadable: metric data not found or bad. <to be read again> \relax \xxdododefinefont ...tspec {#4}\newfontidentifier \let \localrelativefontsiz... \dodosetmathfamilyA ...amily \fontsize \endcsname \else \ifcsname \fontbody ... \dosetmathfamily ...athfamily \scriptscriptfont #1 \let \fontbody #3\dodosetm... <inserted text> ...\scriptscriptface \c!ma \empty \dosetmathfamily \mbfam \t... \synchronizemath ...athfonts \the \mathstrategies \fi ... l.1 \starttext ? -- John Devereux
On Tue, Apr 15, 2008 at 12:37 PM, John Devereux wrote:
Hans Hagen
writes: John Devereux wrote:
Taco Hoekwater
writes: John Devereux wrote:
Michael Green
writes: I'm getting the following error when running this command: luatools -- ini --verbose --compile cont-en Hi, I am getting a similar error on debian unstable. Both of you, can you check that
luatools luat-env.lua
I just get a blank line printed. And I get the same if I feed it the name of a random, non-existent file. Which is not encouraging...
finds the file? If not, try running luatools --generate
This produces:
LuaTools | skipping /texmf-local/web2c/texmf.cnf LuaTools | skipping /texmf/web2c/texmf.cnf LuaTools | LuaTools | runtime: 0.003 seconds
aha, so how about setting the env variables TEXMFCNF and TEXMF
Hans
aha indeed!
Setting TEXMF was missing from the instructions in debian... Or perhaps I messed up my configuration in the past.
luatools --ini --compile cont-en
works now.
I will start playing with it.
A quick try of the example snippet did not work (see dump at end of message) but I will look into it more and try Mojcas advice re ctxtools --update.
ctxtools --update won't help you as you have some missing fonts (msam7.tfm). http://packages.debian.org/etch/all/texlive-base/filelist claims that the file should be present in texlive-base in Debian, so it's a bit confusing. Mojca
============================================================
~$cat temp.tex
\starttext \ctxlua{a = 1.5 ; b = 1.8 ; c = a*b ; tex.print(c) ;} \stoptext
~$ texexec --lua temp.tex
TeXExec | processing document 'temp.tex' TeXExec | no ctx file found TeXExec | tex processing method: context TeXExec | TeX run 1 TeXExec | writing option file temp.top TeXExec | using randomseed 1151 TeXExec | tex engine: luatex TeXExec | tex format: cont-en
(./temp.tex
ConTeXt ver: 2008.01.28 21:28 MKIV fmt: 2008.4.15 int: english/english
language : language en is active report >> utilityfile: not present system : cont-new loaded (/usr/share/texmf/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (/usr/share/texmf/tex/context/base/cont-new.mkiv lua : used config path - /usr/share/texmf/web2c/texmf.cnf lua : used cache path - //home/jd/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028 ) (/usr/share/texmf/tex/context/base/cont-mtx.tex)) system : cont-old loaded (/usr/share/texmf/tex/context/base/cont-old.tex loading : Context Old Macros ) system : cont-fil loaded (/usr/share/texmf/tex/context/base/cont-fil.tex loading : Context File Synonyms ) bodyfont : 12pt rm is loaded error >> define font: font with name msam7 is not found error >> define font: name: msam7, loading aborted ! Font \*7ptmmmarm*:=msam7 at 7pt not loadable: metric data not found or bad. <to be read again> \relax \xxdododefinefont ...tspec {#4}\newfontidentifier \let \localrelativefontsiz... \dodosetmathfamilyA ...amily \fontsize \endcsname \else \ifcsname \fontbody ... \dosetmathfamily ...athfamily \scriptscriptfont #1 \let \fontbody #3\dodosetm... <inserted text> ...\scriptscriptface \c!ma \empty \dosetmathfamily \mbfam \t... \synchronizemath ...athfonts \the \mathstrategies \fi ... l.1 \starttext ?
--
John Devereux
"Mojca Miklavec"
On Tue, Apr 15, 2008 at 12:37 PM, John Devereux wrote:
Hans Hagen
writes: John Devereux wrote:
Taco Hoekwater
writes: John Devereux wrote:
Michael Green
writes: > I'm getting the following error when running this command: luatools -- > ini --verbose --compile cont-en Hi, I am getting a similar error on debian unstable. Both of you, can you check that
luatools luat-env.lua
I just get a blank line printed. And I get the same if I feed it the name of a random, non-existent file. Which is not encouraging...
finds the file? If not, try running luatools --generate
This produces:
LuaTools | skipping /texmf-local/web2c/texmf.cnf LuaTools | skipping /texmf/web2c/texmf.cnf LuaTools | LuaTools | runtime: 0.003 seconds
aha, so how about setting the env variables TEXMFCNF and TEXMF
Hans
aha indeed!
Setting TEXMF was missing from the instructions in debian... Or perhaps I messed up my configuration in the past.
luatools --ini --compile cont-en
works now.
I will start playing with it.
A quick try of the example snippet did not work (see dump at end of message) but I will look into it more and try Mojcas advice re ctxtools --update.
ctxtools --update won't help you as you have some missing fonts (msam7.tfm). http://packages.debian.org/etch/all/texlive-base/filelist claims that the file should be present in texlive-base in Debian, so it's a bit confusing.
Mojca
Hi Mojca, There is a file here: /usr/share/texmf-texlive/fonts/tfm/public/ams/msam7.tfm But I don't know what else is needed. John
============================================================
~$cat temp.tex
\starttext \ctxlua{a = 1.5 ; b = 1.8 ; c = a*b ; tex.print(c) ;} \stoptext
~$ texexec --lua temp.tex
TeXExec | processing document 'temp.tex' TeXExec | no ctx file found TeXExec | tex processing method: context TeXExec | TeX run 1 TeXExec | writing option file temp.top TeXExec | using randomseed 1151 TeXExec | tex engine: luatex TeXExec | tex format: cont-en
(./temp.tex
ConTeXt ver: 2008.01.28 21:28 MKIV fmt: 2008.4.15 int: english/english
language : language en is active report >> utilityfile: not present system : cont-new loaded (/usr/share/texmf/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (/usr/share/texmf/tex/context/base/cont-new.mkiv lua : used config path - /usr/share/texmf/web2c/texmf.cnf lua : used cache path - //home/jd/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028 ) (/usr/share/texmf/tex/context/base/cont-mtx.tex)) system : cont-old loaded (/usr/share/texmf/tex/context/base/cont-old.tex loading : Context Old Macros ) system : cont-fil loaded (/usr/share/texmf/tex/context/base/cont-fil.tex loading : Context File Synonyms ) bodyfont : 12pt rm is loaded error >> define font: font with name msam7 is not found error >> define font: name: msam7, loading aborted ! Font \*7ptmmmarm*:=msam7 at 7pt not loadable: metric data not found or bad. <to be read again> \relax \xxdododefinefont ...tspec {#4}\newfontidentifier \let \localrelativefontsiz... \dodosetmathfamilyA ...amily \fontsize \endcsname \else \ifcsname \fontbody ... \dosetmathfamily ...athfamily \scriptscriptfont #1 \let \fontbody #3\dodosetm... <inserted text> ...\scriptscriptface \c!ma \empty \dosetmathfamily \mbfam \t... \synchronizemath ...athfonts \the \mathstrategies \fi ... l.1 \starttext ?
-- John Devereux
On Tue, Apr 15, 2008 at 1:25 PM, John Devereux wrote:
"Mojca Miklavec" writes:
Setting TEXMF was missing from the instructions in debian... Or perhaps I messed up my configuration in the past.
luatools --ini --compile cont-en
works now.
I will start playing with it.
A quick try of the example snippet did not work (see dump at end of message) but I will look into it more and try Mojcas advice re ctxtools --update.
ctxtools --update won't help you as you have some missing fonts (msam7.tfm). http://packages.debian.org/etch/all/texlive-base/filelist claims that the file should be present in texlive-base in Debian, so it's a bit confusing.
Mojca
Hi Mojca,
There is a file here:
/usr/share/texmf-texlive/fonts/tfm/public/ams/msam7.tfm
But I don't know what else is needed.
I would say that the installation might be slightly broken, even if only a few variables are missing. How exactly did you install LuaTeX and latest ConTeXt?
Setting TEXMF was missing from the instructions in debian...
This should not happen, but once you answer the question about how you have installed it, it might become clearer. Some time ago there was some problem on debian since Hans's lua scripts were unable to parse TEXMFCNF (texmf.cnf) files properly, but this might have been resolved in the meantime. Mojca
"Mojca Miklavec"
On Tue, Apr 15, 2008 at 1:25 PM, John Devereux wrote:
"Mojca Miklavec" writes:
Setting TEXMF was missing from the instructions in debian... Or perhaps I messed up my configuration in the past.
luatools --ini --compile cont-en
works now.
I will start playing with it.
A quick try of the example snippet did not work (see dump at end of message) but I will look into it more and try Mojcas advice re ctxtools --update.
ctxtools --update won't help you as you have some missing fonts (msam7.tfm). http://packages.debian.org/etch/all/texlive-base/filelist claims that the file should be present in texlive-base in Debian, so it's a bit confusing.
Mojca
Hi Mojca,
There is a file here:
/usr/share/texmf-texlive/fonts/tfm/public/ams/msam7.tfm
But I don't know what else is needed.
I would say that the installation might be slightly broken, even if only a few variables are missing. How exactly did you install LuaTeX and latest ConTeXt?
Mojca, I followed the instructions here, where applicable for debian sid: http://wiki.contextgarden.net/Debian_installation Then the instruction in the README.MarkIV that appeared in the pckage documentation directory (appended to end of post). However I have been using context for years, and may well have messed something up! It seems to work OK with my "normal" documents. Except I notice \usemodule[gnuplot] does not work. John
Setting TEXMF was missing from the instructions in debian...
This should not happen, but once you answer the question about how you have installed it, it might become clearer.
Some time ago there was some problem on debian since Hans's lua scripts were unable to parse TEXMFCNF (texmf.cnf) files properly, but this might have been resolved in the meantime.
============================================================ README.luatex ============= Mark IV is the name of the LuaTeX-aware part of ConTeXt; that is, when you use ConTeXt over the LuaTeX engine instead of PDFTeX or XeTeX. You run it with texexec --lua. Currently the integration of Mark IV into Debian is not completely done, especially because the details are currently worked out (see the dev-context mailing list). If you want to start using Mark IV the following the following few points should get you started: 1) Right versions: luatex >= 0.20.2 context >= 2007.12.20 2) environment variables and luatex-cache Mark IV ships its own implementation of file searching and doesn't use the ls-R databases, but luatex-cache. You have to tell luatools where to find texmf.cnf, and then generate the cache: export TEXMFCNF=/usr/share/texmf/web2c luatools --generate --verbose This will generate the luatex-cache in $HOME. If you want to put it somewhere else set (and export) the TEXMFCACHE variable (like export TEXMFCACHE=/tmp) 3) Generate a Mark IV format This is not integrated into the usual format building process, and probably will need some time to be worked out completely as the current fmtutil cannot cope with Mark IV formats. Call luatools --ini --compile cont-en 4) Now you can try some simple document like (thanks to Arthur Reutenauer) \starttext \ctxlua{a = 1.5 ; b = 1.8 ; c = a*b ; tex.print(c) ;} or the equivalent: \startlua a = 1.5 b = 1.8 c = a*b tex.print(c) \stoplua You can also do more elaborate calculations with the lua math library: \ctxlua{tex.print("$\string\\sqrt{2} = " .. math.sqrt(2) .. "$")} \stoptext and run it with texexec --lua filename.tex -- John Devereux
"Mojca Miklavec"
However I have been using context for years, and may well have messed something up! It seems to work OK with my "normal" documents. Except I notice \usemodule[gnuplot] does not work.
What exactly goes wrong?
I have got this working now too. The problems were: - the syntax seems to have changed since I originally used it. Used to be \startGNUPLOTgraphic now needs to be \startGNUPLOTscript - I missed the bit on the wiki about enabling write18 - I was misled by some examples (in the source code) into thinking that parameters go in curly brackets, but this does not work for me (and fails silently). So in the source code you have \startGNUPLOTscript{sin} plot sin(x) \stopGNUPLOTscript \useGNUPLOTgraphic{sin} but I needed \startGNUPLOTscript[sin] plot sin(x) \stopGNUPLOTscript \useGNUPLOTgraphic[sin] to make it work. -- John Devereux
On Wed, Apr 16, 2008 at 5:18 PM, John Devereux wrote:
"Mojca Miklavec" writes:
However I have been using context for years, and may well have messed something up! It seems to work OK with my "normal" documents. Except I notice \usemodule[gnuplot] does not work.
What exactly goes wrong?
I have got this working now too. The problems were:
- the syntax seems to have changed since I originally used it. Used to be \startGNUPLOTgraphic now needs to be \startGNUPLOTscript
- I missed the bit on the wiki about enabling write18
- I was misled by some examples (in the source code) into thinking that parameters go in curly brackets, but this does not work for me (and fails silently).
So in the source code you have
\startGNUPLOTscript{sin} plot sin(x) \stopGNUPLOTscript \useGNUPLOTgraphic{sin}
but I needed
\startGNUPLOTscript[sin] plot sin(x) \stopGNUPLOTscript \useGNUPLOTgraphic[sin]
to make it work.
I'm sorry about that. Yes, the syntax change is my fault, but it won't happen again. If I wanted to support \useGNUPLOTgraphic[sin][1,3][width=.7\textwidth] and alike, the curly braces didn't fit in so nicely. The module has initially been part of ConTeXt (Hans has written most of it at the beginning), but it was easier to develop it as a module once I started writing metapost code for the dedicated terminal etc. I have removed the faulty examples a few days ago (just didn't upload the new version yet). I was trying to write code in such a way that curly braces would work as well for backward compatibility, but failed to do so (the code is there, but only half of it works). However, all of these changes have happened rather early in the process and won't happen again. Moreover, it would be nice to get the TikZ terminal working with ConTeXt (I need to find some time for it, and then finally convince the gnuplot developers to include it into the binary). Mojca
"Mojca Miklavec"
On Wed, Apr 16, 2008 at 5:18 PM, John Devereux wrote:
"Mojca Miklavec" writes:
However I have been using context for years, and may well have messed something up! It seems to work OK with my "normal" documents. Except I notice \usemodule[gnuplot] does not work.
What exactly goes wrong?
I have got this working now too. The problems were:
- the syntax seems to have changed since I originally used it. Used to be \startGNUPLOTgraphic now needs to be \startGNUPLOTscript
- I missed the bit on the wiki about enabling write18
- I was misled by some examples (in the source code) into thinking that parameters go in curly brackets, but this does not work for me (and fails silently).
So in the source code you have
\startGNUPLOTscript{sin} plot sin(x) \stopGNUPLOTscript \useGNUPLOTgraphic{sin}
but I needed
\startGNUPLOTscript[sin] plot sin(x) \stopGNUPLOTscript \useGNUPLOTgraphic[sin]
to make it work.
I'm sorry about that. Yes, the syntax change is my fault, but it won't happen again. If I wanted to support \useGNUPLOTgraphic[sin][1,3][width=.7\textwidth] and alike, the curly braces didn't fit in so nicely.
Yes it's fine, the square brackets are better.
The module has initially been part of ConTeXt (Hans has written most of it at the beginning), but it was easier to develop it as a module once I started writing metapost code for the dedicated terminal etc.
I have removed the faulty examples a few days ago (just didn't upload the new version yet). I was trying to write code in such a way that curly braces would work as well for backward compatibility, but failed to do so (the code is there, but only half of it works). However, all of these changes have happened rather early in the process and won't happen again.
Moreover, it would be nice to get the TikZ terminal working with ConTeXt (I need to find some time for it, and then finally convince the gnuplot developers to include it into the binary).
I really like gnuplot and the gnuplot module. It is great to be able to include the data inline with the document. And it would be nice to see it part of the distribution. I am using a stock debian gnuplot, so I don't know the implications of the context and TikZ terminals. Does it mean I would not end up with so many *-gnuplot-* files? :) -- John Devereux
On Wed, Apr 16, 2008 at 9:24 PM, John Devereux wrote:
"Mojca Miklavec" writes:
I really like gnuplot and the gnuplot module. It is great to be able to include the data inline with the document. And it would be nice to see it part of the distribution. I am using a stock debian gnuplot, so I don't know the implications of the context and TikZ terminals.
No major difference. But it would (should, at least) be compatible with all the three: LaTeX/plain/ConTeXt.
Does it mean I would not end up with so many *-gnuplot-* files? :)
When I have developed the terminal with enormous Hans's and Taco's help, I have asked him to implement some functionality to delete the files with ctxtools --purge. He has implemented some functionality (\registertempfile or something - need to check), but it deletes the files automatically at the end of run, so one either needs to: - delete the files - leave the files - no option to delete files with ctxtools The problem with deleting the files immediately is that if you make a trivial mistake in the gnuplot script, gnuplot won't create any output, and it's rather difficult to spot the error in the long bunch of ConTeXt messages. You just get no graphic, any you wonder why. Do you have any suggestions about how to reduce the number of files in some sensible way? Mojca
Am 2008-04-17 um 15:42 schrieb Mojca Miklavec:
Do you have any suggestions about how to reduce the number of files in some sensible way?
I don't use gnuplot, but it's the same problem with lilypond - lots of files cluttering my project directory. It would be a good solution if we could write all those temp files to a configurable directory (that one can delete or not). The problem is probably that our client app (gnuplot, lilypond) or at least ConTeXt's "has changed" testing depends on that files. If you find a solution for gnuplot I'd like to copy it for lilypond. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
On Thu, Apr 17, 2008 at 4:23 PM, Henning Hraban Ramm wrote:
Am 2008-04-17 um 15:42 schrieb Mojca Miklavec:
Do you have any suggestions about how to reduce the number of files in some sensible way?
I don't use gnuplot, but it's the same problem with lilypond - lots of files cluttering my project directory.
It would be a good solution if we could write all those temp files to a configurable directory (that one can delete or not).
A configurable directory would indeed be the perfect solution (also for other temp files).
The problem is probably that our client app (gnuplot, lilypond) or at least ConTeXt's "has changed" testing depends on that files.
Which is not always desirable. If I have plot 'data.dat' and change data, then the graph won't be recompiled. Mojca
"Mojca Miklavec"
On Wed, Apr 16, 2008 at 9:24 PM, John Devereux wrote:
"Mojca Miklavec" writes:
I really like gnuplot and the gnuplot module. It is great to be able to include the data inline with the document. And it would be nice to see it part of the distribution. I am using a stock debian gnuplot, so I don't know the implications of the context and TikZ terminals.
No major difference. But it would (should, at least) be compatible with all the three: LaTeX/plain/ConTeXt.
Does it mean I would not end up with so many *-gnuplot-* files? :)
When I have developed the terminal with enormous Hans's and Taco's help, I have asked him to implement some functionality to delete the files with ctxtools --purge. He has implemented some functionality (\registertempfile or something - need to check), but it deletes the files automatically at the end of run, so one either needs to: - delete the files - leave the files - no option to delete files with ctxtools The problem with deleting the files immediately is that if you make a trivial mistake in the gnuplot script, gnuplot won't create any output, and it's rather difficult to spot the error in the long bunch of ConTeXt messages. You just get no graphic, any you wonder why.
Do you have any suggestions about how to reduce the number of files in some sensible way?
The ideal would be an option when processing the source file, to turn off file deletion. Like texexec document.tex --keep-temporaries So by default the source directory would be kept clean, but when "debugging" the intermediate files would be available. Or perhaps some option passed to \startGNUPLOTscript (or \useGNUPLOTgraphic) if that is possible? \startGNUPLOTscript[example][keeptemporaryfile=yes] That might be better otherwise debugging a big document could result it hundreds of files. Another possibility would be to put the files in /tmp. -- John Devereux
On Thu, Apr 17, 2008 at 4:27 PM, John Devereux wrote:
"Mojca Miklavec" writes:
Do you have any suggestions about how to reduce the number of files in some sensible way?
The ideal would be an option when processing the source file, to turn off file deletion. Like
texexec document.tex --keep-temporaries
So by default the source directory would be kept clean, but when "debugging" the intermediate files would be available.
Or perhaps some option passed to \startGNUPLOTscript (or \useGNUPLOTgraphic) if that is possible?
\startGNUPLOTscript[example][keeptemporaryfile=yes]
This sounds fine (having a --debug-like option), but one more question - what about caching existing results? (If all files are deleted, then it's not possible to ask for --ifchanged, so gnuplot needs to be run each time.)
That might be better otherwise debugging a big document could result it hundreds of files.
Another possibility would be to put the files in /tmp.
That's not too practical. Mojca
"Mojca Miklavec"
On Thu, Apr 17, 2008 at 4:27 PM, John Devereux wrote:
"Mojca Miklavec" writes:
Do you have any suggestions about how to reduce the number of files in some sensible way?
The ideal would be an option when processing the source file, to turn off file deletion. Like
texexec document.tex --keep-temporaries
So by default the source directory would be kept clean, but when "debugging" the intermediate files would be available.
Or perhaps some option passed to \startGNUPLOTscript (or \useGNUPLOTgraphic) if that is possible?
\startGNUPLOTscript[example][keeptemporaryfile=yes]
This sounds fine (having a --debug-like option), but one more question - what about caching existing results? (If all files are deleted, then it's not possible to ask for --ifchanged, so gnuplot needs to be run each time.)
Actually the configurable temp dir would be OK too. texexec document.tex --tempdir=./temporaries Regarding cacheing, this would be nice but I don't know if it can be done. I think you still need to run gnuplot in case the data has changed.
That might be better otherwise debugging a big document could result it hundreds of files.
Another possibility would be to put the files in /tmp.
That's not too practical.
-- John Devereux
On 15 apr 2008, at 14:52, John Devereux wrote:
4) Now you can try some simple document like (thanks to Arthur Reutenauer) \starttext .... some statements deleted ....
\startlua a = 1.5 b = 1.8 c = a*b tex.print(c) \stoplua \stoptext and run it with texexec --lua filename.tex
Not true. This code used to work, it DID WORK. But now it gives an error: system : cont-sys loaded (/Users/hans/TeX/texmf-private/tex/context/user/cont-sys.tex ! Undefined control sequence. l.182 \forceMPTEXgraphictrue ConTeXt ver: 2008.04.11 00:07 MKIV fmt: 2008.4.14 int: english/ english I am not happy to see something so simple now being broken!! Hans van der Meer
On Tue, Apr 15, 2008 at 4:16 PM, Hans van der Meer wrote:
Not true. This code used to work, it DID WORK. But now it gives an error: system : cont-sys loaded (/Users/hans/TeX/texmf-private/tex/context/user/cont-sys.tex ! Undefined control sequence. l.182 \forceMPTEXgraphictrue
ConTeXt ver: 2008.04.11 00:07 MKIV fmt: 2008.4.14 int: english/ english
I am not happy to see something so simple now being broken!!
That probably happens with just any file, right? Try to comment out \forceMPTEXgraphictrue from /Users/hans/TeX/texmf-private/tex/context/user/cont-sys.tex Mojca
Hans van der Meer wrote:
On 15 apr 2008, at 14:52, John Devereux wrote:
4) Now you can try some simple document like (thanks to Arthur Reutenauer) \starttext ..... some statements deleted .... \startlua a = 1.5 b = 1.8 c = a*b tex.print(c) \stoplua \stoptext and run it with texexec --lua filename.tex
Not true. This code used to work, it DID WORK. But now it gives an error: system : cont-sys loaded (/Users/hans/TeX/texmf-private/tex/context/user/cont-sys.tex ! Undefined control sequence. l.182 \forceMPTEXgraphictrue
ConTeXt ver: 2008.04.11 00:07 MKIV fmt: 2008.4.14 int: english/ english
I am not happy to see something so simple now being broken!!
the upcoming release will \let\forceMPTEXgraphictrue\relax actually nothin gis really broken, it's just that supp-mps is no longer used in mkiv and so we have to provide placeholders (the less the better) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Same thing here. "luatools luat-env.lua" gives an empty line. After "luatools --generate" again the same. And I have TEXMFCNF and TEXMF defined in .bashrc TEXMFCNF="/usr/local/texlive/2007/texmf/web2c" TEXMF="{/Users/hans/TeX/texmf-private,/usr/local/texlive/texmf- context,/usr/local/texlive/texmf-local,/usr/local/texlive/2007/texmf,/ usr/local/texlive/2007/texmf-config,/usr/local/texlive/2007/texmf- dist,/usr/local/texlive/2007/texmf-doc,/usr/local/texlive/2007/texmf- var}" So there must be something else amiis. Hans van der Meer On 15 apr 2008, at 11:56, Hans Hagen wrote:
John Devereux wrote:
Taco Hoekwater
writes: John Devereux wrote:
Michael Green
writes: I'm getting the following error when running this command: luatools -- ini --verbose --compile cont-en Hi, I am getting a similar error on debian unstable. Both of you, can you check that
luatools luat-env.lua
I just get a blank line printed. And I get the same if I feed it the name of a random, non-existent file. Which is not encouraging...
finds the file? If not, try running luatools --generate
This produces:
LuaTools | skipping /texmf-local/web2c/texmf.cnf LuaTools | skipping /texmf/web2c/texmf.cnf LuaTools | LuaTools | runtime: 0.003 seconds
aha, so how about setting the env variables TEXMFCNF and TEXMF
Hans
On Tue, Apr 15, 2008 at 9:57 AM, John Devereux wrote:
I have not run the ctxtools --update since I m not sure if is appropriate for debian...
ctxtools --update does several things: a) download cont-tmf.zip b) extract to texmf-local c) generate formats a) is safe, b) and c) might put thing to weird places (different distros have different conventions). A rather safe thing to do is to unzip cont-tmf.zip to a location that you trust to be OK. You can unzip it to either /usr/local/share/texmf/ or to .texlive (check if one exists) and then regenerate formats in the "debian way". If you put files to /usr/local/share/texmf/, the next, the next update (does it ever happen?) will update those files (uninstall might possibly leave some files there if they were not present in your previous installation). If you put context to your local tree, you only need to make sure not to forget about it. If you upgrade context with debian later, the tree in your home will have precedence. But in general there should be no problem updating some files on debian. If you don't trust ctxtools, just do it manually. You can also run rsync from minimals.contextgarden.net to update context files instead of downloading and extracting the zip from pragma. Mojca
John Devereux
Michael Green
writes: I'm getting the following error when running this command: luatools -- ini --verbose --compile cont-en
[...]
Hi, I am getting a similar error on debian unstable.
Following the instructions in the debian README.MarkIV when I get to:
luatools --ini --compile --verbose cont-en
I get the error
! LuaTeX error [string "luas[0]"]:1: attempt to call field 'luafilechunk' (a nil value).
(full listing at end of mail).
I have not run the ctxtools --update since I m not sure if is appropriate for debian...
Any ideas?
For the record, this now appears to be fixed thanks to help of Norbert and Mojca. [...] Hi Norbert, I updated debian and sure enough there is a new luatex - was that you? But this in itself did not fix things immediately. I then looked at /usr/local/share/texmf and now realise that this installation is not the debian one, it must have come from something off the website as you suspect. I got rid of it with a rm -rf. I then realised that my manual setting of TEXMF (suggested by Hans) was wrong - I was only setting it to /usr/local/share/texmf which omits most of tex. I think then when I generated the lua cache that is why it could not find the fonts. So I unset TEXMF and followed your README instructions again - and it is working now it seems! (I don't know whether the luatex update was needed or not). Anyway thank you very much for your help, and Mojca too. -- John Devereux
Same problem, fresh rsync from minimals: C:\Users\chesky\Programs\ConTeXt>luatools --ini --compile cont-en LuaTools | creating initialization file cont-en LuaTools | using library path : C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base LuaTools | using lua libraries: l-string.lua l-lpeg.lua l-table.lua l-boolean.lua l-number.lua l-set.lua l-unicode.lua l-md5.lua l-os.lua l-io.lua l-file.lua l-url.lua l-dir.lua l-utils.lua l-tex.lua luat-env.lua luat-lib.lua luat-inp.lua luat-tmp.lua luat-zip.lua luat-tex.lua LuaTools | using compiled initialization file cont-en.luc LuaTools | using lua initialization file cont-en.luc LuaTools | running command: luatex --ini --lua="cont-en.luc" "C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/cont-en.tex" \dump (C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/cont-en.tex (C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/context.tex (C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/syst-pln.tex) (C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/syst-prm.tex) (C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/luat-env.tex) (C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/luat-lib.tex ! LuaTeX error ...ams/ConTeXt/texmf-context/tex/context/base/l-aux.lua:55: attempt to call field 'Carg' (a nil value). \ctxluabytecode ...ode " .. "#1" .. str) end end } \registerctxluafile ...{\the \luabytecodecounter } \fi l.45 \registerctxluafile{l-aux} {1.001} ? Multiple runs of luatools --selfupdate and luatools --generate don't help. I'll try pulling again later, see if that works. --Joel
On Wed, Apr 16, 2008 at 8:53 PM, Joel C. Salomon wrote:
Same problem, fresh rsync from minimals:
C:\Users\chesky\Programs\ConTeXt>luatools --ini --compile cont-en
LuaTools | creating initialization file cont-en LuaTools | using library path : C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base
LuaTools | using lua libraries: l-string.lua l-lpeg.lua l-table.lua l-boolean.lua l-number.lua l-set.lua l-unicode.lua l-md5.lua l-os.lua l-io.lua l-file.lua l-url.lua l-dir.lua l-utils.lua l-tex.lua luat-env.lua luat-lib.lua luat-inp.lua luat-tmp.lua luat-zip.lua
luat-tex.lua LuaTools | using compiled initialization file cont-en.luc LuaTools | using lua initialization file cont-en.luc
LuaTools | running command: luatex --ini --lua="cont-en.luc" "C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/cont-en.tex" \dump (C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/cont-en.tex (C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/context.tex (C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/syst-pln.tex) (C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/syst-prm.tex) (C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/luat-env.tex) (C:/Users/chesky/Programs/ConTeXt/texmf-context/tex/context/base/luat-lib.tex ! LuaTeX error ...ams/ConTeXt/texmf-context/tex/context/base/l-aux.lua:55: attempt to call field 'Carg' (a nil value). \ctxluabytecode ...ode " .. "#1" .. str) end end }
\registerctxluafile ...{\the \luabytecodecounter } \fi l.45 \registerctxluafile{l-aux} {1.001}
?
Multiple runs of luatools --selfupdate and luatools --generate don't help.
I'll try pulling again later, see if that works.
Just "pulling" later won't help you (most probably?). I'm now updating LuaTeX for windows to the development version if that would change anything (but I doubt it). You can try again in several minutes. I'm actually sitting near a windows machine, so I can also try it myself now. Mojca
Joel C. Salomon wrote:
attempt to call field 'Carg' (a nil value).
that's a recent lpeg extension ... you call the wrong binary ... did you update luatex, texlua, texluac? ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Joel C. Salomon wrote:
On Wed, Apr 16, 2008 at 4:32 PM, Hans Hagen
wrote: did you update luatex, texlua, texluac?
How can I tell?
The banners (first line of luatex --version, texlua --version, texluac --version) should all be the same and mention at least snapshot-0.25.2 Best wishes, Taco
Joel C. Salomon wrote:
On Wed, Apr 16, 2008 at 4:32 PM, Hans Hagen
wrote: did you update luatex, texlua, texluac?
they all should be the same binary but with different names ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (9)
-
Hans Hagen
-
Hans van der Meer
-
Henning Hraban Ramm
-
Jean Magnan de Bornier
-
Joel C. Salomon
-
John Devereux
-
Michael Green
-
Mojca Miklavec
-
Taco Hoekwater