0

Hey I have a weird problem, I have the following table

\begin{table}[h]
  \centering
  \begin{tabular*}{\textwidth}{|l|l|l|l|l|l|}
    \hline
    \rowcolor{lightgray}
    \textbf{\gls{rlnc} Code} & \textbf{Finite Field} &  \textbf{Generation Size} & \textbf{Symbol Size} & \textbf{Data Size} & \textbf{Expected Result} \\ \hline
    Full Vector Code & $F^{8}$ & 1 & 8 & 100(Mb) & 300 Mb/S\\ \hline

  \end{tabular*}
  \caption{Hypothesised experiment results for throughput, in relation to \gls{rlnc} code, generation size, data size (Kb, Mb, Gb), and symbol size in bytes.}
  \label{tab:hyp-expect}
\end{table}

And when I compile my document it looks like this:

enter image description here

How can I make lines break? Because I thougt \textwidth would do that for me.

1

1 Answer 1

4

The l, c,r column types do not break lines. You have to use the p{width} (or m or b) for that, but you have to calculate the widths.

The simplest is to use tabularx, which calculates the widths of the columns for you. You may try this code:

\begin{table}[h]
  \centering
  \begin{tabularx}{\textwidth}{|*{6}{X|}}
    \hline
    \rowcolor{lightgray}
    \textbf{\gls{rlnc} Code} & \textbf{Finite Field} &  \textbf{Generation Size} & \textbf{Symbol Size} & \textbf{Data Size} & \textbf{Expected Result} \\ \hline
    Full Vector Code & $F^{8}$ & 1 & 8 & 100(Mb) & 300 Mb/S\\ \hline

  \end{tabularx}
  \caption{Hypothesised experiment results for throughput, in relation to \gls{rlnc} code, generation size, data size (Kb, Mb, Gb), and symbol size in bytes.}
  \label{tab:hyp-expect}
\end{table}
0

You must log in to answer this question.

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