Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!decwrl!ucbvax!ucdavis!iris!estes From: estes@iris.ucdavis.edu (Robert Estes) Newsgroups: comp.text.tex Subject: Vertical centering in tables - Summary Message-ID: <7592@ucdavis.ucdavis.edu> Date: 21 Aug 90 09:34:09 GMT Sender: usenet@ucdavis.ucdavis.edu Reply-To: estes@iris.ucdavis.edu (Robert Estes) Organization: U.C. Davis - Department of Electrical Engineering and Computer Science Lines: 57 There appeared to be enough interest, so I am posting a summary of the responses I obtained. Method #1 below, although a little long, seems to work the best. It works better than Method #2 because the tabular environment adds a little horizontal space on either side of the headings, therefore, using it in both columns gives more consistent spacing. Methods #3 and #4 need more vertical space at the top and bottom, which might be accomplished with struts, or something (I didn't try, sorry). Thanks to all for the help. Robert Method #1: from mitano@top.cis.syr.edu \documentstyle{article} \begin{document} \begin{tabular}{|c|c|} \hline \begin{tabular}{c} Column \\ \#1 \end{tabular} & \begin{tabular}{c} Column \#2 \end{tabular} \\ \hline 1985 & 43.2 \\ \hline 1992 & 51.6 \\ \hline \end{tabular} \end{document} Method #2: a minor modification \documentstyle{article} \begin{document} \begin{tabular}{|c|c|} \hline \begin{tabular}{c} Column \\ \#1 \end{tabular} & Column \#2 \\ \hline 1985 & 43.2 \\ \hline 1992 & 51.6 \\ \hline \end{tabular} \end{document} Method #3: from Edgar Holman and Fred Douglas \documentstyle{article} \begin{document} \begin{tabular}{|c|c|} \hline \parbox{4em}{\centering Column \\ \#1} & Column \#2 \\ \hline 1985 & 43.2 \\ \hline 1992 & 51.6 \\ \hline \end{tabular} \end{document} Method #4: from unify!uunet!microsoft!t-rayc@csusac.ecs.csus.edu \documentstyle{article} \begin{document} \begin{tabular}{|c|c|} \hline \hbox{$\vcenter{\halign{\hfil#\hfil\cr Column\cr\#1\cr}}$} & Column \#2 \\ \hline 1985 & 43.2 \\ \hline 1992 & 51.6 \\ \hline \end{tabular} \end{document}