|
|
|
| Hi,
I want to make a table with multicolumns.
The layout should be like this:
| A | B | C |
| 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 | 9 | 0 |
How can I do this
Thanx
Robin
| |
| Maurizio Loreti 2006-10-30, 7:43 pm |
| robin <abc@efn.be> writes:
> Hi,
>
> I want to make a table with multicolumns.
> The layout should be like this:
>
> | A | B | C |
> | 1 | 2 | 3 | 4 |
> | 5 | 6 | 7 | 8 | 9 | 0 |
>
> How can I do this
with the command multicolumn of your tabular environment.
refer to your documentation.
--
Maurizio Loreti http://www.pd.infn.it/~loreti/mlo.html
Dept. of Physics, Univ. of Padova, Italy ROT13: ybergv@cq.vasa.vg
| |
| Jean-Côme Charpentier 2006-10-30, 7:43 pm |
| Maurizio Loreti a écrit :
> robin <abc@efn.be> writes:
>
>
>
> with the command multicolumn of your tabular environment.
> refer to your documentation.
If I understund the ASCII-art, then I think that it's not the result the
OP want.
Something like that?
\documentclass{article}
\newcommand\vl{\hfil\hspace*{\tabcolsep}
\vrule\hspace*{\tabcolsep}\hfil}
\begin{document}
\begin{tabular}{|l|c|}
A & B \vl C \\
1 & 2 \vl 3 \vl 4 \\
5 & 6 \vl 7 \vl 8 \vl 9 \vl 0 \\
\end{tabular}
\end{document}
Jean-Côme Charpentier
| |
|
| Jean-Côme Charpentier schreef:
> Maurizio Loreti a écrit :
>
> If I understund the ASCII-art, then I think that it's not the result the
> OP want.
>
> Something like that?
>
> \documentclass{article}
>
> \newcommand\vl{\hfil\hspace*{\tabcolsep}
\vrule\hspace*{\tabcolsep}\hfil}
> \begin{document}
> \begin{tabular}{|l|c|}
> A & B \vl C \\
> 1 & 2 \vl 3 \vl 4 \\
> 5 & 6 \vl 7 \vl 8 \vl 9 \vl 0 \\
> \end{tabular}
> \end{document}
>
> Jean-Côme Charpentier
The thing is that all the cells should be a different width.
Robin
| |
| Jean-Côme Charpentier 2006-10-30, 7:44 pm |
| robin a écrit :
> Jean-Côme Charpentier schreef:
>
>
> The thing is that all the cells should be a different width.
Isn't it the case with my solution? Well... "*all* the cells" is
somewhere not very serious. I have the feeling that I don't understand
what you are looking for.
Jean-Côme Charpentier
| |
|
| Jean-Côme Charpentier schreef:
> robin a écrit :
>
> Isn't it the case with my solution? Well... "*all* the cells" is
> somewhere not very serious. I have the feeling that I don't understand
> what you are looking for.
>
> Jean-Côme Charpentier
What I'm looking for is something like this:
A(2cm) & B(1cm) & C(5cm)
1(2cm) & 2(2cm) & 3(2cm) & 4(2mc)
5(1.3cm)& 6(1.3cm) & 7(1.3cm) & 8(1.3cm) & 9(1.3cm) & 0(1.3cm)
Robin
| |
| Scott Pakin 2006-10-30, 7:44 pm |
| robin wrote:
> What I'm looking for is something like this:
>
> A(2cm) & B(1cm) & C(5cm)
> 1(2cm) & 2(2cm) & 3(2cm) & 4(2mc)
> 5(1.3cm)& 6(1.3cm) & 7(1.3cm) & 8(1.3cm) & 9(1.3cm) & 0(1.3cm)
You mean something like the following?
\documentclass{minimal}
\begin{document}
\newcommand*\dobox[2]{%
\makebox[#1]{\hfill#2\hfill\textbar}%
}
\fontsize{10pt}{10pt}\selectfont
\noindent
\textbar\dobox{2cm}{A}\dobox{1cm}{B}\dob
ox{1cm}{C} \\
\textbar\dobox{2cm}{1}\dobox{2cm}{2}\dob
ox{2cm}{3}\dobox{2cm}{4} \\
\textbar\dobox{1.3cm}{5}\dobox{1.3cm}{6}\dobox{1.3cm}{7}\dobox{1.3cm}{8}%
\dobox{1.3cm}{9}\dobox{1.3cm}{0}
\end{document}
-- Scott
|
|
|
|