How do I remove the space before Depth... in my LaTex table?

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

Discussion Overview

The discussion revolves around a LaTeX formatting issue concerning unwanted space before the word "Depth..." in a table. Participants explore potential solutions and adjustments to the LaTeX code to resolve this formatting problem.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant inquires about removing the space before "Depth..." in their LaTeX table.
  • Another participant suggests removing the command \rule{0pt}{3ex} to eliminate the space.
  • A different participant notes that while this suggestion removes the space, it also eliminates a horizontal line that they find desirable.
  • A later reply indicates that the issue can be resolved by removing the carriage space after \rule{0pt}{3ex}, providing a corrected version of the code.

Areas of Agreement / Disagreement

Participants express differing views on the best approach to resolve the space issue, with no consensus reached on a single solution that satisfies all formatting preferences.

Contextual Notes

The discussion highlights the nuances of LaTeX formatting, including the impact of specific commands on table appearance and the subjective nature of formatting preferences.

Mapes
Science Advisor
Homework Helper
Gold Member
Messages
2,591
Reaction score
21
Hi folks,

Quick LaTex question: the following code produces a space before "Depth..." in the second row. How on Earth do I make it go away?

\begin{table}
\centering
\caption{Possible definitions of critical depth or thickness for traction-exerting cells on 2-D substrates.}
\vspace{0.05 in}
\begin{footnotesize}
\begin{raggedright}
\begin{tabular}{|p{4in} p{2in} |}
\hline \rule{0pt}{3ex}
& Effect of increasing \\
Definition & substrate stiffness \\[3pt]
\hline \rule{0pt}{3ex}
Depth at which a certain strain $\epsilon_{xx}$ exists [Krishnan et al] & Decrease $\left(\propto\!\sqrt{\frac{T}{\mu}}\right)$ \\[3pt]
Coating thickness that attenuates adhesion site displacement by a certain percentage (characterized by $U_1$)& Independent $\left(\propto a\right)$ \\[3pt]
Coating thickness that attenuates adhesion site distortion by a certain percentage (characterized by $U_2$)& Independent $\left(\propto a\right)$ \\[3pt]
Coating thickness that attenuates cell traction force microscopy measurements by a certain percentage & Independent $\left(\propto r\right)$\\[3pt]
Coating thickness that maintains a certain cell behavior & Increase\\[3pt]
\hline
\end{tabular}
\label{table:definitions}
\end{raggedright}
\end{footnotesize}
\end{table}

Thanks for your help.
 
Physics news on Phys.org
Just take out \rule{0pt}{3ex} before it.
 
No doubt, this removes the annoying space. But it also removes a most desirable horizontal line and the associated leading under it.
 
Ugh, I knew I would figure it out as soon as I posted. Simply removing the carriage space after \rule{0pt}{3ex} removes the problem. The corrected code is below. CRGreathouse, thanks for your suggestion.

\begin{table}
\centering
\caption{Possible definitions of critical depth or thickness for traction-exerting cells on 2-D substrates.}
\vspace{0.05 in}
\begin{footnotesize}
\begin{raggedright}
\begin{tabular}{|p{4in} p{2in} |}
\hline \rule{0pt}{3ex}
& Effect of increasing \\
Definition & substrate stiffness \\[3pt]
\hline \rule{0pt}{3ex}Depth at which a certain strain $\epsilon_{xx}$ exists [Krishnan et al] & Decrease $\left(\propto\!\sqrt{\frac{T}{\mu}}\right)$ \\[3pt]
Coating thickness that attenuates adhesion site displacement by a certain percentage (characterized by $U_1$)& Independent $\left(\propto a\right)$ \\[3pt]
Coating thickness that attenuates adhesion site distortion by a certain percentage (characterized by $U_2$)& Independent $\left(\propto a\right)$ \\[3pt]
Coating thickness that attenuates cell traction force microscopy measurements by a certain percentage & Independent $\left(\propto r\right)$\\[3pt]
Coating thickness that maintains a certain cell behavior & Increase\\[3pt]
\hline
\end{tabular}
\label{table:definitions}
\end{raggedright}
\end{footnotesize}
\end{table}
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
8K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 15 ·
Replies
15
Views
25K