LaTeX table woes: It won't grow vertically

In summary, the table will only grow to a certain height, and if you don't use the booktabs package, you need to use \hline instead of \toprule and \bottomrule.
  • #1
balt
3
0
Hi all,

I have an odd problem with a table that refuses to grow vertically, instead, it just wanders off over the righthand edge of the page with each row only one line in height. I have other tables constructed after the exact same method as this one, but they do grow vertically. Confused! Does anyone see what I'm doing wrong?

Code:
\begin{table}
\begin{tabularx}{0.75\textwidth}{lcl}
\toprule
\bf{Component} & \bf{Coefficient} & \bf{Comments} \\
\cmidrule(r){1-3}
RF amplifiers	& 0.04 dB/\textdegree K &  \\
Filters &	0.01 dB/\textdegree K & \\
Ditom	isolator	& 0.005 dB/\textdegree K & \\
Inmet attenuators	& 0.0003 dB/\textdegree K	& This is from theory and the resistor temperature coefficients. The housing and connectors may be somewhat higher than this but in the worst case still $\ll$ 0.001 dB/\textdegree K) \\
DC operational amplifiers & & With high stability resistors, high gain feedback and circuit topology used: $\ll$ than any of the above. \\
DataSet	& & No data is known, however, they were designed and made by xxx and were designed to be at least as stable as the above system. Further to this, the filter data is digitised at the interface to the dataset, it is hence safe to assume that the dataset itself will not have any detrimental effect on the data. It is further located outside the thermal envelope, so any thermal effect it might have will not propagate to the RF components. \\
\bottomrule
\end{tabularx}
\caption{The temperatures coefficients for all components used in the WVR design.}
\label{tab:tempcos}
\end{table}
 
Physics news on Phys.org
  • #3
Thanks for that, I'm a little bit closer!

Forcing the last column to a narrower width does indeed start to grow the table vertically, however, it'll only go to about 7 lines per cell, and it still runs off the end of the page.

there are some truly random thing happening:

Code:
\begin{tabular}{ l c p{3cm} }

Causes the aforementioned effect,

Code:
\begin{tabular}{ p{2cm} c p{3cm} }

Causes the first column to grow to almost half the page width!

Code:
\begin{tabular}{ p{2cm} p{2cm} p{3cm} }

Same, first column takes up almost the entire page (2cm is less than one inch).

Any further suggestions? I'm about to hard wrap those lines. That's a serious shortcoming in LaTeX...

Cheers

- Balt
 
  • #4
If you're not using the booktabs package, try just using \hline instead of \toprule and \bottomrule. When defining the column format, p{width} is for paragraph format--since the first two columns aren't blocks of text, I'd suggest leaving them as you had initially, with l and c:
Code:
\begin{tabular}{ l c p{[b]3cm[/b]} }

Except that I'd enlarge the paragraph width (bolded portion) so that you no longer run into the 7-line limitation (say, with 5+ cm).

Unfortunately, my experience isn't extensive with tables in LaTeX, so I'm just going off the previously-linked documentation, as well!
 
  • #5
I just found the solution: For whatever reason, the absolue widths were not respected in my tabular environment, so I simply made a mini page in each of the cells that had long text.

Code:
\begin{minipage}[t]{0.6\columnwidth}
With high stability resistors, high gain feedback and circuit topology used: $\ll$ than any of the above.
\end{minipage}
\\

It's not pretty, but it works.
 

Related to LaTeX table woes: It won't grow vertically

1. Why won't my LaTeX table grow vertically?

There could be several reasons why your table is not growing vertically. One common reason is that the table is constrained by the page size. You can try adjusting the page margins or using a smaller font size to fit more rows in the table.

2. How can I add more rows to my LaTeX table?

To add more rows to your table, you can use the \hline command to insert a horizontal line between rows. You can also use the \multirow command to create a cell that spans multiple rows.

3. Why are my table columns not evenly spaced?

If your table columns are not evenly spaced, it could be due to the use of fixed column widths. You can try using the \tabularx or \tabulary packages to create a flexible table that adjusts column widths automatically.

4. How can I make my table fit on one page?

If your table is too long to fit on one page, you can try using the \resizebox command to scale the table to fit the page. You can also try using the \longtable package to create a table that spans multiple pages.

5. What is the best way to format a complex table in LaTeX?

The best way to format a complex table in LaTeX is to use the \multicolumn and \multirow commands to create merged cells, the \cline command to create partial horizontal lines, and the booktabs package for professional-looking table lines. It is also important to use appropriate spacing and alignment to make the table easy to read.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
Back
Top