Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am working with a table with multi-rows and headers. The problem is when I run it, extra space is added both between rows and at the end of the last column.

\documentclass{article}         
\usepackage{geometry}                       
\geometry{a4paper}                              

\usepackage{array}
\usepackage{ragged2e}
\newcolumntype{P}[1]{>{\RaggedRight\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcommand{\head}[1]{\textsf{\textbf{#1}}}

\usepackage{tabulary}

\usepackage{booktabs}
\usepackage{multirow}               % Allows rows in tables to be combined.


\usepackage{tabulary}

\begin{document}
\begin{table*}
\caption{Summary of studies examining MENA or OPEC oil export revenues under climate policies}
    \begin{tabular}{@{}C{2.0cm}C{2.0cm}P{2.0cm}P{3.0cm}C{1.0cm}C{1.0cm}@{}}
\toprule
\ \head{Study} & \head{Time horizon} & \multicolumn{1}{c}{\head{Climate policies}} & \head{\centering {Uncertainties tested}} & \multicolumn{2}{c}{\head{Impact on oil export revenue}} \\
\midrule
\ \multirow{4}{2.0cm}{ABC} & \multirow{4}{2.0cm}{Results: 2025, 2050; Model: 2100} & \multirow{4}{2.0cm}{550 ppm \& 650 ppm GHG stabilization} & \multicolumn{3}{c}{\head{Middle East \& Turkey region versus the Baseline}} \\
\ & & & & 2025 & 2050 \\
\ & & & 550 ppm & -10\% & -20\% \\
\ & & & 650 ppm & -25\% & -35\% \\  
\midrule
\ \multirow{2}{2.0cm}{CEF} & \multirow{2}{2.0cm}{2030} & \multirow{2}{2.0cm}{Global carbon taxes} & \multicolumn{3}{c}{\head{OPEC wealth versus no carbon tax}} \\
\ & & & Carbon tax (\$50/TC -- \$2500/TC) & -3\% & -63\% \\

    \bottomrule
\end{tabular}
\end{table*}

\end{document}
share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

You don't need the \␣ commands (backslash + space) at the beginning of each line. If you remove them, your table displays as I think you intended.

This gets rid of the vertical space, but upon closer look at the table, I'm not actually very sure how you want the table to be structured. Is "Middle East ... Baseline" a header? Or the contents of a cell? Or perhaps the header in a sort of sub-table?

I also removed the duplicate \usepackage{tabulary} you had, and commented out the other call to tabulary, since it doesn't seem to have any impact on the output. I removed the \centering on the cell reading "Untested certainties" as well (since it doesn't change the output, and you can specify that that column should be centered in the table definition).

enter image description here

\documentclass{article}         
\usepackage{geometry}                       
\geometry{a4paper}                              

\usepackage{array}
\usepackage{ragged2e}
\newcolumntype{P}[1]{>{\RaggedRight\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcommand{\head}[1]{\textsf{\textbf{#1}}}

% \usepackage{tabulary}

\usepackage{booktabs}
\usepackage{multirow}               % Allows rows in tables to be combined.

\begin{document}
  \begin{table*}
  \caption{Summary of studies examining MENA or OPEC oil export revenues under climate policies}
    \begin{tabular}{@{}C{2.0cm}C{2.0cm}P{2.0cm}P{3.0cm}C{1.0cm}C{1.0cm}@{}}
    \toprule
    \head{Study} & \head{Time horizon} & \multicolumn{1}{c}{\head{Climate policies}} & \head{Uncertainties tested} & \multicolumn{2}{c}{\head{Impact on oil export revenue}} \\
    \midrule
    \multirow{4}{2.0cm}{ABC} & \multirow{4}{2.0cm}{Results: 2025, 2050; Model: 2100} & \multirow{4}{2.0cm}{550 ppm \& 650 ppm GHG stabilization} & \multicolumn{3}{c}{\head{Middle East \& Turke\newline region versus the Baseline}} \\
    & & & & 2025 & 2050 \\
    & & & 550 ppm & -10\% & -20\% \\
    & & & 650 ppm & -25\% & -35\% \\  
    \midrule
    \multirow{2}{2.0cm}{CEF} & \multirow{2}{2.0cm}{2030} & \multirow{2}{2.0cm}{Global carbon taxes} & \multicolumn{3}{c}{\head{OPEC wealth versus no carbon tax}} \\
    & & & Carbon tax (\$50/TC -- \$2500/TC) & -3\% & -63\% \\
    \bottomrule
    \end{tabular}
  \end{table*}

\end{document}
share|improve this answer
1  
Oj Thank you! Beginner's error! –  jjewell Mar 20 '13 at 14:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.