3

I am trying to make the table wider, I already made an adjust box with text width but nothing happed .. anyone can help me please?

My code:

\begin{table}[htbp]
      \centering
      \caption{Three different Noise Levels}
        \begin{adjustbox}{max width=\textwidth}
        \begin{tabular}{ccc}
        \hline
        \textbf{V output}\textbf{} & &  \textbf{SNR Level} \\
        \hline
        From  & To    &  \\
        \hline
        -inf    & 0     & Low \\
        0     & 20    & Medium \\
        20    & inf    & High \\
        \hline
        \end{tabular}%
        \end{adjustbox}
      \label{tab:addlabel}%
    \end{table}%

The output: enter image description here

1
  • Why do you want to widen the table? There's no need for it. Rather, use \multicolumn{2}{c}{\textbf{V output}} in order for it to span both columns.
    – egreg
    Feb 18, 2015 at 9:13

1 Answer 1

4

You can use a tabularx spanning the whole \columnwidth instead of a tabular.

MWE

\documentclass[twocolumn]{article}

\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}

\begin{document}

\noindent x\hrulefill x

\begin{table}[htbp]
      \centering
      \caption{Three different Noise Levels}
        \begin{tabularx}{\columnwidth}{YcY}
        \hline
        \textbf{V output}\textbf{} & &  \textbf{SNR Level} \\
        \hline
        From  & To    &  \\
        \hline
        -inf    & 0     & Low \\
        0     & 20    & Medium \\
        20    & inf    & High \\
        \hline
        \end{tabularx}%
      \label{tab:addlabel}%
    \end{table}%

\end{document} 

enter image description here

2
  • it works perfect but the alignment of the columns is not in the middle ..could u plz help me to do so? Thanks a lot
    – SMH
    Feb 18, 2015 at 9:19
  • @SMH Probably you want \begin{tabularx}{\columnwidth}{YYY}? Feb 18, 2015 at 9:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .