ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: What is the easiest way to have multi lines in some of the cells in a table?
Date: Wed, 23 Jan 2013 08:36:17 +0100	[thread overview]
Message-ID: <A3F0B98F-CD55-4858-9FA1-53D6D936FBBE@gmail.com> (raw)
In-Reply-To: <CADT5_19iR9M8hr2Sd-Q-JckxVb4+wzk-C-HAuy-+VNXc+=a6fw@mail.gmail.com>


Am 23.01.2013 um 04:29 schrieb 土卜皿 <pengcz.nwpu@gmail.com>:

> 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
___________________________________________________________________________________

  reply	other threads:[~2013-01-23  7:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23  3:29 土卜皿
2013-01-23  7:36 ` Wolfgang Schuster [this message]
2013-01-23  8:26   ` 土卜皿

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A3F0B98F-CD55-4858-9FA1-53D6D936FBBE@gmail.com \
    --to=wolfgang.schuster@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).