Changing the formatting of Natural Tables
![](https://secure.gravatar.com/avatar/50e7e6ec58e101311283a40e60c33572.jpg?s=120&d=mm&r=g)
Hello, I am using natural tables to make tables in my document. Can someone please tell me how I can prevent context from applying features I choose for an earlier table to a table that appears later in the document. Following is an example of two tables. Even though I choose \setupTABLE[frame=off] for the second table, there is a frame created based on what I define for an earlier table. I am using MKII (since I want to use Tikz). I would really appreciate any help. Example: \setuplayout[letter,height= 9in,width=5.5in,topspace=1in,header=1cm,backspace=1.5in] % Changing the location of the page numbers so that they appear in the footer. \setuppagenumbering[location=footer] \setupcolors[state=start] \setupcolor[xwi] \starttext %%%%%% First Table %%%%%% \setupTABLE[frame=off] \setupTABLE[column][3,4,5][align={middle,lohi},width=0.6in] \setupTABLE[column][2][align=lohi] \setupTABLE[row][3][align={lohi,middle}] \setupTABLE[3,4,5][3,4,5][background=color,backgroundcolor=ivory,framecolor=midnightblue,frame=on] % Using color names from xwi colorscheme \bTABLE \bTR \bTD \eTD \bTD \eTD \bTD[nc=3] {\bf Player 2} \eTD \eTR \bTR \bTD \eTD \bTD \eTD \bTD $ L $ \eTD \bTD $ M $ \eTD \bTD $ R $ \eTD \eTR \bTR \bTD[nr=3,width=1in] {\bf Player 1} \eTD \bTD $ U $ \eTD \bTD (8,8) \eTD \bTD (0,9) \eTD \bTD (0,0) \eTD \eTR \bTR \bTD $ C $ \eTD \bTD (9,0) \eTD \bTD (0,0) \eTD \bTD (3,1) \eTD \eTR \bTR \bTD $ D $ \eTD \bTD (0,0) \eTD \bTD (1,3) \eTD \bTD (3,3) \eTD \eTR \eTABLE %%%%%% Second Table %%%%%% Even though I repeat {\tt \\setupTABLE[frame=off]} command the table has frame. \setupTABLE[frame=off] \bTABLE \bTR \bTD \eTD \bTD \eTD \bTD[nc=2] Player 2 \eTD \bTD \eTD \eTR \bTR \bTD \eTD \bTD \eTD \bTD C \eTD \bTD D \eTD \eTR \bTR \bTD[nr=2] Player 1 \eTD \bTD C \eTD \bTD (2,2) \eTD \bTD (0,4) \eTD \eTR \bTR \bTD D \eTD \bTD (4,0) \eTD \bTD (1,1) \eTD \eTR \eTABLE \stoptext
![](https://secure.gravatar.com/avatar/6af06dcf5f958fe4ec149408292d6acd.jpg?s=120&d=mm&r=g)
Hi, If you place the setups outside the bTABLE - eTABLE then the setup is global. You can put the setups after the bTABLE and then they are local to the table. Willi On Nov 12, 2009, at 10:21 PM, Curiouslearn wrote:
Hello,
I am using natural tables to make tables in my document. Can someone please tell me how I can prevent context from applying features I choose for an earlier table to a table that appears later in the document. Following is an example of two tables. Even though I choose
\setupTABLE[frame=off]
for the second table, there is a frame created based on what I define for an earlier table. I am using MKII (since I want to use Tikz).
I would really appreciate any help.
Example:
\setuplayout[letter,height= 9in,width=5.5in,topspace=1in,header=1cm,backspace=1.5in]
% Changing the location of the page numbers so that they appear in the footer. \setuppagenumbering[location=footer]
\setupcolors[state=start] \setupcolor[xwi]
\starttext
%%%%%% First Table %%%%%% \setupTABLE[frame=off] \setupTABLE[column][3,4,5][align={middle,lohi},width=0.6in] \setupTABLE[column][2][align=lohi] \setupTABLE[row][3][align={lohi,middle}] \setupTABLE[3,4,5][3,4,5] [background=color,backgroundcolor=ivory,framecolor=midnightblue,frame= on] % Using color names from xwi colorscheme \bTABLE \bTR \bTD \eTD \bTD \eTD \bTD[nc=3] {\bf Player 2} \eTD \eTR \bTR \bTD \eTD \bTD \eTD \bTD $ L $ \eTD \bTD $ M $ \eTD \bTD $ R $ \eTD \eTR \bTR \bTD[nr=3,width=1in] {\bf Player 1} \eTD \bTD $ U $ \eTD \bTD (8,8) \eTD \bTD (0,9) \eTD \bTD (0,0) \eTD \eTR \bTR \bTD $ C $ \eTD \bTD (9,0) \eTD \bTD (0,0) \eTD \bTD (3,1) \eTD \eTR \bTR \bTD $ D $ \eTD \bTD (0,0) \eTD \bTD (1,3) \eTD \bTD (3,3) \eTD \eTR \eTABLE
%%%%%% Second Table %%%%%%
Even though I repeat {\tt \\setupTABLE[frame=off]} command the table has frame.
\setupTABLE[frame=off] \bTABLE \bTR \bTD \eTD \bTD \eTD \bTD[nc=2] Player 2 \eTD \bTD \eTD \eTR \bTR \bTD \eTD \bTD \eTD \bTD C \eTD \bTD D \eTD \eTR \bTR \bTD[nr=2] Player 1 \eTD \bTD C \eTD \bTD (2,2) \eTD \bTD (0,4) \eTD \eTR \bTR
\bTD D \eTD \bTD (4,0) \eTD \bTD (1,1) \eTD \eTR
\eTABLE
\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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ______________________________________________________________________ _____________
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 12.11.2009 um 22:31 schrieb Willi Egger:
Hi,
If you place the setups outside the bTABLE - eTABLE then the setup is global. You can put the setups after the bTABLE and then they are local to the table.
Be careful with this because a few setup can't be done after \bTABLE like - option=stretch - header=repeat - split=yes|repeat|auto Wolfgang
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 12.11.2009 um 22:21 schrieb Curiouslearn:
Hello,
I am using natural tables to make tables in my document. Can someone please tell me how I can prevent context from applying features I choose for an earlier table to a table that appears later in the document. Following is an example of two tables. Even though I choose
\setupTABLE[frame=off]
for the second table, there is a frame created based on what I define for an earlier table. I am using MKII (since I want to use Tikz).
I would really appreciate any help.
\start \setupTABLE[..,..=..,..] \bTABLE ... \eTABLE \stop
Example:
\setuplayout[letter,height=9in,width=5.5in,topspace=1in,header=1cm,backspace=1.5in]
^^^^^^^ you *can't* use keywords and assignments in the same setup, it's not part of context’s syntax Wolfgang
![](https://secure.gravatar.com/avatar/50e7e6ec58e101311283a40e60c33572.jpg?s=120&d=mm&r=g)
Thanks to both Willi and Wolfgang. I quickly tried Wolfgang's method and it worked great. Willi, even if, as you said, the setting is global when placed before \bTABLE. When I repeat the command \setupTABLE[frame=off] again before table 2, should that not be the new global setup and apply to things following it? Thanks again. On Thu, Nov 12, 2009 at 4:32 PM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote:
Am 12.11.2009 um 22:21 schrieb Curiouslearn:
Hello,
I am using natural tables to make tables in my document. Can someone please tell me how I can prevent context from applying features I choose for an earlier table to a table that appears later in the document. Following is an example of two tables. Even though I choose
\setupTABLE[frame=off]
for the second table, there is a frame created based on what I define for an earlier table. I am using MKII (since I want to use Tikz).
I would really appreciate any help.
\start
\setupTABLE[..,..=..,..]
\bTABLE ... \eTABLE
\stop
Example:
\setuplayout[letter,height=9in,width=5.5in,topspace=1in,header=1cm,backspace=1.5in]
^^^^^^^
you *can't* use keywords and assignments in the same setup, it's not part of context’s syntax
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
___________________________________________________________________________________
participants (3)
-
Curiouslearn
-
Willi Egger
-
Wolfgang Schuster