## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Vertically aligning column headings to accommodate a \cline

Information and discussion about graphics, figures & tables in LaTeX documents.
dcbob
Posts: 6
Joined: Mon Dec 21, 2009 4:19 pm

### Vertically aligning column headings to accommodate a \cline

I have what I think is a very simple question but I can't find a simple solution: in the following multi-row column headings for a longtable, I have two clines under the second row under columns 2-3 and columns 4-5, and I want to move the rest of the second row (that is, "Back & ME /\textipa{\bfseries a}/ & & & Voiced") down slightly so that there won't be an extra vertical space in column headings 6-11 (due to the space required for the clines under columns 2-5). I would appreciate any advice, and sorry I overlooked this covered elsewhere. Thanks!

\begin{landscape}\footnotesize\begin{longtable}{lcccccccccc}\caption[English Regions and Their Distinctive Features]{English Regions and Their Distinctive Features} \label{regionfeatures}\\  & \multicolumn{2}{c}{Inglides/} & & & & & & & & \\  & \multicolumn{2}{c}{Downglides} & \multicolumn{2}{c}{Upglides} & Back & ME /\textipa{\bfseries a}/ & & & Voiced & \\\cline{2-3}\cline{4-5}  & Front \Z & Back & Front & Back & Vowel & Length- & ME /\textipa{\bfseries a}/& & Frica- & \\Region & Vowels & Vowels & Vowels & Vowels & Fronting & ening & Raising & Rhotics & tives & Aspirates\\\hline

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Location: Colombia
Hi,

