2

I want to create a table, like that:

enter image description here

But, I want more space in first column. How I could resolve this problem ?

My code is:

    \begin{table}[htbp]
  \centering
  \caption{Add caption}
  \begin{tabularx}{\textwidth}{*{5}{>{\centering\arraybackslash}X}}
  \toprule
          & Clay  & Talco & GCC   & PCC \\
    \midrule
    Formula &       &       &       &  \\
    Estrutura do cristal & vdfvd & fdgfd & fdgfd & dfgdg \\
    Densidade ($kg/dm^3$) & vdfvd & fdgfd & fdgfd & fdgfd \\
    Índice de Refracção & vdfvd & fdgfd & fdgfd & fdgfd \\
    Dureza (escala de Mohs) & vdfvd & fdgfd & fdgfd & fdgfd \\
    Brancura (\%) & vdfvd & fdgfd & fdgfd & fdgfd \\
    Distribuição de Tamanhos (\%) & vdfvd & fdgfd & fdgfd & fdgfd \\
    < 10 um & vdfvd & fdgfd & fdgfd & fdgfd \\
    <5 um & vdfvd & fdgfd & fdgfd & fdgfd \\
    <2    & vdfvd & fdgfd & fdgfd & fdgfd \\
    àrea de superficie & vdfvd & fdgfd & fdgfd & fdgfd \\
    Potencial Zeta & vdfvd & fdgfd & fdgfd & fdgfd \\
    Abrasão & vdfvd & fdgfd & fdgfd & fdgfd \\
  \bottomrule
  \end{tabularx}
  \label{tab:addlabel}%
\end{table}%
  • Why do you think you need tabularx? There's no reason for a table to be as wide as the line length and there are reasons not to. I'd go for a simple tabular with {lcccc}. – egreg May 8 '14 at 20:27
1

use only for the first column the type X:

\begin{tabularx}{\textwidth}{>{\Centering}X *4c}

I also used package ragged2e. It allows only to write \Centering.

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

\begin{document}

  \begin{tabularx}{\textwidth}{>{\Centering}X *4c}
  \toprule
          & Clay  & Talco & GCC   & PCC \\
    \midrule
    Formula &       &       &       &  \\
    Estrutura do cristal & vdfvd & fdgfd & fdgfd & dfgdg \\
    Densidade ($kg/dm^3$) & vdfvd & fdgfd & fdgfd & fdgfd \\
    Índice de Refracção & vdfvd & fdgfd & fdgfd & fdgfd \\
    Dureza (escala de Mohs) & vdfvd & fdgfd & fdgfd & fdgfd \\
    Brancura (\%) & vdfvd & fdgfd & fdgfd & fdgfd \\
    Distribuição de Tamanhos (\%) & vdfvd & fdgfd & fdgfd & fdgfd \\
    < 10 um & vdfvd & fdgfd & fdgfd & fdgfd \\
    <5 um & vdfvd & fdgfd & fdgfd & fdgfd \\
    <2    & vdfvd & fdgfd & fdgfd & fdgfd \\
    àrea de superficie & vdfvd & fdgfd & fdgfd & fdgfd \\
    Potencial Zeta & vdfvd & fdgfd & fdgfd & fdgfd \\
    Abrasão & vdfvd & fdgfd & fdgfd & fdgfd \\
  \bottomrule
  \end{tabularx}

\end{document}

To save some space you can also use:

  {\small\tabcolsep=3pt
  \begin{tabularx}{\textwidth}{@{} >{\Centering}X *4c @{}}
  ...
  \end{tabularx}%
  }
  • Can you explain me more details about ragged2e package ? – user46548 May 8 '14 at 15:00
  • this code don't work :s – user46548 May 8 '14 at 15:01
  • It allows hyphenation with \Centering, RaggedRight, and RagggedLeft. – user2478 May 8 '14 at 15:02
  • 1
    "this code don't work" is not a useful comment ... – user2478 May 8 '14 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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