[OS X TeX] Table Question

Alan Munn amunn at gmx.com
Sun Apr 24 13:40:56 EDT 2011


On Apr 24, 2011, at 1:12 PM, Jada Watson wrote:

> Thanks for the help so far everyone!
> 
> Berend: Thanks for noticing the "1" instead of lowercase "l" in the bolded line of the code. I am so embarrassed that I didn't notice that myself. I made the change it the Error message is gone!
> 
> Peter, the \up{} codes allow me to superscript text, like the "ère" in the French text of the table. I can't remember where I found them, but it was on a page dedicated to language in LaTeX. If I can find it again, I will forward the link.
> 
> 
> Anyone know how to get all of this text centered in the table cells??

Here's a (IMO) nicer version of your table.  I've done two things: removed the vertical lines and centred the text vertically in the cells. (I won't comment on the French typographical rules mentioned by André.)

\documentclass{article}
\usepackage[french]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{booktabs} % nicer looking tables (don't use vertical lines)
\usepackage{tabularx} % columns that expand to fill available space
\usepackage{array} % extra formatting possibilities tables
% The next command changes the definition of the tabularx column
% to one in which the column contents are centred vertically and 
% horizontally
\renewcommand\tabularxcolumn[1]{>{\centering\arraybackslash}m{#1}}

\begin{document}
    \begin{tabularx}{\linewidth}{cXXX}
    \toprule
    Mvts & Premier cycle & Deuxième cycle & Troisième cycle \\ 
    \midrule
    1 & Avant \textit{L'artisanat furieux} & & \\ 
    \midrule
    2 & & 1\up{er} commentaire sur les Bourreaux de solitude & \\ 
    \midrule
    3 & \textit{L’artisanat furieux} & & \\ \midrule
    4 &  & commentaire sur les \textit{Bourreaux de solitude} & \\ 
    \midrule
    5 & & & 1\up{ère} version de \textit{Bel édifice et les pressentiments} \\ 
    \midrule
    6 & & \textit{Bourreaux de solitude} & \\ 
    \midrule
    7 & Après \textit{L'artisanat furieux} & & \\ 
    \midrule
    8 & & 3\up{e} commentaire sur les \textit{Bourreaux de solitude} & \\ 
    \midrule
    9 & & & 2\up{e} version de \textit{Bel édifice et les pressentiments} \\
    \bottomrule
    \end{tabularx}
\end{document}




More information about the MacOSX-TeX mailing list