diff options
author | Mojca Miklavec <mojca.miklavec@gmail.com> | 2012-05-14 17:38:55 +0000 |
---|---|---|
committer | Mojca Miklavec <mojca.miklavec@gmail.com> | 2012-05-14 17:38:55 +0000 |
commit | 15995e10bfc68edf79970c4ea4fbb6678566c46e (patch) | |
tree | 2de7ca2a83f2d37ef043ad7429a5cb945bb79ddb /Master/texmf-dist/tex/context/base/tabl-xnt.mkvi | |
parent | c9a39f716f1e5ec820ed3aab2c9aef25c5a9d730 (diff) |
ConTeXt 2012.05.14 16:00
git-svn-id: svn://tug.org/texlive/trunk@26371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/tabl-xnt.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/tabl-xnt.mkvi | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/tabl-xnt.mkvi b/Master/texmf-dist/tex/context/base/tabl-xnt.mkvi new file mode 100644 index 00000000000..35451abe0d5 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/tabl-xnt.mkvi @@ -0,0 +1,135 @@ +% macros=mkvi + +%D \module +%D [ file=tabl-xtb, +%D version=2011.10.28, +%D title=\CONTEXT\ Table Macros, +%D subtitle=Natural to Xtreme Tables, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Table Macros / Natural to Xtreme Tables} + +\unprotect + +%D Don't expect wonders but it might come in handy: +%D +%D \starttyping +%D \mapTABLEtoxtable +%D \restoreTABLEfromxtable +%D \stoptyping +%D +%D We stick to a simple example: +%D +%D \startbuffer +%D \bTABLE +%D \bTR +%D \bTD[width=1cm,background=color,backgroundcolor=red] one \eTD +%D \bTD[width=2cm] two \eTD +%D \eTR +%D \bTR +%D \bTD alpha \eTD +%D \bTD beta \eTD +%D \eTR +%D \eTABLE +%D \stopbuffer +%D +%D \typebuffer +%D +%D \startbuffer +%D \startlinecorrection +%D \getbuffer +%D \stoplinecorrection +%D +%D \startlinecorrection +%D \mapTABLEtoxtable \getbuffer +%D \stoplinecorrection +%D \stopbuffer +%D +%D \typebuffer \getbuffer + +\let\tabl_x_normal_bTABLEhead\bTABLEhead +\let\tabl_x_normal_eTABLEhead\eTABLEhead +\let\tabl_x_normal_bTABLEnext\bTABLEnext +\let\tabl_x_normal_eTABLEnext\eTABLEnext +\let\tabl_x_normal_bTABLEfoot\bTABLEfoot +\let\tabl_x_normal_eTABLEfoot\eTABLEfoot +\let\tabl_x_normal_bTABLEbody\bTABLEbody +\let\tabl_x_normal_eTABLEbody\eTABLEbody +\let\tabl_x_normal_bTR \bTR +\let\tabl_x_normal_eTR \eTR +\let\tabl_x_normal_bTD \bTD +\let\tabl_x_normal_eTD \eTD +\let\tabl_x_normal_bTH \bTH +\let\tabl_x_normal_eTH \eTH +\let\tabl_x_normal_setupTABLE\setupTABLE +\let\tabl_x_normal_bTABLE \bTABLE +\let\tabl_x_normal_eTABLE \eTABLE + +\unexpanded\def\restoreTABLEfromxtable + {\let\bTABLEhead\tabl_x_normal_bTABLEhead + \let\eTABLEhead\tabl_x_normal_eTABLEhead + \let\bTABLEnext\tabl_x_normal_bTABLEnext + \let\eTABLEnext\tabl_x_normal_eTABLEnext + \let\bTABLEfoot\tabl_x_normal_bTABLEfoot + \let\eTABLEfoot\tabl_x_normal_eTABLEfoot + \let\bTABLEbody\tabl_x_normal_bTABLEbody + \let\eTABLEbody\tabl_x_normal_eTABLEbody + \let\bTR \tabl_x_normal_bTR + \let\eTR \tabl_x_normal_eTR + \let\bTD \tabl_x_normal_bTD + \let\eTD \tabl_x_normal_eTD + \let\bTH \tabl_x_normal_bTH + \let\eTH \tabl_x_normal_eTH + \let\setupTABLE\tabl_x_normal_setupTABLE + \let\bTABLE \tabl_x_normal_bTABLE + \let\eTABLE \tabl_x_normal_eTABLE} + +\unexpanded\def\mapTABLEtoxtable + {\let\bTABLEhead\startxtablehead + \let\eTABLEhead\stopxtablehead + \let\bTABLEnext\startxtablefoot + \let\eTABLEnext\stopxtablefoot + \let\bTABLEfoot\startxtablefoot + \let\eTABLEfoot\stopxtablefoot + \let\bTABLEbody\startxtablebody + \let\eTABLEbody\stopxtablebody + \let\bTR \startxrow + \let\eTR \stopxrow + \let\bTD \startxcell + \let\eTD \stopxcell + \let\bTH \tabl_x_TABLE_TH_start_cell + \let\eTH \tabl_x_TABLE_TH_stop_cell + \let\setupTABLE\tabl_x_TABLE_setup + \let\bTABLE \tabl_x_TABLE_start + \let\eTABLE \tabl_x_TABLE_stop} + +\unexpanded\def\tabl_x_TABLE_setup{\dosingleempty\tabl_x_TABLE_setup_indeed} +\unexpanded\def\tabl_x_TABLE_start{\dosingleempty\tabl_x_TABLE_start_indeed} +\unexpanded\def\tabl_x_TABLE_stop {\stopxtable} + +\unexpanded\def\tabl_x_TABLE_TH_start_cell + {\startxcellgroup[\c!foregroundstyle=\v!bold]% + \startxcell} + +\unexpanded\def\tabl_x_TABLE_TH_stop_cell + {\stopxcell + \stopxcellgroup} + +\unexpanded\def\tabl_x_TABLE_setup_indeed[#settings]% + {\iffirstargument + \setupxtable[#settings]% + \fi} + +\unexpanded\def\tabl_x_TABLE_start_indeed[#settings]% + {\bgroup + \tabl_x_prepare{#settings}% + \edef\tabl_x_current_buffer{\x_table_default_buffer}% + \buff_pickup\tabl_x_current_buffer{bTABLE}{eTABLE}\relax\tabl_x_process} + +\protect \endinput |