What is the easiest way to have multi lines in some of the cells in a table?
hi,all my question as title described,Now I used the following method: \starttext \placetable[here][tab:multilinesinonecell]{Multi Lines in One Cell} \starttable[|c|c|c|][textwidth=8.8cm] \HL \NC \JustLeft FIRST COL \NC \JustCenter \bf SECOND COL \NC\SR\HL \NC \JustLeft first line \NC \JustLeft one line in cell \NC\MR \HL \NC \JustLeft second line \NC \JustLeft first line in second line's 2nd col \NC\MR \NC \NC \JustLeft second line in second line's 2nd col \NC\MR \HL \NC \JustLeft third line \NC \JustLeft third line's 2nd col \NC\LR \HL \stoptable \stoptext Thanks in advance! BEST REGARDS PengCZ
Am 23.01.2013 um 04:29 schrieb 土卜皿
hi,all my question as title described,Now I used the following method:
\starttext \placetable[here][tab:multilinesinonecell]{Multi Lines in One Cell} \starttable[|c|c|c|][textwidth=8.8cm] \HL \NC \JustLeft FIRST COL \NC \JustCenter \bf SECOND COL \NC\SR\HL \NC \JustLeft first line \NC \JustLeft one line in cell \NC\MR \HL \NC \JustLeft second line \NC \JustLeft first line in second line's 2nd col \NC\MR \NC \NC \JustLeft second line in second line's 2nd col \NC\MR \HL \NC \JustLeft third line \NC \JustLeft third line's 2nd col \NC\LR \HL \stoptable \stoptext
You need a “p” column to have paragraphs in a columns. You can also use natural tables which paragraphs aren’t a problem. \starttext \placetable[here][tab:multilinesinonecell]{Multi Lines in One Cell} {\starttable[|l|p(5cm)|][textwidth=8.8cm] \HL \NC \bf FIRST COL \NC \JustCenter \bf SECOND COL \NC\SR \HL \NC first line \NC one line in cell \NC\MR \HL \NC second line \NC first line in second line's 2nd col \par second line in second line's 2nd col \NC\MR \HL \NC third line \NC third line's 2nd col \NC\LR \HL \stoptable} \placetable[here][tab:multilinesinonecell]{Multi Lines in One Cell} {\setupTABLE[c][1][width=3.3cm] \setupTABLE[c][2][width=5.5cm] \bTABLE[frame=off,topframe=on,bottomframe=on] \bTR[align=middle] \bTH FIRST COL \eTH \bTH SECOND COL \eTH \eTR \bTR \bTD first line \eTD \bTD one line in cell \eTD \eTR \bTR \bTD second line \eTD \bTD first line in second line's 2nd col \par second line in second line's 2nd col \eTD \eTR \bTR \bTD third line \eTD \bTD third line's 2nd col \eTD \eTR \eTABLE} \stoptext Wolfgang
hi, Wolfgang
thanks!
BEST REGARD!
PengCZ
2013/1/23 Wolfgang Schuster
Am 23.01.2013 um 04:29 schrieb 土卜皿
: hi,all my question as title described,Now I used the following method:
\starttext \placetable[here][tab:multilinesinonecell]{Multi Lines in One Cell} \starttable[|c|c|c|][textwidth=8.8cm] \HL \NC \JustLeft FIRST COL \NC \JustCenter \bf SECOND COL \NC\SR\HL \NC \JustLeft first line \NC \JustLeft one line in cell \NC\MR \HL \NC \JustLeft second line \NC \JustLeft first line in second line's 2nd
col \NC\MR > \NC \NC \JustLeft second line in second line's 2nd col \NC\MR > \HL > \NC \JustLeft third line \NC \JustLeft third line's 2nd col \NC\LR > \HL > \stoptable > \stoptext
You need a “p” column to have paragraphs in a columns. You can also use natural tables which paragraphs aren’t a problem.
\starttext
\placetable[here][tab:multilinesinonecell]{Multi Lines in One Cell} {\starttable[|l|p(5cm)|][textwidth=8.8cm] \HL \NC \bf FIRST COL \NC \JustCenter \bf SECOND COL \NC\SR \HL \NC first line \NC one line in cell \NC\MR \HL \NC second line \NC first line in second line's 2nd col \par second line in second line's 2nd col \NC\MR \HL \NC third line \NC third line's 2nd col \NC\LR \HL \stoptable}
\placetable[here][tab:multilinesinonecell]{Multi Lines in One Cell} {\setupTABLE[c][1][width=3.3cm] \setupTABLE[c][2][width=5.5cm] \bTABLE[frame=off,topframe=on,bottomframe=on] \bTR[align=middle] \bTH FIRST COL \eTH \bTH SECOND COL \eTH \eTR \bTR \bTD first line \eTD \bTD one line in cell \eTD \eTR \bTR \bTD second line \eTD \bTD first line in second line's 2nd col \par second line in second line's 2nd col \eTD \eTR \bTR \bTD third line \eTD \bTD third line's 2nd col \eTD \eTR \eTABLE}
\stoptext
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 (2)
-
Wolfgang Schuster
-
土卜皿