Re: [NTG-context] MP TeX capacity exceeded
On Sat, 01 Sep 2012 21:47:21 +0200, Mojca Miklavec mojca.miklavec.li...@gmail.com wrote: On Sat, Sep 1, 2012 at 6:28 PM, Procházka Lukáš wrote: Hello, suppose having the following sample code: \starttext \startluacode context.startMPcode() for i = 1, -- 1000 -- OK 1e6 do context(draw (0,0) -- (5cm,5cm);) end context.stopMPcode() \stopluacode \stoptext I'm getting TeX capacity exceeded error. Where is that Like button? ;) Mojca PS: Weird enough, the code works for me on 64-bit LuaTeX under Mac OS X (if I enter 100, I didn't try if 1e6 works already and I don't have enough physical memory to try with 10^7). It surely exhausts all the available memory (it goes beyond 1.5 GB), but it finishes the job without errors. It's probably a different problem at your end, but I nevertheless ask - do you have enough free memory (RAM)? OK, thanks for testing. Works well for me, too, on another computer with more RAM (3 GB, 32b; failed on 32b with 1 GB RAM). 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 ___
[NTG-context] Setting options for every n-th row in natural TABLEs
Hi, On Edward Tufte's website, there is a discussion on zebra coloring in tables[1]. One of the suggestion is to add a horizontal rule after every third line or shade three lines with one background color and the remaining three with another background color. Is there an easy way to do this with natural TABLEs? I can do something like: \setupTABLE[row][1,2,3][background=color, backgroundcolor=gray] \setupTABLE[row][7,8,9][background=color, backgroundcolor=gray] but it requires knowing the number of lines in advance. Aditya [1]: http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001IV ___ 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] Stretching width in natural TABLEs
Hi, Is it possible to stretch the widths of each column in natural TABLEs, so that the widths are in a certain propotion? For example, suppose I have a table with three columns and I want to set the width of the first column to a fixed amount, and split the remaining space between columns two and three in a 1:2 ratio. Extreme tables implement something similar using option={stretch, width}, but AFAIU, it is not possible to fix the width of a particular column. 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 ___
Re: [NTG-context] Setting options for every n-th row in natural TABLEs
Am 02.09.2012 um 17:59 schrieb Aditya Mahajan adit...@umich.edu: Hi, On Edward Tufte's website, there is a discussion on zebra coloring in tables[1]. One of the suggestion is to add a horizontal rule after every third line or shade three lines with one background color and the remaining three with another background color. Is there an easy way to do this with natural TABLEs? I can do something like: \setupTABLE[row][1,2,3][background=color, backgroundcolor=gray] \setupTABLE[row][7,8,9][background=color, backgroundcolor=gray] but it requires knowing the number of lines in advance. Aditya [1]: http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001IV Natural tables have “odd” and “even” keywords for \setupTABLE but none in the way you like it. What I would do is to use a overlay in combination with metapost to create the background but there is no global register to access the current column/row of a cell, e.g. \currenttablecolumn (this name is already used by tables) and \currenttablerow. 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] Setting options for every n-th row in natural TABLEs
Hello, Lua solution: On Sun, 02 Sep 2012 17:59:55 +0200, Aditya Mahajan adit...@umich.edu wrote: Hi, On Edward Tufte's website, there is a discussion on zebra coloring in tables[1]. One of the suggestion is to add a horizontal rule after every third line or shade three lines with one background color and the remaining three with another background color. Is there an easy way to do this with natural TABLEs? I can do something like: \setupTABLE[row][1,2,3][background=color, backgroundcolor=gray] \setupTABLE[row][7,8,9][background=color, backgroundcolor=gray] but it requires knowing the number of lines in advance. - it may be achieved by Lua, when the table has been defined as a Lua variable: \startluacode tab = { { a, b, }, { c, d, }, { e, f, }, { g, h, }, } \stopluacode \starttext \startluacode local rows1 = {} for i = 1, #tab, 3 do table.insert(rows1, i) end -- Define rules here - setup first set of rows context.setupTABLE({row}, rows1, {background = color, backgroundcolor = gray}) context.bTABLE() for i, r in ipairs(tab) do context.bTR() for j, d in ipairs(r) do context.bTD() context(d) context.eTD() end context.eTR() end context.eTABLE() \stopluacode \stoptext Best regards, Lukas Aditya [1]: http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001IV t-Table3.mkiv Description: Binary data t-Table3.pdf Description: Adobe PDF document ___ 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] Setting options for every n-th row in natural TABLEs
On Sun, 2 Sep 2012, Wolfgang Schuster wrote: Am 02.09.2012 um 17:59 schrieb Aditya Mahajan adit...@umich.edu: Hi, On Edward Tufte's website, there is a discussion on zebra coloring in tables[1]. One of the suggestion is to add a horizontal rule after every third line or shade three lines with one background color and the remaining three with another background color. Is there an easy way to do this with natural TABLEs? I can do something like: \setupTABLE[row][1,2,3][background=color, backgroundcolor=gray] \setupTABLE[row][7,8,9][background=color, backgroundcolor=gray] but it requires knowing the number of lines in advance. Aditya [1]: http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001IV Natural tables have “odd” and “even” keywords for \setupTABLE but none in the way you like it. Well, I can always change what odd and even means :) (I also realized that odd and even are just dummy values. I can change them to anything, and can in fact even turn \v!oddeven to a switch statement that returns multiple values) \unprotect \def\redefineoddeven% HACK {\def\v!oddeven##1% Return odd if in set 1-3, 7-9, etc. and even otherwise {\ctxcommand{doifelse(math.mod(##1-1,6) 3)}\v!odd\v!even}} \protect \startsetups zebra:three \redefineoddeven \setupTABLE[frame=off,background=color] \setupTABLE[row][odd][backgroundcolor=blue] \setupTABLE[row][even][backgroundcolor=red] \stopsetups \starttext \startTABLE[setups={zebra:three}] \NC A \NC B \NC C \NC \NR \NC A \NC B \NC C \NC \NR \NC A \NC B \NC C \NC \NR \NC A \NC B \NC C \NC \NR \NC A \NC B \NC C \NC \NR \NC A \NC B \NC C \NC \NR \NC A \NC B \NC C \NC \NR \NC A \NC B \NC C \NC \NR \NC A \NC B \NC C \NC \NR \NC A \NC B \NC C \NC \NR \NC A \NC B \NC C \NC \NR \stopTABLE \stoptext What I would do is to use a overlay in combination with metapost to create the background but there is no global register to access the current column/row of a cell, e.g. \currenttablecolumn (this name is already used by tables) and \currenttablerow. Thanks for the hint. It is relatively easy to access the local counter for a cell, and changing background colors dependon the current row works well. \defineconversion [triadcolors] [blue,blue,blue,red,red,red] \startsetups zebra:three \setupTABLE[frame=off,background=color] \setupTABLE[row][backgroundcolor={\convertnumber{triadcolors}{\getvalue{m_tabl_ntb_positive_row}}}] \stopsetups If I need rules, I guess I can explicitly check for the value of \m_tabl_ntb_postive_pow inside an overlay. Thanks, 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 ___
Re: [NTG-context] Setting options for every n-th row in natural TABLEs
On Sun, 2 Sep 2012, Procházka Lukáš wrote: On Sun, 02 Sep 2012 17:59:55 +0200, Aditya Mahajan adit...@umich.edu wrote: Hi, On Edward Tufte's website, there is a discussion on zebra coloring in tables[1]. One of the suggestion is to add a horizontal rule after every third line or shade three lines with one background color and the remaining three with another background color. Is there an easy way to do this with natural TABLEs? I can do something like: \setupTABLE[row][1,2,3][background=color, backgroundcolor=gray] \setupTABLE[row][7,8,9][background=color, backgroundcolor=gray] but it requires knowing the number of lines in advance. - it may be achieved by Lua, when the table has been defined as a Lua variable: Thanks. This is useful when reading data from a file. 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] \setupdelimitedtext not working in TeXLive 2012
This used to work to provide proper behavior for nested quotations. Now, it doesn't work and the log shows errors for all 3 of missing or ungrouped '=' after 'n' (371quotation:)where n=1,2,3 as they are encountered. \setupdelimitedtext [quotation] [1] [left={\symbol[leftquotation]}, right={\symbol[rightquotation]}] \setupdelimitedtext [quotation] [2] [left={\symbol[leftquote]}, right={\symbol[rightquote]}] \setupdelimitedtext [quotation] [3] [left={\symbol[leftquotation]}, right={\symbol[rightquotation]}] Did the syntax change or is it a bug? -- Bill Meahan Westland, Michigan USA ___ 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] About Chapter head definition and FunnyFrame
Dear all, I have two questions. 1. I defined \Myheader and use it to shape the chapter head as following: \def\Myheader#1#2{% \framedtext [width=\overlaywidth, height=9\bodyfontsize, background=color, backgroundcolor=lightgray, offset=2pt, strut=no, frame=off, align={middle, middle}] { {\tfb 제 #1 장} \blank[big] {\sans #2} }} \startsectionblockenvironment[bodypart] \setupheadertexts[][{\tfx COUNTING}] \setuppagenumber[number=1] \setuppagenumbering[alternative={singlesided,doublesided},location={footer,right}] \setuphead[chapter][command=\Myheader,before={\dontleavehmode\blank[2*big]},after={\blank[5*big]}, page=right] \stopsectionblockenvironment …. \chapter{The Addition Principle \crlf {\tfx Sum Rule}} …. But it produces an error which is … ! Argument of \Myheader has an extra }. systemtex error on line 94 in file SumRule.tex … What is wrong in this code? 2. I used funnyFrame defined in the MetaFun book. It works fine except that it is left aligned. I'd like to put such a frame in the middle. But \startalignment[middle] didn't work. Is there any way to make FunnyFrame center aligned? Thank you for the reading. Best regards, Dalyoung ___ 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] \setupdelimitedtext not working in TeXLive 2012
Am 03.09.2012 um 04:14 schrieb Bill Meahan subscribed_li...@meahan.net: This used to work to provide proper behavior for nested quotations. Now, it doesn't work and the log shows errors for all 3 of missing or ungrouped '=' after 'n' (371quotation:)where n=1,2,3 as they are encountered. \setupdelimitedtext [quotation] [1] [left={\symbol[leftquotation]}, right={\symbol[rightquotation]}] \setupdelimitedtext [quotation] [2] [left={\symbol[leftquote]}, right={\symbol[rightquote]}] \setupdelimitedtext [quotation] [3] [left={\symbol[leftquotation]}, right={\symbol[rightquotation]}] Did the syntax change or is it a bug? The syntax changed in MkIV, you need now \setupdelimitedtext[quotation:1][..,..=..,..] etc. 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] About Chapter head definition and FunnyFrame
Am 03.09.2012 um 05:34 schrieb Jeong Dalyoung hak...@me.com: Dear all, I have two questions. 1. I defined \Myheader and use it to shape the chapter head as following: \def\Myheader#1#2{% Use \define[2]\Myheader{…} with a recent beta or \unexpanded\def\Myheader#1#2{…} with a older beta. You can also search in the list archive for \defineheadalternative where Hans describes a new method to create your own header layout. 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] Setting options for every n-th row in natural TABLEs
Am 03.09.2012 um 02:39 schrieb Aditya Mahajan adit...@umich.edu: If I need rules, I guess I can explicitly check for the value of \m_tabl_ntb_postive_pow inside an overlay. This is a internal register and not meant for users, what we need is a real user level command to access the row and column counter from TeX or Lua. 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 ___
[NTG-context] Darwin x86_64 is not supported yet error.
Dear all, Today I tried to update ConTeXt using first setup and got an error message: Error: your system Darwin x86_64 is not supported yet. first setup worked well before I upgrade Mac OS to Mountain Lion from snow leopard two weeks ago. The current ConTeXt version and Luatex version in my Mac are ConTeXt ver: 2012.07.20 00:58 MKIV fmt: 2012.7.20 int: english/english system cont-new.mkiv loaded … mkiv lua stats latex banner - this is latex, version beta-0.70.2-2012052309 (tex live 2012) How to update the ConTeXt to latest beta? Thank you. Best regards, Dalyoung ___ 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 ___