[OS X TeX] Tables Question
Alan Munn
amunn at gmx.com
Sun Jul 10 01:31:20 CEST 2011
Hi Jada, you can merge cells using \multicolumn{<number of cols>}{<column format>}{stuff}
Here's two versions of your table. One uses the booktabs package and gets rid of all the vertical lines and most of the horizontal ones. This may not be completely appropriate in this case, but it is generally the preferred way to make tables.
The second way is just a plain tabular, but this should give you enough to go on.
If you are using TeXShop, you can make the basics of the table in Excel and then use the Paste Spreadsheet Cells macro in TeXShop to paste them in table format.
\documentclass{article}
\usepackage{booktabs}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
\begin{tabular}{ccccccc}
\toprule
Section & refrain & couplet & refrain & couplet & refrain & coda \\
\midrule
Musique & A & B & A & C & A’ \\
& ||: a :||: b a :|| & & a b a & & a & Adagio a’ \\
\midrule
Tonalité & Mi $\flat$ & La $\flat$ Fa & \multicolumn{4}{c}{Mi $\flat$} \\
Mesures & 1 9 28 & 36 49 & \multicolumn{4}{c}{72 80 100 107 141 148 153} \\
\bottomrule
\end{tabular}
\bigskip
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
Section & refrain & couplet & refrain & couplet & refrain & coda \\
\hline
Musique & A & B & A & C & A’ & \\
& ||: a :||: b a :|| & & a b a & & a & Adagio a’ \\
\hline
Tonalité & Mi $\flat$ & La $\flat$ Fa & \multicolumn{4}{|c|}{Mi $\flat$} \\
Mesures & 1 9 28 & 36 49 & \multicolumn{4}{|c|}{72 80 100 107 141 148 153} \\
\hline
\end{tabular}
On Jul 9, 2011, at 6:27 PM, Jada Watson wrote:
> Hi all,
>
> I am looking for some advice on tables: I have to format a table where elements within each cell seem to be located in a specific place. I am having a terrible time aligning the elements in the right spot. It's kind of hard to explain, so I have attached the document to this email.
>
>
> Does anyone have advice on how to make a table that will look like this? Should I be looking into splitting a row into multiple cells? Or is there a way to space things within a cell that I am not aware of. In general, I don't have problems with Tables anymore, but this one is a trick case.
>
> Thanks,
>
> Jada
> <NAWM 111- Haydn - quatuor a cordes en mib majeur.doc>----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>
--
Alan Munn
amunn at gmx.com
More information about the macostex-archives
mailing list