please post complete, compilable code and not just snippets (we are willing to help, but most of us don't want to waste time).
1,1,2,3,5,8,13,21,34,55,89,144,233,...

dcbob
Posts: 6
Joined: Mon Dec 21, 2009 4:19 pm
Apologies for the oversight. Below is complete, compilable code for the table, including all the \usepackage commands in the original file (which is a complete book). Again, I have two clines under the second row of a table under columns 2-3 and columns 4-5, and I want to move the rest of the second row (that is, "Back & ME /\textipa{\bfseries a}/ & & & Voiced") down slightly so that there won't be an extra vertical space in column headings 6-11 (due to the space required for the clines under columns 2-5). Thanks very much for your help.

\documentclass{article} \usepackage[margin=1in, paperwidth=17cm, paperheight=24cm]{geometry}\usepackage{layout}\usepackage[T1]{fontenc}\usepackage{textcomp}\usepackage{amsmath}\usepackage{amsfonts}\usepackage{amssymb}\usepackage{tipa}\usepackage{tipx}\usepackage{tabularx}\usepackage{graphicx}\usepackage{longtable, lscape}\usepackage{dcolumn}\usepackage{subfig}\usepackage{caption}\usepackage{everysel}\usepackage{keyval}\usepackage{ragged2e}\usepackage{enumerate} \begin{document} \newcommand\Z{\rule{0pt}{3ex}} \begin{landscape}\footnotesize\begin{longtable}{lcccccccccc}\caption[English Regions and Their Distinctive Features]{English Regions and Their Distinctive Features} \label{regionfeatures}\\  & \multicolumn{2}{c}{Inglides/} & & & & & & & & \\  & \multicolumn{2}{c}{Downglides} & \multicolumn{2}{c}{Upglides} & Back & ME /\textipa{\bfseries a}/ & & & Voiced & \\\cline{2-3}\cline{4-5}  & Front \Z & Back & Front & Back & Vowel & Length- & ME /\textipa{\bfseries a}/& & Frica- & \\Region & Vowels & Vowels & Vowels & Vowels & Fronting & ening & Raising & Rhotics & tives & Aspirates\\\hlineFar North \Z & U & O & - & - & - & - & - & [\textipa{\bfseries K}] & - & [\textipa{\bfseries h}], [\textipa{\bfseries wh}] \\Upper Northwest & U & U & - & - & - & - & - & - & - & [\textipa{\bfseries h}] (O) \\Cumbria-N. Yorkshire & U & U & O & - & - & - & - & - & - & - \\Lower Northwest & O & O & O & O & - & - & - & - & - & - \\Lincolnshire & U & U & - & - & - & - & - & - & - & - \\Staffordshire & - & - & U & O & [\textipa{\bfseries \"u:}] & - & - & - & - & - \\East Midlands & - & - & U & U & [\textipa{\bfseries \"u:}] & - & - & - & - & - \\West Midlands & O & - & O & - & - & - & O & [\textipa{\bfseries \*r}] $\sim$ [\textipa{\bfseries \:r}] & - & -\\Central South & O & O & O & O & - & U & - & [\textipa{\bfseries \*r}] & - & - \\North Anglia & - & - & U & U & - & U & U & - & - & [\textipa{\bfseries h}] \\Central Southeast & - & - & U & U & - & U & U & - & - & - \\Southeast Coast & - & - & U & U & - & U & U & [\textipa{\bfseries \*r}] & - & [\textipa{\bfseries h}] (O) \\Central Southwest & O & - & O & O & - & U & O & [\textipa{\bfseries \:r}] & U & [\textipa{\bfseries h}] (O) \\Devonshire & O & - & O & - & [\textipa{\bfseries Y:}] & U & - & [\textipa{\bfseries \:r}] & U & - \\Cornwall & O & - & O & - & - & U & O & [\textipa{\bfseries \:r}] & U & - \\\hline \end{longtable}Note: U - Usual pronunciation of at least one phoneme; O - Occasional pronunciation.\\\end{landscape} \end{document}

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Location: Colombia
Hi,

try something like this:

\documentclass{article}\usepackage[margin=1in, paperwidth=17cm, paperheight=24cm]{geometry}\usepackage{layout}\usepackage[T1]{fontenc}\usepackage{textcomp}\usepackage{amsmath}\usepackage{amsfonts}\usepackage{amssymb}\usepackage{tipa}\usepackage{tipx}\usepackage{tabularx}\usepackage{graphicx}\usepackage{longtable, lscape}\usepackage{dcolumn}\usepackage{subfig}\usepackage{caption}\usepackage{everysel}\usepackage{keyval}\usepackage{ragged2e}\usepackage{enumerate}\usepackage{multirow} \begin{document} \newcommand\Z{\rule{0pt}{3ex}} \begin{landscape}\footnotesize\begin{longtable}{lcccccccccc}\caption[English Regions and Their Distinctive Features]{English Regions and Their Distinctive Features} \label{regionfeatures}\\& \multicolumn{2}{c}{Inglides/} & & & & & & & & \\& \multicolumn{2}{c}{Downglides} & \multicolumn{2}{c}{Upglides} & \multirow{3}{*}{\parbox{1cm}{\vskip4pt\centering Back Vowel Fronting}} & \multirow{3}{*}{\parbox{1cm}{\vskip4pt\centering ME /\textipa{\bfseries a} Lengthening}}/ & & & \multirow{3}{*}{\parbox{1cm}{\vskip4pt\centering Voiced Fricatives}} & \\\cline{2-3}\cline{4-5}& Front \Z & Back & Front & Back &  & & ME /\textipa{\bfseries a}/& & & \\Region & Vowels & Vowels & Vowels & Vowels &  & & Raising & Rhotics & & Aspirates\\\hlineFar North \Z & U & O & - & - & - & - & - & [\textipa{\bfseries K}] & - & [\textipa{\bfseries h}], [\textipa{\bfseries wh}] \\Upper Northwest & U & U & - & - & - & - & - & - & - & [\textipa{\bfseries h}] (O) \\Cumbria-N. Yorkshire & U & U & O & - & - & - & - & - & - & - \\Lower Northwest & O & O & O & O & - & - & - & - & - & - \\Lincolnshire & U & U & - & - & - & - & - & - & - & - \\Staffordshire & - & - & U & O & [\textipa{\bfseries \"u:}] & - & - & - & - & - \\East Midlands & - & - & U & U & [\textipa{\bfseries \"u:}] & - & - & - & - & - \\West Midlands & O & - & O & - & - & - & O & [\textipa{\bfseries \*r}] $\sim$ [\textipa{\bfseries \:r}] & - & -\\Central South & O & O & O & O & - & U & - & [\textipa{\bfseries \*r}] & - & - \\North Anglia & - & - & U & U & - & U & U & - & - & [\textipa{\bfseries h}] \\Central Southeast & - & - & U & U & - & U & U & - & - & - \\Southeast Coast & - & - & U & U & - & U & U & [\textipa{\bfseries \*r}] & - & [\textipa{\bfseries h}] (O) \\Central Southwest & O & - & O & O & - & U & O & [\textipa{\bfseries \:r}] & U & [\textipa{\bfseries h}] (O) \\Devonshire & O & - & O & - & [\textipa{\bfseries Y:}] & U & - & [\textipa{\bfseries \:r}] & U & - \\Cornwall & O & - & O & - & - & U & O & [\textipa{\bfseries \:r}] & U & - \\\hline \end{longtable}Note: U - Usual pronunciation of at least one phoneme; O - Occasional pronunciation.\\\end{landscape} \end{document}

The idea was to use \multirow (from the multirow package) for the problematic columns to merge three cells; a final adjustment was required and I used \vskip.

Of course, change the width of the \parbox commands (I used 1cm) and the length used for the \vskip (I used 4pt).
1,1,2,3,5,8,13,21,34,55,89,144,233,...

dcbob
Posts: 6
Joined: Mon Dec 21, 2009 4:19 pm
That did the trick. I had not previously understood the use of either /multirow or /parbox, but this is a very useful illustration of both. As you suggested, I had to change the width of one the \parbox commands to 1.1cm) and the length of \vskip to 5pt, but now the table looks exactly as I intended. The thesis is now ready to submit - thanks very much for your help!