Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Good day to all,

This look not beautiful for me, I want the text is centred in the box, especially $\frac{1}{s^n}$. Your help is much appreciated.

\documentclass{report}

\usepackage{amsmath} 

\begin{document}
\begin{table}[H]\centering\label{laplaceintegral}
\begin{tabular}{|c|c|c|}
\hline 
Item & $\text{Functions ($t$ domain)}$ & $\text{Laplace Transforms ($s$ domain)}$\\
\hline\hline
1&$\int_0^t x(\tau)d\tau$ & $\displaystyle\frac{1}{s}\cdot X(s)$\\ \hline
2&$\underbrace{\int_0^{t}\ldots\int_0^{t_3}\int_0^{t_2}}_{n\text{times}} %
    x\left(\tau_1\right)d\tau_1dt d\tau_2\ldots d\tau_n$ %
    & $\displaystyle \frac{1}{s^n}\cdot X(s)$ \\ \hline
\end{tabular}
\caption{Laplace transform of integral}
\end{table}

\end{document}

thank you in advance.

share|improve this question

1 Answer 1

I would suggest removing the horizontal rules separating the row entries, as well as all the vertical rules - the tabular alignment already encourages a columnar context naturally. Read more about this in the booktabs documentation.

Following booktabs' suggestion, the spaces things out a little:

enter image description here

\documentclass{report}
\usepackage{float}% http://ctan.org/pkg/float
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\newcommand{\dt}{\mathrm{d}t}
\begin{document}

\begin{table}%[H]
  \centering
  \begin{tabular}{ccc}
    \toprule
    Item & $\text{Functions ($t$~domain)}$ & $\text{Laplace Transforms ($s$~domain)}$ \\
    \midrule
    1 & $\int_0^t x(\tau)d\tau$ & $\displaystyle\frac{1}{s}\cdot X(s)$ \\
    2 & $\underbrace{\int_0^{t}\ldots\int_0^{t_3}\int_0^{t_2}}_{n~\text{times}} 
      x\left(\tau_1\right)d\tau_1\dt d\tau_2\ldots d\tau_n
      \vphantom{\overbrace{\int_0^{t}\ldots\int_0^{t_3}\int_0^{t_2}}^{n~\text{times}}}$ & 
      $\displaystyle \frac{1}{s^n}\cdot X(s)$ \\
    \bottomrule
  \end{tabular}
  \caption{Laplace transform of integral}
\end{table}

\end{document}

I've added a \vphantom in cell (2,2) that adds some vertical space equivalent to the drop initiated by "n times". Using \\[<len>] (where <len> is some length) would also have worked.

Finally, you need to place the \label after \caption, always. See Why does an environment's label have to appear after the caption?

share|improve this answer
    
Thank you Werner, as I looked back to my university thesis guidelines, the table must have 'boxes'. But this is really look nice. Thank you so much again. –  azlanaznam Jul 21 '12 at 6:18
    
@azlanaznam: See if some of the suggestions in Column padding in tables helps. It's a general answer to adding space horizontally/vertically in tables. Gives some feedback once you've experimented and I could update my answer here. –  Werner Jul 21 '12 at 13:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.