Re: [NTG-context] mkiv: way to signal extra run(s)
On Sat, 29 Sep 2012, Peter Rolf wrote: Am 29.09.2012 16:24, schrieb Philipp Gesang: · Hi, just wondering. Is there a official way to signal ConTeXt from a module, that an extra run is needed? Hi Peter, some time ago I got this answer from Hans: http://www.mail-archive.com/ntg-context@ntg.nl/msg45820.html (Today the table is “job.variables.tobesaved”.) Hi Philipp, that should work. I was planing to save the graphic hash data (id-> file name) as lua file anyway and make use of that data in the following runs (compare new and old hash). Storing a checksum of that file should be all I need then. Depending on what you want to do, you may be able to delegate all the book keeping to the filter module. Aditya___ 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] My own module.
Where should I put a module if I have the following project strucutre? math-books/ math-books.tex environments/ layout.tex products/ book1.tex book1/ chapter1.tex chapter2.tex book2.tex book2/ chapter1.tex chapter2.tex I have a "my_module.lua" and a "my_module.tex". Where should I put those files? How do I configure my project to use my module? How do I call my own module from "book1/chapter1.tex", for example? Thank you, André Caldas. ___ 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] mkiv: way to signal extra run(s)
Am 29.09.2012 16:24, schrieb Philipp Gesang: > · > >> Hi, >> >> just wondering. Is there a official way to signal ConTeXt from a module, >> that an extra run is needed? > > Hi Peter, some time ago I got this answer from Hans: > http://www.mail-archive.com/ntg-context@ntg.nl/msg45820.html > (Today the table is “job.variables.tobesaved”.) > Hi Philipp, that should work. I was planing to save the graphic hash data (id-> file name) as lua file anyway and make use of that data in the following runs (compare new and old hash). Storing a checksum of that file should be all I need then. Thanks for your help :-) Peter > Hth > Philipp > >> >> I started thinking about adding bookkeeping for the created run time >> graphics. Graphic related changes can then be detected and, if >> necessary, extra runs can be started to update the changed graphics. >> >> I need the second run to create and start the ImageMagick batch script, >> but the collected info in the *.tuc file prevents ConTeXt from starting >> a second/third run. Currently I use a batch file that simply deletes the >> *.tuc file and then calls 'context'. As there is no bookkeeping, all the >> graphics are recreated then. >> >> >> 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 >> ___ > > > > ___ > 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 > ___ > ___ 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] mkiv: way to signal extra run(s)
· > Hi, > > just wondering. Is there a official way to signal ConTeXt from a module, > that an extra run is needed? Hi Peter, some time ago I got this answer from Hans: http://www.mail-archive.com/ntg-context@ntg.nl/msg45820.html (Today the table is “job.variables.tobesaved”.) Hth Philipp > > I started thinking about adding bookkeeping for the created run time > graphics. Graphic related changes can then be detected and, if > necessary, extra runs can be started to update the changed graphics. > > I need the second run to create and start the ImageMagick batch script, > but the collected info in the *.tuc file prevents ConTeXt from starting > a second/third run. Currently I use a batch file that simply deletes the > *.tuc file and then calls 'context'. As there is no bookkeeping, all the > graphics are recreated then. > > > 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 > ___ -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgpNjwgO51Dsi.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 ___
[NTG-context] mkiv: way to signal extra run(s)
Hi, just wondering. Is there a official way to signal ConTeXt from a module, that an extra run is needed? I started thinking about adding bookkeeping for the created run time graphics. Graphic related changes can then be detected and, if necessary, extra runs can be started to update the changed graphics. I need the second run to create and start the ImageMagick batch script, but the collected info in the *.tuc file prevents ConTeXt from starting a second/third run. Currently I use a batch file that simply deletes the *.tuc file and then calls 'context'. As there is no bookkeeping, all the graphics are recreated then. 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 ___
Re: [NTG-context] Problem with ConTeXt (MkIV), Hebrew and ligatures
On 29-9-2012 01:41, Simo Ojala wrote: Hans Hagen On 09/28/2012 11:46 AM, Hans Hagen wrote: On 27-9-2012 21:27, Simo Ojala wrote: This is a problem originally posted in TeX/StackExchange. However, since I have not had any luck in finding a solution I post it here too. I am confident that somebody here should know the answer. http://tex.stackexchange.com/questions/73970/problem-with-context-mkiv-hebrew-and-ligatures "Since I last played with the latest ConTeXt MkIV, there has been introduced this new feature. It now seems to combine Hebrew characters automatically when possible to ligatures. So for example. If I have a word with following two characters: U+05D5 (HEBREW LETTER VAV) U+05BC (HEBREW POINT DAGESH OR MAPIQ) ConTeXt will combine these to: U+FB35 (HEBREW LETTER VAV WITH DAGESH) However, I would need to disable this feature for a number of reasons. For example, this breaks my little database query, because the query key is changed before(?) macro gets it. So if somebody would know how to turn this off and maybe also that what has changed." It depends on the font ... normally you can disable this by *not* using the mark and mkmk features Hans Ok, I have now tried turning off all kinds of features without luck. So, I tried putting together minimal test case. I suspect that there should be done something more than just turn off some font features. However, my ConTeXt skills are very limited so I can be wrong. The goal is that the word passed from ConTeXt file remains as it is written and gives unicode characters U+5e1, U+5d5, U+5bc and U+5e1. This is what already happens when the word is in the lua file. Simo PS: In case this matters. My ConTeXt MkIV version is "2012.09.23 12:40". It should be the latest for Ubuntu 12.04 LTS Precise Pangolin that is in the Adam Reviczky's PPA. %% testcase.tex \definefontfeature[hebrew][arabic][script=hebr] \definefont[dejavusans][name:dejavusans*hebrew at 26pt] \setupdirections[bidi=global] \starttext \dejavusans \def\Macro#1{\directlua{ dofile(resolvers.findfile("testcase.lua")) userdata.testfunction("#1") }} \Macro{סוּס} \blank[1cm]however, we can still color these independently\blank[0.5cm] \color[red]{ס}\color[green]{ו}\color[blue]{ּ}\color[yellow]{ס} \stoptext -- testcase.lua userdata = userdata or {} function userdata.testfunction(word) tex.sprint("\\blank[1cm]word passed by macro\\blank[0.5cm]") for i = 1, unicode.utf8.len(word) do tex.sprint("U+" .. string.format("%x",unicode.utf8.byte(word,i)) .. ": " .. unicode.utf8.sub(word,i,i) .. "\\par" ) end tex.sprint("\\blank[1cm]word written in lua file\\blank[0.5cm]") word = "סוּס" for i = 1, unicode.utf8.len(word) do tex.sprint("U+" .. string.format("%x",unicode.utf8.byte(word,i)) .. ": " .. unicode.utf8.sub(word,i,i) .. "\\par" ) end end I see three characters next to each other so what exactly is the problem? (BTW, take a look at goodies-002.tex in the test suite ... you can define colored glyphs as a feature) 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] minimals
On 29-9-2012 09:25, Johan Sandblom wrote: It is indeed somewhat complicated. Changes are needed in first-setup.sh as well as in mtx-update.lua. To complicate matters, one of the first things that happens in first-setup.sh is to retrieve a fresh and unaltered mtx-update.lua. My naïve recipe follows: 1. change contextgarden.net to metatex.org on line 99 of first-setup.sh 2. run once, which fails, but updates mtx-update.lua 3. comment out line 99 of first-setup.sh, to prevent further updates of scripts 4. change line 534 of mtx-update.lua to contain metatex.org instead of contextgarden.net run first-update.sh again, this time hopfully with success. May I suggest that the version of mtx-update.lua that can be retrieved from metatex.org contains references to that server and not contextgarden.net. I realize that then it is no longer a mirror, but on the other hand it may be useful when contextgarden is down. One of these days the minimals repository will be moved to the machine that runs the garden. After that we will change the scripts to find an active mirror. (if you do have the basic bin dir alrwady you can use another mirror with --server=...) 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] Current source directory.
Hi André, Hans is right, it's a version problem. You're using 2012.05.30 11:26 (from May) I'm using 2012.09.25 21:44. resolvers.inputstack is defined in my tex-data.lua. I looked up your version among the commits on http://repo.or.cz/w/context.git/shortlog, and found that resolvers.inputstack is not yet defined in your data-tex.lua. http://repo.or.cz/w/context.git/blob/ad5540007a2ac6504a47289ace109a76ec759a7e:/tex/context/base/data-tex.lua So, you'll need to update I think. Which is a bit more work than usual because minimals.contextgarden.net is down, but Johan Sandblom's explains quite nicely what to do. http://thread.gmane.org/gmane.comp.tex.context/78441/focus=78486 Cheers, Sietse On Fri, Sep 28, 2012 at 11:56 PM, Andre Caldas wrote: >> My mistake: I tested the code I gave you in \startluacode, but then >> for the e-mail I wrapped it in \cldcontext. > > I had tested it using startluacode, also. :-( > > >> These two versions both work, and I actually tested them this time: >> >> \startluacode >> context(environment.runpath .. '/' .. >> file.pathpart(resolvers.inputstack[#resolvers.inputstack]) >> ) >> \stopluacode > > I get this: > ! LuaTeX error :3: attempt to get length of field > 'inputstack' (a nil value) > stack traceback: > :3: in main chunk. > > system > tex > error on line 7 in file > products/topologia_geral.tex: LuaTeX error ... > [...] > })ted text> ...resolvers.inputstack]) > > \luat_start_lua_code_indeed ...ua \zerocount {#1}} > > l.7 \stopluacode > > >> \cldcontext{ >> environment.runpath .. '/' .. >> >> file.pathpart(resolvers.inputstack[table.getn(resolvers.inputstack)]) >> } > > And this: > ! LuaTeX error :1: bad argument #1 to 'getn' (table > expected, got nil) > stack traceback: > [C]: in function 'getn' > :1: in main chunk. > > system > tex > error on line 6 in file > products/topologia_geral.tex: LuaTeX error ... > > [...] > > \cldcontext ...\directlua \zerocount {context(#1)} > > l.6 } > > >> Sorry about that mistake. > > No need to apologize! :-) > It seems that resolvers.inputstack is not defined in my system. Where > is it defined in yours? file-res.lua? > > > Thank you very very much, :-) > André Caldas. > ___ > 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 > ___ ___ 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] minimals
It is indeed somewhat complicated. Changes are needed in first-setup.sh as well as in mtx-update.lua. To complicate matters, one of the first things that happens in first-setup.sh is to retrieve a fresh and unaltered mtx-update.lua. My naïve recipe follows: 1. change contextgarden.net to metatex.org on line 99 of first-setup.sh 2. run once, which fails, but updates mtx-update.lua 3. comment out line 99 of first-setup.sh, to prevent further updates of scripts 4. change line 534 of mtx-update.lua to contain metatex.org instead of contextgarden.net run first-update.sh again, this time hopfully with success. May I suggest that the version of mtx-update.lua that can be retrieved from metatex.org contains references to that server and not contextgarden.net. I realize that then it is no longer a mirror, but on the other hand it may be useful when contextgarden is down. Johan 2012-09-29 03:20 skrev Mica Semrick: I may be dumb... but I can't figure out how to change the mirror. minimals.contextgarden.net [1] seems to be hard-coded in a number of places. Help please? Best, Mica On Thu, Sep 27, 2012 at 1:05 AM, Mojca Miklavec wrote: On Wed, Sep 26, 2012 at 11:39 PM, Hans Hagen wrote: > Hi, > > Is minimals.contextgarden.net [1] offline? Until we figure out what exactly is wrong one can use the mirror: rsync://metatex.org/minimals/ [2] http://minimals.metatex.org/ [3] 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 [4] webpage : http://www.pragma-ade.nl [5] / http://tex.aanhet.net [6] archive : http://foundry.supelec.fr/projects/contextrev/ [7] wiki : http://contextgarden.net [8] ___ Links: -- [1] http://minimals.contextgarden.net [2] http://metatex.org/minimals/ [3] http://minimals.metatex.org/ [4] http://www.ntg.nl/mailman/listinfo/ntg-context [5] http://www.pragma-ade.nl [6] http://tex.aanhet.net [7] http://foundry.supelec.fr/projects/contextrev/ [8] 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- Johan Sandblom, MD PhD m +46735521477 What is wanted is not the will to believe, but the will to find out, which is the exact opposite --Bertrand Russell ___ 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 ___