0

I made a table in my thesis with this code:

\begin{table}[htbp]
  \centering
  \caption{Add caption}
    \begin{tabularx}{\hsize}{cc}
    \toprule
    & Folhosas \\
    \midrule
    Celulose & 5 \\
    Hemicelulose & 2 \\
    Extrac & 6 \\
    Lenhinha & 9 \\
    \bottomrule
    \end{tabularx}
  \label{tab:addlabel}
\end{table}

But, I want the text in the middle of table. Can you help me?

LaRiFaRi
  • 43,807
user46548
  • 737
  • 1
    Please always post complete documents (as in the answer supplied). – David Carlisle Apr 03 '14 at 10:45
  • Your question is not very clear. Please provide more information. If my answer is what you want, this question is a duplicate to http://tex.stackexchange.com/q/89166 and http://tex.stackexchange.com/q/91060 – LaRiFaRi Apr 03 '14 at 10:51

1 Answers1

2

enter image description here

\documentclass{article}    
\usepackage{tabularx,booktabs}

\begin{document}
\begin{table}[htbp]
  \centering
  \caption{Add caption}\label{tab:addlabel}
    \begin{tabularx}{\textwidth}{*{2}{>{\centering\arraybackslash}X}}
    \toprule
    & Folhosas \\
    \midrule
    Celulose & 5 \\
    Hemicelulose & 2 \\
    Extrac & 6 \\
    Lenhinha & 9 \\
    \bottomrule
    \end{tabularx}
\end{table}
\end{document}

Alternatively you may want to take a look on the package tabulary and its C column.

LaRiFaRi
  • 43,807