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
SUMMARY

The discussion centers on resolving issues with vertical growth in LaTeX tables, specifically when using the tabularx environment. The user faced challenges with long text entries not wrapping properly, causing the table to extend beyond the page width. Solutions provided include adjusting column widths, utilizing the minipage command for long text, and ensuring proper use of the booktabs package. Ultimately, the user found success by implementing minipage to manage long entries effectively.

PREREQUISITES
  • Familiarity with LaTeX table environments, particularly tabularx.
  • Understanding of text wrapping techniques in LaTeX.
  • Knowledge of the booktabs package for improved table formatting.
  • Basic experience with the minipage command for layout control.
NEXT STEPS
  • Research how to effectively use the minipage command in LaTeX for complex table layouts.
  • Learn about the booktabs package and its benefits for table aesthetics in LaTeX.
  • Explore advanced text wrapping techniques in LaTeX tables to handle lengthy entries.
  • Investigate the tabularx environment's options for dynamic column width adjustments.
USEFUL FOR

LaTeX users, academic writers, and researchers who need to create complex tables with proper formatting and text wrapping in their documents.

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
3K