Re: [NTG-context] TeX capacity exceeded.... but....
On 2022-03-17 18:14, jbf via ntg-context wrote: I'd like to understand what is happening in this particular instance: While playing with a suggestion to a recent request (re \currentlistentrynumber etc.) I suddenly got a compiling error: TeX capacity exceeded, sorry [file=2000]. I returned everything to how it was before I was trying out those suggestions, but still got the error, so I began the \stopdocument routine fairly early in the document... same problem still. Then I brought the \stopdocument well forward, immediately after the standard makeup pages and the document compiled. When I removed \stopdocument, the entire document compiled as it should. So the basic question is: what can be causing the error message? This has happened to me on two occasions with this document - it occurred once before I had even begun experimenting with the \currentlistentry options, so I do not think that the problem lies there. And when it occurred that time, I again solved it with \stopdocument routine, but further into the document. And similarly, once it compiled that far and I removed it, the whole document compiled once more. If it is too complicated an explanation for an email response, maybe just point me to a document that explains the issue. Julian I cannot explain what is happening, but I can tell you what I do when I come across an unexpected failure: I delete the .tuc file (and .tua file as well if present) and try again. This is an easy thing to do before halving the source (moving \stop) and such. -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] TeX capacity exceeded.... but....
On 3/17/2022 11:14 PM, jbf via ntg-context wrote: I'd like to understand what is happening in this particular instance: While playing with a suggestion to a recent request (re \currentlistentrynumber etc.) I suddenly got a compiling error: TeX capacity exceeded, sorry [file=2000]. I returned everything to how it was before I was trying out those suggestions, but still got the error, so I began the \stopdocument routine fairly early in the document... same problem still. Then I brought the \stopdocument well forward, immediately after the standard makeup pages and the document compiled. When I removed \stopdocument, the entire document compiled as it should. So the basic question is: what can be causing the error message? This has happened to me on two occasions with this document - it occurred once before I had even begun experimenting with the \currentlistentry options, so I do not think that the problem lies there. And when it occurred that time, I again solved it with \stopdocument routine, but further into the document. And similarly, once it compiled that far and I removed it, the whole document compiled once more. If it is too complicated an explanation for an email response, maybe just point me to a document that explains the issue. a guess ... it looks like you load the same file so you have some nesting / grouping problem; (some file loaders keep track of being loaded but you probably load before that is done) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] TeX capacity exceeded
On 5/19/2021 6:49 PM, Thomas A. Schmitz wrote: On 19.05.21 18:34, Hans Hagen wrote: Can you check the latest upload? You should be able to go way higher. Yes, with 2021.05.19 18:22, the file compiles again in lmtx! I'm also trying your suggestions for improving the Lua code and rethinking my tables for analyzing the vocabulary. Thank you for the quick fix! And I hope there won't be any problem for other users - I'm aware that memory If they have problems it's because of other changes -) on computers can differ vastly. I sometimes run ConTeXt on my raspberry pi 3, which has just 1 G of RAM, whereas my newish iMac at home has 40 G. So it's difficult to find the sweet spot that will satisfy everybody... Unless you use many huge fonts, running your document on a rpi 4 with 4-8 gb should work ok (we have a rpi 4 in mojcas compile farm connected to an usb3 ssd). My laptop is from 2013 (decent intel 3840QM cpu + 16 GB mem and ssd and so) and is about 3 times slower than the rpi 4 in the luametatex manual. Your file in mkiv does a decent ppm (is that an arm or intel mac?) mkiv lua stats > lua properties: engine: lua 5.3, used memory: 601 MB, ctx: 579 MB, max: unknown MB, hash chars: min(64,40), symbol mask: utf (τεχ) mkiv lua stats > runtime: 22.310 seconds, 1068 processed pages, 1068 shipped pages, 47.871 pages/second so I suppose in lmtx it's a bit faster and using less mem. Still less mem than the GB's that e.g. firefox consumes after a few hours sitting idle. Concerning the sweetspot: I supose that on a laptop or desktop users are okay, but in a vm (or instance) it might matter because there processes have to fight over memory and cache (some is gained back by often faster disk io because that gets delegated to another process). I try to keep that in mind with luametatex/lmtx, which is why I spent quite some time on a lower mem footprint. I have no clue what a modern cpu does compared to mine (tex is single core). (btw, the latest version should also be a bit more efficient / faster with some huge cjk fonts that for some reasons have so many zero entries that the tma file was 3 times larger than needed, but I suppose fonts will always be a bit of an issue ... they have always been since tex showed up.) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] TeX capacity exceeded
On 19.05.21 18:34, Hans Hagen wrote: Can you check the latest upload? You should be able to go way higher. Yes, with 2021.05.19 18:22, the file compiles again in lmtx! I'm also trying your suggestions for improving the Lua code and rethinking my tables for analyzing the vocabulary. Thank you for the quick fix! And I hope there won't be any problem for other users - I'm aware that memory on computers can differ vastly. I sometimes run ConTeXt on my raspberry pi 3, which has just 1 G of RAM, whereas my newish iMac at home has 40 G. So it's difficult to find the sweet spot that will satisfy everybody... All best Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] TeX capacity exceeded
On 5/17/2021 11:43 PM, Thomas A. Schmitz wrote: Hi all, I have a rather large (almost 120,000 lines) xml file, processing pulls in another large xml file. The project compiles under mkiv; with lmtx, I get tex error > tex error on line 8 in file : TeX capacity exceeded, sorry [reference count=32767] Can you check the latest upload? You should be able to go way higher. If you're worried about your lua macros performance you can always run with: --profile and look at the luatex-profile.log file ... it gives a rough impression. be prepared for a slow run (although the latest greatest lmtx should perform some 2.5 times better when profiling). There's also a new (yet unofficial) feature: \starttext \setupfonts [serif=dejavuserif*default, sans=dejavusans, mono=dejavusansmono] {AAA\char1234 AAA} {\ss BBB\char1234 BBB}\par {AA} {\ss BB}\par \dorecurse{1000}{ \char1234 } \stoptext You can set up a list of 'quick and dirty fallback' fonts (you can set a sequence for each style). This doesn't replace the normal fallback mechanisms but can be handy as catch. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] TeX capacity exceeded
On 5/17/2021 11:43 PM, Thomas A. Schmitz wrote: Is texmfcnf.lua still the configuration file I need to look at for this kind of problem? Which variable could I change? Normally not needed but this is the section for luatex: ["luatex.errorline"] =250, -- no need to change ["luatex.halferrorline"] =125, -- no need to change ["luatex.expanddepth"] = 1, -- no need to change ["luatex.hashextra"] = 10, -- rarely more is needed ["luatex.nestsize"] = 1000, -- often an error if more needed ["luatex.maxinopen"] =500, -- i use 2000 ["luatex.maxprintline"] = 1, -- no need to change ["luatex.maxstrings"]= 50, -- maybe sometimes ["luatex.paramsize"] = 25000, -- seldom ["luatex.savesize"] = 10, -- often an error if more needed ["luatex.stacksize"] = 10, -- often an error if more needed not, in luametatex we have some more and also more control; this is what the next version will support (the above method is how it currently goes, max values that use the preset allocations steps) ["luametatex.errorlinesize"] = { size = 250 }, -- max = 255 ["luametatex.halferrorlinesize"] = { size = 250 }, -- max = 255 ["luametatex.expandsize"]= { size =1 }, -- max = 100 ["luametatex.stringsize"]= { size = 50, step = 10 }, -- max = 2097151 -- number of strings ["luametatex.poolsize"] = { size = 1000, step = 100 }, -- max = 1 -- chars in string ["luametatex.hashsize"] = { size = 25, step = 10 }, -- max = 2097151 ["luametatex.nodesize"] = { size = 5000, step = 50 }, -- max = 5000 ["luametatex.tokensize"] = { size = 1000, step = 25 }, -- max = 1000 ["luametatex.buffersize"]= { size = 1000, step = 100 }, -- max = 1 ["luametatex.inputsize"] = { size = 10, step = 1 }, -- max =10 -- aka stack ["luametatex.filesize"] = { size = 2000, step = 200 }, -- max = 2000 ["luametatex.nestsize"] = { size =1, step =1000 }, -- max = 1 ["luametatex.parametersize"] = { size = 10, step = 1 }, -- max =10 ["luametatex.savesize"] = { size = 50, step = 1 }, -- max =50 ["luametatex.fontsize"] = { size = 250, step = 250 }, -- max =10 ["luametatex.languagesize"] = { size = 250, step = 250 }, -- max = 1 ["luametatex.marksize"] = { size = 50, step = 50 }, -- max = 1 One can just define the max if needed because we bump memory stepwise (on demand). It depends on the kind of projects you have. One can also sey { plus = 1 } to add more to the set size without bothering about existing values. Now, if you watch closely you'll see that most max values are high already (initial values cannot be set) but token and node memory as well as string related values can be set much larger. However, it makes sense to limit. Actually for some scenarios one might even want to go lower. When you compare mkiv and mkxl you'll notice that we use less memory anyway (for various reasons / optimizations). The format file is also smaller (esp when you take into account that the mkiv one is zip compressed and the lmtx one isn't). But ... your problem was not related to the above. The next upload will also mention detailed mem usage in the log file. If you want to see how your document behaves you can say \enabletrackers[system.usage] at the top (is already there for a while). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] TeX capacity exceeded
On 5/17/2021 11:43 PM, Thomas A. Schmitz wrote: Hi all, I have a rather large (almost 120,000 lines) xml file, processing pulls in another large xml file. The project compiles under mkiv; with lmtx, I get tex error > tex error on line 8 in file : TeX capacity exceeded, sorry [reference count=32767] This is not the normal memory consumption that bothers you \enabletrackers[system.usage] will show you more detail. Normally the default context configuration will provide enough. In lmts memory is abit more dynamic so we start otu smaller and then stepwise grow. And one can configure even more (actually i just updated some configuration options for that). Anyway: this more smells like some nesting going wrong and therefore excessive token sharing \reallanguagetag just twenty pages shy of the end of the document. There is an error log with this content: return { ["errortype"]=3, ["filename"]="", ["lastcontext"]="\n\n\n \\reallanguagetag \n \n \\reallanguagetag #1->\\ifcsname \\??languagelinked #1\n \\endcsname \\lastnamedcs \\else #1\\fi \n \\setusedlanguage #1->\\edef \\currentusedlanguage {\\reallanguagetag {#1}\n }\\ifempty \\currentusedlanguage \\let \\currentusedlanguage \\currentlanguage \\always\\let \\usedlanguageparameter \\languageparameter \\orelse \\ifx \\currentusedlanguage \\v!global \\let \\currentusedlanguage\n\n \\typo_delimited_push ...\\currentdelimitedtext {#1}\\edef \\m_delimited_argument {#2}\\ifempty \\m_delimited_argument \\typo_delimited_set_language_nop \n \\else \\typo_delimited_set_language_yes \\fi \\let \\currentparentdelimitedtext \\currentdelimitedtext \\global \\advance \\c_typo...\n\n \\delimitedtext [#1]#*[#2]->\\dontleavehmode \\typo_delimited_push {#1}{#2}\n \\edef \\p_delimited_method {\\delimitedtextparameter \\c!method }\\ifx \\p_delimited_method \\v!font \\expandafter \\typo_delimited_fontdriven \\else \\expandafter \\typo_delimited_other \\fi \n\n \n {\n...\n\n \n ", ["lastluaerror"]="", ["lasttexerror"]="TeX capacity exceeded, sorry [reference count=32767]", ["lasttexhelp"]="If you really absolutely need more capacity, you can ask a wizard to enlarge me.", ["linenumber"]=8, ["offset"]=10, ["skiplinenumber"]=8, } In mkiv, these are the stats at the end of the run: mwe ... mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: /mnt/shared/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.009 seconds, 1 scans with scantime 0.005 seconds, 0 shared scans, 27 found files, scanned paths: /home/tas/texmf mkiv lua stats > stored bytecode data: 455 modules (0.122 sec), 96 tables (0.007 sec), 551 chunks (0.130 sec) mkiv lua stats > traced context: maxstack: 1422, freed: 2, unreachable: 1420 mkiv lua stats > cleaned up reserved nodes: 63 nodes, 9 lists of 442 mkiv lua stats > node memory usage: 17 attribute, 4 attribute_list, 1 glue, 51 glue_spec, 3 kern, 2 penalty, 2 temp, 2 user_defined mkiv lua stats > node list callback tasks: 8 unique task lists, 9336 instances (re)created, 177413 calls mkiv lua stats > h-node processing time: 4.800 seconds including kernel mkiv lua stats > attribute processing time: 0.617 seconds front- and backend mkiv lua stats > driver time: 0.886 seconds mkiv lua stats > used backend: pdf (backend for directly generating pdf output) mkiv lua stats > jobdata time: 0.161 seconds saving, 0.052 seconds loading mkiv lua stats > callbacks: internal: 261417, file: 319, direct: 3, late: 31831, function 200128, total: 493698 (464 per page) mkiv lua stats > randomizer: resumed with value 0.47143577262518 mkiv lua stats > positions: 9535 collected, 9535 regular, 0 special mkiv lua stats > v-node processing time: 0.401 seconds mkiv lua stats > result saved in file: plutarchusvitae.pdf, compresslevel 3, objectcompresslevel 1 mkiv lua stats > loaded patterns: de::3 en::1 la::65, load time: 0.000 mkiv lua stats > xml load time: 0.648 seconds, 4 files, 4 converted mkiv lua stats > lxml preparation time: 0.626 seconds, 233814 nodes, 578788 lpath calls, 578743 cached calls mkiv lua stats > interactive elements: 0 references, 37 destinations mkiv lua stats > margin data: 10798 entries, 0 pending mkiv lua stats > loaded fonts: 9 files: garamondpremrpro.otf, sabonltstd-bold.otf, sabonltstd-italic.otf, sabonltstd-roman.otf, kadmosu.otf, oldstandard-bold.otf, oldstandard-italic.otf, xitsmath-regular.otf, dejavusansmono.ttf mkiv lua stats > font engine: otf 3.113, afm 1.513, tfm 1.000, 17 instances, 6 shared in backend, 0 common vectors, 6 common hashes, load time 0.146 seconds mkiv lua stats > used platform: linux-64, type: unix, binary subtree: texmf-linux-64 mkiv lua stats > used engine: luatex version: 1.13, functionality level: 7420, banner: this is luatex, version 1.13.0 (tex live 2021) mkiv lua
Re: [NTG-context] TeX capacity exceeded - in Lua block - why?
Hello, On Thu, 16 Jul 2015 11:03:05 +0200, luigi scarso luigi.sca...@gmail.com wrote: \def\GG{\ifmmode G_G\else$\GG$\fi} means define the macro \GG as G_G if mmmod is true, else as \GG It's clear that you always are in a situation where mmod is true, then \GG is replaced with G_G Well, I intended replaced with $G_G$, not replaced with G_G; so I thought this would force/ensure math mode and thus prevent infinite recursion. but as soon as you fall into mmod not true then you have infinite recursion. Also, my observation was that my original macro worked well when called for TeX code (at various places of use: \GG $\GG$ \startitemize[][] \sym{\GG} \GG \sym{$\GG$} $\GG$ \sym{\m{\GG}} \m{\GG} \item End \stopitemize ) but stopped working when called from Lua (?!). @Hans: This seems to be best solution - exactly what I wanted to achieve: \def\GG{\mathematics{G_G}}. Thanks both for your help. Best ragrds, 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] TeX capacity exceeded - in Lua block - why?
On 7/16/2015 10:55 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, On Thu, 16 Jul 2015 10:27:48 +0200, Hans Hagen pra...@wxs.nl wrote: On 7/16/2015 10:20 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, why this code: \def\GG{\ifmmode G_G\else$\GG$\fi} because in math mode \GG expands \GG which expands \GG I want to just pass G_G in math mode, so it seems to me that \ifmmode G_G... does the check. The macro should write G + lower index G for both math and non-math scope. so \def\GG{\ifmmode G_G\else$G\low{G}$\fi} or \def\GG{\mathematics{G_G}} now you do a check in \GG and then call for \GG again so \GG again does a check etc etc ... you just enforce endless recursion And, in non math scope, the macro should just enclose itself by $...$ (or \m{...})... And, this works well in TeX code: \def\GG{\ifmmode G_G\else$\GG$\fi} \starttext \GG $\GG$ \startitemize[][] \sym{\GG} \GG \sym{$\GG$} $\GG$ \sym{\m{\GG}} \m{\GG} \item End \stopitemize \stoptext So how to rewrite the itemization into Lua? maybe you mean: \def\GG{\ifmmode G_G\else$GG$\fi} ... Could be \def\GG{\ifmmode G_G\else$G_G$\fi}, too, but why not \def\GG{\ifmmode G_G\else$\GG$\fi} (seems to me be simpler as the macro definition - which may be more complicated - appears only once)? Lukas \starttext \GG $\GG$ % OK \startitemize[][] \sym{\GG} \GG % OK \stopitemize \startluacode context.startitemize() context.sym([[\GG]]) context(Abc) context.stopitemize() \stopluacode \stoptext fails with: tex errortex error on line 14 in file d://Lukas/Docs/Ull-Gra/Test/Abr.mkiv: ! TeX capacity exceeded, sorry [input stack size=1] \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi l.14 \stopluacode I need to call \GG from within Lua, and the real macro name is created run-time (contrary to this MNWE; so to be \GG, \HH, \Fik etc. - the name is obtained from a Lua table as a string). I cannot understand why all TeX calls are OK but the problem appears in Lua block... Best regards, Lukas ___ 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 ___ -- - 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] TeX capacity exceeded - in Lua block - why?
On 7/16/2015 12:13 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, On Thu, 16 Jul 2015 11:03:05 +0200, luigi scarso luigi.sca...@gmail.com wrote: \def\GG{\ifmmode G_G\else$\GG$\fi} means define the macro \GG as G_G if mmmod is true, else as \GG It's clear that you always are in a situation where mmod is true, then \GG is replaced with G_G Well, I intended replaced with $G_G$, not replaced with G_G; so I thought this would force/ensure math mode and thus prevent infinite recursion. but as soon as you fall into mmod not true then you have infinite recursion. Also, my observation was that my original macro worked well when called for TeX code (at various places of use: \GG $\GG$ \startitemize[][] \sym{\GG} \GG \sym{$\GG$} $\GG$ \sym{\m{\GG}} \m{\GG} \item End \stopitemize ) but stopped working when called from Lua (?!). it all depends ... if you pass it in a way that it gets expanded you get already expansion at the write you could try \unexpanded\def\GG then it's hard to say what happens unless one sees the whole application (for which i have no time anyway) @Hans: This seems to be best solution - exactly what I wanted to achieve: \def\GG{\mathematics{G_G}}. Thanks both for your help. Best ragrds, Lukas -- - 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] TeX capacity exceeded - in Lua block - why?
On 7/16/2015 12:13 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: This seems to be best solution - exactly what I wanted to achieve: \def\GG{\mathematics{G_G}}. compare these two: \def\GG{\ifmmode G_G\else$\GG$\fi} \starttext \edef\x{\GG} \stoptext and \unexpanded\def\GG{\ifmmode G_G\else$\GG$\fi} \starttext \edef\x{\GG} \stoptext so it all depends on usage - 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] TeX capacity exceeded - in Lua block - why?
On Thu, Jul 16, 2015 at 10:55 AM, Procházka Lukáš Ing. - Pontex s. r. o. l...@pontex.cz wrote: Hello, On Thu, 16 Jul 2015 10:27:48 +0200, Hans Hagen pra...@wxs.nl wrote: On 7/16/2015 10:20 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, why this code: \def\GG{\ifmmode G_G\else$\GG$\fi} because in math mode \GG expands \GG which expands \GG I want to just pass G_G in math mode, so it seems to me that \ifmmode G_G... does the check. The macro should write G + lower index G for both math and non-math scope. And, in non math scope, the macro should just enclose itself by $...$ (or \m{...})... And, this works well in TeX code: \def\GG{\ifmmode G_G\else$\GG$\fi} \starttext \GG $\GG$ \startitemize[][] \sym{\GG} \GG \sym{$\GG$} $\GG$ \sym{\m{\GG}} \m{\GG} \item End \stopitemize \stoptext So how to rewrite the itemization into Lua? maybe you mean: \def\GG{\ifmmode G_G\else$GG$\fi} ... Could be \def\GG{\ifmmode G_G\else$G_G$\fi}, too, but why not \def\GG{\ifmmode G_G\else$\GG$\fi} (seems to me be simpler as the macro definition - which may be more complicated - appears only once)? \def\GG{\ifmmode G_G\else$\GG$\fi} means define the macro \GG as G_G if mmmod is true, else as \GG It's clear that you always are in a situation where mmod is true, then \GG is replaced with G_G but as soon as you fall into mmod not true then you have infinite recursion. -- luigi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] TeX capacity exceeded - in Lua block - why?
On 7/16/2015 10:20 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, why this code: \def\GG{\ifmmode G_G\else$\GG$\fi} because in math mode \GG expands \GG which expands \GG maybe you mean: \def\GG{\ifmmode G_G\else$GG$\fi} \starttext \GG $\GG$ % OK \startitemize[][] \sym{\GG} \GG % OK \stopitemize \startluacode context.startitemize() context.sym([[\GG]]) context(Abc) context.stopitemize() \stopluacode \stoptext fails with: tex errortex error on line 14 in file d://Lukas/Docs/Ull-Gra/Test/Abr.mkiv: ! TeX capacity exceeded, sorry [input stack size=1] \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi l.14 \stopluacode I need to call \GG from within Lua, and the real macro name is created run-time (contrary to this MNWE; so to be \GG, \HH, \Fik etc. - the name is obtained from a Lua table as a string). I cannot understand why all TeX calls are OK but the problem appears in Lua block... Best regards, Lukas ___ 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 ___ -- - 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] TeX capacity exceeded - in Lua block - why?
Hello, On Thu, 16 Jul 2015 10:27:48 +0200, Hans Hagen pra...@wxs.nl wrote: On 7/16/2015 10:20 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, why this code: \def\GG{\ifmmode G_G\else$\GG$\fi} because in math mode \GG expands \GG which expands \GG I want to just pass G_G in math mode, so it seems to me that \ifmmode G_G... does the check. The macro should write G + lower index G for both math and non-math scope. And, in non math scope, the macro should just enclose itself by $...$ (or \m{...})... And, this works well in TeX code: \def\GG{\ifmmode G_G\else$\GG$\fi} \starttext \GG $\GG$ \startitemize[][] \sym{\GG} \GG \sym{$\GG$} $\GG$ \sym{\m{\GG}} \m{\GG} \item End \stopitemize \stoptext So how to rewrite the itemization into Lua? maybe you mean: \def\GG{\ifmmode G_G\else$GG$\fi} ... Could be \def\GG{\ifmmode G_G\else$G_G$\fi}, too, but why not \def\GG{\ifmmode G_G\else$\GG$\fi} (seems to me be simpler as the macro definition - which may be more complicated - appears only once)? Lukas \starttext \GG $\GG$ % OK \startitemize[][] \sym{\GG} \GG % OK \stopitemize \startluacode context.startitemize() context.sym([[\GG]]) context(Abc) context.stopitemize() \stopluacode \stoptext fails with: tex errortex error on line 14 in file d://Lukas/Docs/Ull-Gra/Test/Abr.mkiv: ! TeX capacity exceeded, sorry [input stack size=1] \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi \GG -\ifmmode G_G\else $\GG $\fi l.14 \stopluacode I need to call \GG from within Lua, and the real macro name is created run-time (contrary to this MNWE; so to be \GG, \HH, \Fik etc. - the name is obtained from a Lua table as a string). I cannot understand why all TeX calls are OK but the problem appears in Lua block... Best regards, Lukas ___ 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 ___ -- 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] TeX capacity exceeded - in Lua block - why?
On Thu, Jul 16, 2015 at 12:13 PM, Procházka Lukáš Ing. - Pontex s. r. o. l...@pontex.cz wrote: Hello, On Thu, 16 Jul 2015 11:03:05 +0200, luigi scarso luigi.sca...@gmail.com wrote: \def\GG{\ifmmode G_G\else$\GG$\fi} means define the macro \GG as G_G if mmmod is true, else as \GG It's clear that you always are in a situation where mmod is true, then \GG is replaced with G_G Well, I intended replaced with $G_G$, not replaced with G_G; so I thought this would force/ensure math mode and thus prevent infinite recursion. but as soon as you fall into mmod not true then you have infinite recursion. Also, my observation was that my original macro worked well when called for TeX code (at various places of use: \GG $\GG$ \startitemize[][] \sym{\GG} \GG \sym{$\GG$} $\GG$ \sym{\m{\GG}} \m{\GG} \item End \stopitemize ) but stopped working when called from Lua (?!). \def\GG{\ifmmode G_G\else$\GG$\fi} define a macro \GG with replacement text \ifmmode G_G\else$\GG$\fi In your use in TeX, \if is expanded: if we are in mmode then we have the expansion of G ,then _ and then G. If we are not in mmode, then we have the expansion of $ , so we enter in mmode and then we have the expansion of \GG again. In this second level of expansion, we are in mmod for sure and so we end again with G, _ and G. We cannot know what happen in other situations. For example, in \edef\x{\GG} as shown by Hans, at definition time the replacement text is expanded until possible. If at definition time we are not in mmode, this gives the endless sequence \GG -\ifmmode G_G\else $\GG $\fi {\ifmmode: (level 1) entered on line 9} {false} {\else: \ifmmode (level 1) entered on line 9} \GG -\ifmmode G_G\else $\GG $\fi {\ifmmode: (level 2) entered on line 9} {false} {\else: \ifmmode (level 2) entered on line 9} \GG -\ifmmode G_G\else $\GG $\fi {\ifmmode: (level 3) entered on line 9} {false} {\else: \ifmmode (level 3) entered on line 9} \GG -\ifmmode G_G\else $\GG $\fi because in this case the first $ is just accumulated, not interpretated --- i.e. doesn't trig the change of state to math mode. To avoid expansion we can say \edef\x{\noexpand\GG} which means that the replacement text of \x is \GG . Perhaps we can see better here: \def\HH{\ifmmode H_H\else$H_H$\fi} \edef\x{\HH} means, if we are not in mmode when \x is defined, \HH -\ifmmode H_H\else $H_H$\fi {\ifmmode: (level 1) entered on line 10} {false} {\else: \ifmmode (level 1) entered on line 10} {\fi: \ifmmode (level 1) entered on line 10} {changing \x=undefined} {into \x=macro:-$H_H$} so the replacement text of \x is $H_H$ -- luigi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] TeX capacity exceeded, sorry (was: mkiv: 'extras' option in cite command = error)
On 07/22/2011 12:33 AM, Christian wrote: system tex error on line 1 in file example.mkiv: TeX capacity exceeded, sorry [ ... 1 \setupbibtex[database=example] 2 \setuppublications[alternative=apa,refcommand=data] 3 \starttext 4 Let's test adding specific page numbers in the cite 5 command\footnote{\cite[extras={, page 12}][Eijkhout1991]} \page 6 \placepublications[criterium=all] \stoptext 7 \@@pvdataright -, page 12 \@@pvdataright \docite ...secondargument \dowhatevercite {#1}{#2} \else \donumberedcite {#1}... Looks like a macro recursion bug: \@@pvdataright contains \@@pvdataright which contains \@@pvdataright ... bibl-tra.mkiv needs this patch: @@ -945,6 +945,10 @@ \ifx\LOextras\empty \setupcite[\@@currentalternative][#1]% \else + \expandafter\ifx\csname \??pv \@@currentalternative\c!right\endcsname\relax +% avoids tail recursion +\expandafter\let\csname \??pv \@@currentalternative\c!right\endcsname\empty + \fi \expandafter\ifx\csname LOright\endcsname \relax \edef\LOextras{{\LOextras\bibalternative\c!right}}% \else Best wishes, Taco ___ 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] TeX capacity exceeded, sorry (was: mkiv: 'extras' option in cite command = error)
system tex error on line 1 in file example.mkiv: TeX capacity exceeded, sorry [ ... 1 \setupbibtex[database=example] 2 \setuppublications[alternative=apa,refcommand=data] 3 \starttext 4 Let's test adding specific page numbers in the cite 5 command\footnote{\cite[extras={, page 12}][Eijkhout1991]} \page 6 \placepublications[criterium=all] \stoptext 7 \@@pvdataright -, page 12 \@@pvdataright \docite ...secondargument \dowhatevercite {#1}{#2} \else \donumberedcite {#1}... Looks like a macro recursion bug: \@@pvdataright contains \@@pvdataright which contains \@@pvdataright ... bibl-tra.mkiv needs this patch: @@ -945,6 +945,10 @@ \ifx\LOextras\empty \setupcite[\@@currentalternative][#1]% \else + \expandafter\ifx\csname \??pv \@@currentalternative\c!right\endcsname\relax +% avoids tail recursion +\expandafter\let\csname \??pv \@@currentalternative\c!right\endcsname\empty + \fi \expandafter\ifx\csname LOright\endcsname \relax \edef\LOextras{{\LOextras\bibalternative\c!right}}% \else How do I apply this patch? I changed (inserted the code above) saved C:\ConTeXt\tex\texmf-context\tex\context\base\bibl-tra.mkiv so that the lines 945–954 now look like this: 945 \ifx\LOextras\empty 946\setupcite[\@@currentalternative][#1]% 947 \else 948 \expandafter\ifx\csname \??pv 949 \@@currentalternative\c!right\endcsname\relax 950% avoids tail recursion 951 \expandafter\let\csname \??pv 952 \@@currentalternative\c!right\endcsname\empty 953 \fi 954 \expandafter\ifx\csname LOright\endcsname \relax But the error still persists. Thanks for looking into this. ___ 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] TeX capacity exceeded, sorry (was: mkiv: 'extras' option in cite command = error)
On 07/22/2011 12:22 PM, Christian wrote: How do I apply this patch? I changed (inserted the code above) saved C:\ConTeXt\tex\texmf-context\tex\context\base\bibl-tra.mkiv so that the lines 945–954 now look like this: Did you regenerate the format? Thomas ___ 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] TeX capacity exceeded, sorry (was: mkiv: 'extras' option in cite command = error)
How do I apply this patch? I changed (inserted the code above) saved C:\ConTeXt\tex\texmf-context\tex\context\base\bibl-tra.mkiv so that the lines 945–954 now look like this: Did you regenerate the format? I did run mtxrun --generate context --generate luatools --generate and compiled the document thereafter (context filename). I'm still getting the error. BTW: mtx-context | current version: 2011.07.19 11:22 ___ 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] TeX capacity exceeded, sorry (was: mkiv: 'extras' option in cite command = error)
Am 22.07.2011 um 15:03 schrieb Christian: How do I apply this patch? I changed (inserted the code above) saved C:\ConTeXt\tex\texmf-context\tex\context\base\bibl-tra.mkiv so that the lines 945–954 now look like this: Did you regenerate the format? I did run mtxrun --generate context --generate luatools --generate and compiled the document thereafter (context filename). I'm still getting the error. You need “context --make”. 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] TeX capacity exceeded, sorry (was: mkiv: 'extras' option in cite command = error)
How do I apply this patch? I changed (inserted the code above) saved C:\ConTeXt\tex\texmf-context\tex\context\base\bibl-tra.mkiv so that the lines 945–954 now look like this: Did you regenerate the format? I did run mtxrun --generate context --generate luatools --generate and compiled the document thereafter (context filename). I'm still getting the error. You need “context --make”. Ha! That's it. Somehow I associated regenerate with generate and not with make :-\ It works now, problem solved. Thank you for fixing this! ___ 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] TeX capacity exceeded
M.guravage wrote: Greetings, While updating my minimal ConTeXt instance from version 2008.01.28 to 2008.05.21, the pdftex formats failed to build with the error: ./texmf-linux/web2c/pdftex/cont-en.log:! TeX capacity exceeded, sorry [pattern memory=25]. Has anyone else experienced this, and can you suggest a correction? In texmf.cnf, I have: trie_size.context= 50 That should fix it. Best wishes, Taco ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] 'TeX capacity exceeded' problem
Jeong Dalyoung wrote: Dear all, Finally, luatools is working(gwTeX, Mac OSX 10.4). Following the instruction given by Thomas, I succeeded to run 'luatools --generate' but I got an error when I run 'luatools --ini --compile --verbose cont-en'. There is a memory problem for the languages. Following the suggestion, I add a line 'trie_size = 40' at the end of texmf.cnf in the folder /usr/local/gwTeX/texmf.cnf. After that 'luatools --ini --compile --verbose cont-en' is running without error and the format file is created in the folder /tmp/ luatex-cache/context/... I test it using a simple file like \starttext some texts \startlua a = 1.5 b = 1.8 c = a*b tex.print(c) \stoplua \stoptext and it was working nicely. problems like this will go away with the next release, since mkiv will load patterns at runtime (smaller format, faster loading of format, faster generation of format, neglectable load time of patterns at runtime) .. (/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-siz.tex) (/usr/ local/gwTeX/texmf.pkgs/tex/context/base/type-otf.tex) (/usr/local/ gwTeX/texmf.pkgs/tex/context/base/type-tmf.tex) (/usr/local/gwTeX/ texmf.pkgs/tex/context/base/type-siz.tex ! TeX capacity exceeded, sorry [parameter stack size=60]. strange ... looks like the config file is not read (generated by luatools) 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 - ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] TeX capacity exceeded with my macros
On 12/15/06, Hans Hagen [EMAIL PROTECTED] wrote: luigi scarso wrote: I have a TeX capacity exceeded message. I think I'm doing too much, but before to try another way I would know if I should enlarge context. This macro is called ~ 70 000 times \SetArtValue{1:330128:1007:336:1:d}{} PS No problem if none answer to this message. in texmf.cnf increase the hash size and remake the format Thanks to Andrea and Hans. I thinks this: 'TeX capacity exceeded' means 'Is your code good ?' Perhaps using some sort of preprocessing or \executesystemcommand should be a better solution (at cost of speed I believe). Or perhaps actual distros are made for single-user not-hungry and not for big-documents on-demand , so hash size is conservative, so increase the hash size and remake the format IS the solution. luigi ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded with my macros
Luigi, I'm totally ignorant but I know for sure there are some messages on the list on the topic (one thread started by me). Maybe it could be helpful to check the archives? Best -a- On 15 Dec 2006, at 16:55, luigi scarso wrote: I have a TeX capacity exceeded message. I think I'm doing too much, but before to try another way I would know if I should enlarge context. This macro is called ~ 70 000 times \SetArtValue{1:330128:1007:336:1:d}{} PS No problem if none answer to this message. --- - \def\SetArtValue#1#2{% \edef\Temp{#1} \beforesplitstring#1\at:\to\Lang\aftersplitstring#1\at:\to\Temp%% \beforesplitstring\Temp\at:\to\Code\aftersplitstring\Temp\at:\to\Temp%% \beforesplitstring\Temp\at:\to\RowLabelId\aftersplitstring\Temp\at: \to\Temp%% \beforesplitstring\Temp\at:\to\RowId\aftersplitstring\Temp\at: \to\Temp%% \doiffirstcharelse{9}{\Code}{}{%else \setgvalue{\Code:\RowId}{{\RowLabelId,#2}} \setxvalue{\Code}{\Code} [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED] [EMAIL PROTECTED],\to\ArticlesRowIdList} \setxvalue{Array:\the\Row: \the\SummaryTableCountArticles}{(r=\the\Row,c=\the\SummaryTableCountArt icles)}% } } \SetArtValue{1:330128:1007:336:1:d}{} ! TeX capacity exceeded, sorry [hash size=6]. \setgvalue ...andafter \gdef \csname #1\endcsname argument \setgvalue {\Code :\RowId } {{\RowLabelId ,}} \setxvalue {\Code }{... \secondoftwoarguments #1#2-#2 \SetArtValue ...\RowId ,\to \ArticlesRowIdList } } l.21796 \SetArtValue{1:330128:1007:336:1:d}{} %Doleplate\width - mm If you really absolutely need more capacity, you can ask a wizard to enlarge me. Here is how much of TeX's memory you used: 25279 strings out of 62456 270234 string characters out of 659612 4705997 words of memory out of 5746700 6 multiletter control sequences out of 1+5 46713 words of font info for 77 fonts, out of 50 for 2000 408 hyphenation exceptions out of 1000 47i,15n,56p,343b,556s stack positions out of 3000i,1500n,5000p,20b,15000s PDF statistics: 2 PDF objects out of 30 0 named destinations out of 131072 7 words of extra memory for PDF output out of 65536 ! == Fatal error occurred, the output PDF file is not finished! My texmf.cnf % ConTeXt is a memory hog... extra_mem_top.context = 200 extra_mem_bot.context = 400 main_memory.context = 150 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea [EMAIL PROTECTED] ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded with my macros
luigi scarso wrote: I have a TeX capacity exceeded message. I think I'm doing too much, but before to try another way I would know if I should enlarge context. This macro is called ~ 70 000 times \SetArtValue{1:330128:1007:336:1:d}{} PS No problem if none answer to this message. in texmf.cnf increase the hash size and remake the format 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded with metafun
andrea valle wrote: Console is extremely slow in processing the file including the that is an os issue (maybe choose another font for your console) i have no speed problems on the windows and linux boxes 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded with metafun
andrea valle wrote: Thanks Hans So: 1. If I understand, I have to edit context.cnf, right? no, texmf.cnf ; context.tmf is an example of what i use here; (you can try copying context.fmf to you texmf-local/web2c path) 2. It may work, but non necessarily. It is thus possible that I cannot solve definitively the problem. How do I choose a clever number to set? locate the texmf,cnf files used and just change the numbers; going from 2 meg to 4 meg is no problem, but in your case of adding a zero, going to 20 meg is more that tex can offer 3. Ehm... No, I haven't regenerated the format. How can I do it? texexec --make --all 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded with metafun
Thanks Hans, I made some tweaking with values (quasi-randomly...). Console is extremely slow in processing the file including the MPGraphic (I thought many times it hanged, then letting it run without looking I discovered some minutes after that it was still working). Looking at the the terminal (from TeXShop), it seemed that the process was not finished, so I killed it, but the pdf is complete. In any case now I have my drawing of 10,000 squares. Best and thanks a lot -a- PS: Here you have my algorithmic hommage à Boetti (http://www.artfacts.net/index.php/pageType/exhibitionInfo/exhibition/ 5797/lang/3): http://www.semiotiche.it/andrea/membrana/alternando.pdf On 13 Mar 2006, at 09:24, Hans Hagen wrote: andrea valle wrote: Thanks Hans So: 1. If I understand, I have to edit context.cnf, right? no, texmf.cnf ; context.tmf is an example of what i use here; (you can try copying context.fmf to you texmf-local/web2c path) 2. It may work, but non necessarily. It is thus possible that I cannot solve definitively the problem. How do I choose a clever number to set? locate the texmf,cnf files used and just change the numbers; going from 2 meg to 4 meg is no problem, but in your case of adding a zero, going to 20 meg is more that tex can offer 3. Ehm... No, I haven't regenerated the format. How can I do it? texexec --make --all 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea [EMAIL PROTECTED] ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded with metafun
Now, as far as I understand it seems that I have to edit texmf.cnf. In any case, I do not know in which way... Thanks! -a- On 12 Mar 2006, at 11:19, andrea valle wrote: Hi to all, I'm plotting 10,000 little squares thus exceeding TeX capacity. I was going to modify context.cnf (everything works with 5,000 squares). In particular, I'm on macosx 10.3 with Gerben's distro. I am editing this file: /usr/local/teTeX/share/texmf.local/web2c/context.cnf 1. is it correct? 2. Above all, I'am obtaining: ! TeX capacity exceeded, sorry [main memory size=800]. Here's the log: If you really absolutely need more capacity, you can ask a wizard to enlarge me. Here is how much of TeX's memory you used: 1108 strings out of 60272 18484 string characters out of 602115 801 words of memory out of 800 38234 multiletter control sequences out of 1+5 75018 words of font info for 37 fonts, out of 200 for 2000 192 hyphenation exceptions out of 5000 36i,2n,31p,223b,477s stack positions out of 5000i,500n,6000p,20b,4s PDF statistics: 0 PDF objects out of 30 0 named destinations out of 131072 1 words of extra memory for PDF output out of 1 No pages of output. But in context.cnf I have: main_memory.context = 200 main_memory.mpost= 300 main_memory.metafun = 300 Now, I added one 0 to all these params, thus decuplicating the values, but nothing changes. ? Many thanks as usual for any hints Best -a- Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea [EMAIL PROTECTED] ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea [EMAIL PROTECTED] ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded with metafun
andrea valle wrote: Now, as far as I understand it seems that I have to edit texmf.cnf. In any case, I do not know in which way... Thanks! -a- On 12 Mar 2006, at 11:19, andrea valle wrote: Hi to all, I'm plotting 10,000 little squares thus exceeding TeX capacity. I was going to modify context.cnf (everything works with 5,000 squares). In particular, I'm on macosx 10.3 with Gerben's distro. I am editing this file: /usr/local/teTeX/share/texmf.local/web2c/context.cnf 1. is it correct? 2. Above all, I'am obtaining: ! TeX capacity exceeded, sorry [main memory size=800]. Here's the log: If you really absolutely need more capacity, you can ask a wizard to enlarge me. Here is how much of TeX's memory you used: 1108 strings out of 60272 18484 string characters out of 602115 801 words of memory out of 800 38234 multiletter control sequences out of 1+5 75018 words of font info for 37 fonts, out of 200 for 2000 192 hyphenation exceptions out of 5000 36i,2n,31p,223b,477s stack positions out of 5000i,500n,6000p,20b,4s PDF statistics: 0 PDF objects out of 30 0 named destinations out of 131072 1 words of extra memory for PDF output out of 1 No pages of output. But in context.cnf I have: main_memory.context = 200 main_memory.mpost= 300 main_memory.metafun = 300 Now, I added one 0 to all these params, thus decuplicating the values, but nothing changes. did you regenerate the formats? (btw adding a 0 will not work, duplicating may) 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded with metafun
Thanks Hans So: 1. If I understand, I have to edit context.cnf, right? 2. It may work, but non necessarily. It is thus possible that I cannot solve definitively the problem. How do I choose a clever number to set? 3. Ehm... No, I haven't regenerated the format. How can I do it? Thanks Best -a- But in context.cnf I have: main_memory.context = 200 main_memory.mpost= 300 main_memory.metafun = 300 Now, I added one 0 to all these params, thus decuplicating the values, but nothing changes. did you regenerate the formats? (btw adding a 0 will not work, duplicating may) 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea [EMAIL PROTECTED] ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded with metafun
I edited the file doubling the 3 values But in context.cnf I have: main_memory.context = 200 main_memory.mpost= 300 main_memory.metafun = 300 did you regenerate the formats? Then I ran: texexec --make (right?) But nothing changed Best -a- ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded, sorry [PDF memory size
On Mon, 13 Jun 2005, Alan Bowen wrote: I had been processing a rather complicated set of pages successfully until late this morning. Now I get this (edited) error message: ! TeX capacity exceeded, sorry [PDF memory size (pdf_mem_size)=65536]. in file teTeX/share/texmf/web2c/texmf.cnf you can set it by, e. g.: pdf_mem_size = 50 the hardcoded upper limit seems to be 524288. Regards, Hartmut ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded, sorry [PDF memory size
Alan Bowen wrote: I had been processing a rather complicated set of pages successfully So, how may I increase pdf_mem_size and by how much should I do this? By editting texmf.cnf (enlarging or adding a pdf_mem_size setting) You can have a look at context.cnf for example settings: /usr/local/teTeX/share/texmf-local/web2c/context.cnf Your 'normal' texmf.cnf will probably be this one: /usr/local/teTeX/share/texmf/web2c/texmf.cnf the memory settings are near the end of those files. Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded, sorry [PDF memory size
Helmut and Taco Many thanks for the prompt solution to my pdf_mem_size problem. I added the line pdf_mem_size = 50 to texfm.cnf (after checking context.cnf) as instructed, and the file is now processing happily as it should. Very best, Alan On Jun 13, 2005, at 4:17 PM, Taco Hoekwater wrote: Alan Bowen wrote: I had been processing a rather complicated set of pages successfully So, how may I increase pdf_mem_size and by how much should I do this? By editting texmf.cnf (enlarging or adding a pdf_mem_size setting) You can have a look at context.cnf for example settings: /usr/local/teTeX/share/texmf-local/web2c/context.cnf Your 'normal' texmf.cnf will probably be this one: /usr/local/teTeX/share/texmf/web2c/texmf.cnf the memory settings are near the end of those files. Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded, sorry [save size=40000] error
Hi Samuel, On Thu, 2 Sep 2004 10:49:55 -0400, Samuel wrote: save_size= 15 % was 5 % for saving values It is not possible to make save_size larger than 4 in the current executables, no matter how hard you try (it is a compile-time limit in the web2c sources). -- groeten, Taco ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded, sorry [save size=40000] error
Samuel Pelletier wrote: Hi, I have a long (4333 lines) natural table document that refuse to compose. Initialy, I had an TeX capacity exceeded message for hash size but it seems that I figured how to bypass it by changing the texmf.cnf file. since this is a multiple page table, can't you split it up? what kind of table is it, maybe linetables are a better solution Now I have a ! TeX capacity exceeded, sorry [save size=4]. error and I have not figured out how to increase this parameter. The only place with a similar name is inside the texmf.cnf file but changing it does not : save_size= 15 % was 5 % for saving values outside current group I issue a texexec --make --all but the message is still there. isn't it save_size.context = ... 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 - ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded
Hi, May be it is a good idea to look into the version of TEX and Context you use. you can change the memory assignments in the texmf.cnf (web2c directory of the TDS). In a tree, which might be a yaer old I found the following entries for ConTeXt. The reason for this old cnf file is, that in the latest version of this file the entries are nomore so nicely ordered in a table ... buf_size.context = 20 % needed for omega bug extra_mem_bot.context= 400 extra_mem_top.context= 200 font_mem_size.context= 100 font_max.context =2000 hash_extra.context =5 main_memory.context = 150 max_strings.context = 10 nest_size.context= 500 obj_tab_size.context = 30 param_size.context = 5000 pool_free.context=47500 pool_size.context= 125 save_size.context=5 stack_size.context = 5000 string_vacancies.context =9 % Context's metafun main_memory.metafun = 250 pool_size.metafun= 100 Willi [EMAIL PROTECTED] wrote: After some time off...back in charge... I have got this line from texexec when trying to put a logo in: ! TeX capacity exceeded, sorry [hash size=35000]. can the hash size be changed? thanks !! - Jose Ignacio Marín Alberdi Bayes Inference, S.A. c/ Gran Vía, Nº39, 5º, E-28013 MADRID Tfn (91) 532.74.40, Fax (91) 532.26.36 - email: [EMAIL PROTECTED] - ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded, sorry [hash size=35000]
As I got no solutions to this problem, my conclusion is that it is not possible to enlarge the hash size parameter in MikTeX. For serious work with ConTeXt I should therefore drop MikTeX and take e.g. the TeXLive distribution. Is this a valid conclusion? Sytse At 12/5/2003 10:43, I wrote: Hi, When using Hans' adaptation for typesetting bold math in a small example everything went fine. But when using it in a somewhat larger text I ran into the error: ! TeX capacity exceeded, sorry [hash size=35000]. I remember a discussion a few months ago about this problem in MikTeX. Is there any solution in MikTeX available? Thanks, Sytse ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded, sorry [hash size=35000]
On Tue, 9 Dec 2003, Sytse Knypstra wrote: As I got no solutions to this problem, my conclusion is that it is not possible to enlarge the hash size parameter in MikTeX. Is this a valid conclusion? No. I've successfully done this once, but then I switched over to TeXLive for other reasons. Unfortunately I don't remember any more what I did, but this old message by Hans might help (he's talking about miktex.ini file in the message, that may not be clear): http://ml-archives.mini.pw.edu.pl/ntg-context/msg11458.html [In case I made a mess of copying the address, the message was sent by Hans Hagen on April 13, 2003, that should enable you to find it in the archives.] I know there's more useful information on the matter in the mailing list archives, but I cannot get any of the searches to work (neither in the above archives or gmane.org archives). Somebody, can this be fixed at some point??? Greetings from Finland, Mari ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded in MikTeX
At 11:00 29/09/2003 +0200, you wrote: Hi, ! TeX capacity exceeded, sorry [hash size=35000]. In MiKTeX the file is miktex.ini, not texmf.cnf; you should find a hash_size= entry there. There was no entry like this ;( But I created it (and also hash_size_def) in section MikTeX, pdfeTeX... I created new section Magic, too - and try changing other values, but nothing has effect with this size ;( I compared the simlest document in LaTeX with the simpliest document in ConTeXt - there was: - about 3000 multiletter control sequences out of 35000 in LaTeX - about 3 ! in ConTeXt Why MikTeX don't support ConTeXt?... Why... ;) i think that when you load a bunch of packages in latex and process a few docs, the number of control sequences will be larger that 3000 (not 30K) and demanding docs with lots of cross refs eat up hash space as well. Any tex today should be huge. Hans - Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED] Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com - information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf - ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded in MikTeX
The likely problem is an error on your part: a mismatched parenthesis or some other difficult to find mistake that occassionally doesn't warn you until you see a TeX capacity exceeded.. message. You might have to go through the usual process of starting with a piece of your document, compiling it. If it compiles, go forward, if it doesn't, go back. Repeat until the error is found. Walter ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TeX capacity exceeded in MikTeX
Find in the texmf.cnf file in texmf-var\web2c directory the section where the different memory settings are set: The following table was posted by Hans Hagen in february 2003, so it should be o.k. At least in my situation these settings do perform as expected. buf_size.context = 20 % needed for omega bug extra_mem_bot.context= 200 extra_mem_top.context= 200 font_max.context =2000 font_mem_size.context= 100 hash_extra.context = 5 main_memory.context = 150 max_strings.context = 10 nest_size.context= 500 obj_tab_size.context = 30 dest_names_size = 30 param_size.context =5000 pool_free.context= 47500 pool_size.context= 125 save_size.context= 5 stack_size.context =5000 string_vacancies.context = 9 main_memory.mpost= 200 pool_size.mpost = 20 Willi - Original Message - From: ^Nitram^ [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 28, 2003 10:56 AM Subject: [NTG-context] TeX capacity exceeded in MikTeX Hi, I have the same problem as was reported at 8.04.2003 - anybody resolved it ?... I have a document (about 80 pages) and error when I compile whole. Below I attach my log file - anybody have any good idea - I need this paper today ;((( log file: [cut] ! TeX capacity exceeded, sorry [hash size=35000]. If you really absolutely need more capacity, you can ask a wizard to enlarge me. Here is how much of TeX's memory you used: 6324 strings out of 67199 81075 string characters out of 744379 601426 words of memory out of 1165764 35000 multiletter control sequences out of 35000 41684 words of font info for 101 fonts, out of 50 for 1000 96 hyphenation exceptions out of 607 63i,21n,91p,1354b,3886s stack positions out of 1500i,500n,5000p,20b,32768s 973 PDF objects out of 65536 480 named destinations out of 2 9 words of extra memory for PDF output out of 65536 ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context