Re: [NTG-context] Possible memory leak?
Yue Wang wrote: also, mem consumption reported is a bit of a lie because lua seems to allocates double of what it needed with each increment but not always use it otf fonts are already quite packed in mkiv (i'm considering adding an option to mtx-font to precache fonts but i'm not sure if it's worth the trouble is mem consumption less a second run? Yes, dramatically less. with 4 chinese fonts loaded (I use zhfonts.tex for testing), MKIV consumes 300-400MB. on my machine running mk with a fresh cache gives the same lua mem usage as with filled cache, however a fresh run tops at 1 meg while a filled run tops ar 500 (windows vista); that document uses several cjk fonts (relatively large due to many glyphs) and script fonts (some arabic and zapfino as well as cambria math which are much larger fonts due to many features mkiv lua stats : loaded fonts - adobesongstd-light:otf arabtype:ttf c:/windows/fonts/cambria:ttc htfs:ttf htsong:ttf ko eieletters:afm lmex10:tfm lmmi10:tfm lmmib10:tfm lmmono10-regular:otf lmmonoltcond10-regular:otf lmroman10-italic:otf lmroman10-regu lar:otf lmroman12-regular:otf lmsans10-regular:otf lmsy10:tfm lmtypewriter10-regular:otf msam10:tfm msbm10:tfm palatinoltarabic-regu lar:ttf rm-lmbx10:tfm rm-lmr10:tfm rm-lmr12:tfm rm-lmr8:tfm rm-lmtt10:tfm scheherazaderegot:ttf texnansi-lt55484:afm texnansi-lt5548 5:afm texnansi-lt55488:afm texnansi-lt55507:afm zapfinoextraltpro:otf mkiv lua stats : current memory usage - 361 MB (ctx: 370 MB) (keep in mind that at some point luatex has to load the glyph shapes and pass them to the pdf file so there will always be otf/pfb loading at the end of a run) as taco mentioned, real memory usage for a fresh run is probably somewhat lower due to fragmentation - 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] Possible memory leak?
on my machine running mk with a fresh cache gives the same lua mem usage as with filled cache, however a fresh run tops at 1 meg while a filled run tops ar 500 (windows vista); that document uses several cjk fonts (relatively large due to many glyphs) and script fonts (some arabic and zapfino as well as cambria math which are much larger fonts due to many features mkiv lua stats : loaded fonts - adobesongstd-light:otf arabtype:ttf c:/windows/fonts/cambria:ttc htfs:ttf htsong:ttf ko eieletters:afm lmex10:tfm lmmi10:tfm lmmib10:tfm lmmono10-regular:otf lmmonoltcond10-regular:otf lmroman10-italic:otf lmroman10-regu lar:otf lmroman12-regular:otf lmsans10-regular:otf lmsy10:tfm lmtypewriter10-regular:otf msam10:tfm msbm10:tfm palatinoltarabic-regu lar:ttf rm-lmbx10:tfm rm-lmr10:tfm rm-lmr12:tfm rm-lmr8:tfm rm-lmtt10:tfm scheherazaderegot:ttf texnansi-lt55484:afm texnansi-lt5548 5:afm texnansi-lt55488:afm texnansi-lt55507:afm zapfinoextraltpro:otf depends on how you use them. \font\a=simsun at 10pt and \definetypeface blablabla [simsun] are different. mkiv lua stats : current memory usage - 361 MB (ctx: 370 MB) You cannot depend on the memory report by mtxrun. The actual memory usage is *much* larger than the reported value. Only the one reported by the system is believable. (keep in mind that at some point luatex has to load the glyph shapes and pass them to the pdf file so there will always be otf/pfb loading at the end of a run) as taco mentioned, real memory usage for a fresh run is probably somewhat lower due to fragmentation The memory usage without taking fragmentation into account has nothing to do with the user's experience. With 1G memory on my machine, and the best memory allocation implementation I can find (The FreeBSD operating system's memory allocation algorithm is very efficient. Firefox 3 also uses its implementation). In order to use ConTeXt with 4 chinese fonts, I should - First, quit Firefox, Gnome and X Window - Run sudo shutdown now and log into the single user mode - Run context foobar.tex, when finishing dumping the first Chinese font's font cache, press control + C, and run that again for the second font. And that's my experience. If I don't do that, the swap will be caching for several minutes, and finally the kernel stopped the luatex program since it uses too much memory. - 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 ___ ___ 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] unwanted rgb--gray conversion (mkiv)
Peter Rolf schrieb: Hi Hans, The attached example works fine with mkii (text and gfx both use RGB colors). Using mkiv reduces the colorspace of the graphic to GRAY. Sadly PDFX/-4 doesn't allow to mix color profiles of colorspace RGB with GRAY ones. So I'm forced to always use the RGB colorspace... Best wishes, 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ mh, the problem is a little more complex. Mkii reduces rgb(0,0,0) text into gray(0), in mkiv color is as expected. Updated the example... \setupcolors[state=start] % all colors are in RGB color space (and should stay there) \definecolor[rgbgray] [r=.5,g=.5,b=.5] \definecolor[rgbblack] [r=0,g=0,b=0] \definecolor[rgbwhite] [r=1,g=1,b=1] \startuniqueMPgraphic{foo}{size,color} fill unitsquare xyscaled(\MPvar{size},\MPvar{size}) withcolor \MPvar{color}; draw boundingbox currentpicture withcolor \MPcolor{rgbblack}; \stopuniqueMPgraphic \starttext \uniqueMPgraphic{foo}{size=2.5cm,color=rgbgray} % unwanted gray conversion (mkiv) \uniqueMPgraphic{foo}{size=2.5cm,color=rgbblack} % unwanted gray conversion (mkiv) \uniqueMPgraphic{foo}{size=2.5cm,color=rgbwhite} % unwanted gray conversion (mkiv) \color[rgbgray] Gray text. % ok \blank \color[rgbblack] Black text. % unwanted gray conversion (mkii) \blank \framed[background=color,backgroundcolor=rgbblack,foregroundcolor=rgbwhite] {White text} % unwanted gray conversion of background color (mkii) \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Third International ConTeXt meeting 2009
Hi all, I want to remind you of the Third International ConTeXT meeting that will be held in the Netherlands from August 31 to Sept 4, 2009. Please note that the dates have changed, the meeting will be held one week later than originally announced. There is no finalized programme yet, but we that there will be parallel LaTeX and ConTeXt sessions for the tutorials and macro- package specific talks, besides combined developer presentations. Separate rooms for informal discussions and workshops will be available throughout the week. Presentation proposals and topic requests are (of course) very welcome. The conference theme is Educational Uses of TeX, so anything on that topic is exceptionally welcome, but that does not prohibit other topics. Please feel free to contact me! The joint eurotex conference and context meeting is made possible by the Netherlands Defence Academy (NLDA) that graciously invited us to their facilities, including the on-site hotel. This makes it possible to have a very competitive conference fees. The entire five-day meeting including six overnight stays in a single room, all meals, the conference materials, and a full day day excursion with following conference dinner will cost only 425 euro (for LUG members). For quick deciders, the 100 euro early bird discount offer deadline has been extended a bit, that is valid for another two weeks from today (until Feb 15). See the website for (some) more information and registration: http://www.ntg.nl/EuroTeX2009 Hope to see you there, Taco Hoekwater (for the organizing committee) ___ 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] unwanted rgb--gray conversion (mkiv)
Am 02.02.2009 um 14:38 schrieb Peter Rolf: mh, the problem is a little more complex. Mkii reduces rgb(0,0,0) text into gray(0), in mkiv color is as expected. Updated the example... \setupcolors[state=start] AFAIR \setupcolors[state=start,conversion=no] 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Possible memory leak?
Yue Wang wrote: And that's my experience. If I don't do that, the swap will be caching for several minutes, and finally the kernel stopped the luatex program since it uses too much memory. Can you send me that input file and the fonts it needs (if they are not freely available)? 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 ___
[NTG-context] Page number not updating in layer
I am trying to use a layer to insert a page number in my document, but the page always displays page number 1. It seems nothing that I have tried has worked. I also don't know how to exclude the first page from the total number of pages count. Here is the code I'm trying to use. \setupoutput[dvipsone] \starttext \definelayer[pagenumber] \setuplayer [pagenumber] [width=\paperwidth, height=\paperheight, state=repeat] \setlayer[pagenumber][preset=lefttop,x=4in,y=5.5in]% {\framed[width=1.25in,align=middle,offset=none]{\tfx Page \getnumber[page]~of~\totalnumberofpages}} \setupbackgrounds [page] [background={pagenumber},state=start] test \page test \page test \stoptext Thanks, Mike ___ 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 ___