LaTeX table woes: It won't grow vertically

  • Context: LaTeX 
  • Thread starter Thread starter balt
  • Start date Start date
  • Tags Tags
    Latex Table
Click For Summary

Discussion Overview

The discussion revolves around issues related to vertical growth of a LaTeX table, specifically focusing on text wrapping and column width management. Participants explore various formatting techniques and configurations to resolve the problem of table entries extending beyond the page width.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant describes a problem with a LaTeX table that does not grow vertically and extends off the page, despite using a similar construction method as other tables.
  • Another participant suggests that long entries may not be wrapping correctly and provides a link to documentation on text wrapping in tables.
  • A participant notes that forcing the last column to a narrower width helps but still results in the table running off the page, and they express frustration with the limitations of LaTeX.
  • Another participant recommends using \hline instead of \toprule and \bottomrule and suggests adjusting the paragraph width for better results.
  • A later reply reveals a workaround involving the use of minipages within table cells to manage long text, although the participant acknowledges that this solution is not aesthetically pleasing.

Areas of Agreement / Disagreement

Participants express various approaches to the problem, with no consensus on a single solution. Different formatting methods are proposed, and some participants share their experiences with limited success.

Contextual Notes

There are limitations regarding the respect of absolute widths in the tabular environment, and the effectiveness of different column formatting options remains unresolved.

balt
Messages
3
Reaction score
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
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
 
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!
 
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.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K