TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this as my current table which is fine, but I would like there to be vertical lines too just to make it look that bit neater. I'd also like horizontal lines between each row but this would require resizing the rows to avoid the fractions on the right column clashing with the line?

    \bfseries $f(t)$ & 
    \bfseries $\Lap[f(t)]$\\
    $k$ & $\frac ks$ \\ $e^{at}$ & $\frac{1}{s-a}$ \\ $\sin{(at)}$ & $\frac{a}{s^2+a^2}$ \\ $\cos{(at)}$ & $\frac{s}{s^2+a^2}$ \\ $t^n$ & $\frac{n!}{s^{n+1}}$ \\ $\sinh{(at)}$ & $\frac{a}{s^2-a^2}$ \\ $\cosh{(at)}$ & $\frac{s}{s^2-a^2}$ \\

share|improve this question
Do you mean somethin like \begin{tabular}{|c|c|}? – polyfunc Feb 5 '13 at 14:21
Vertical rules doesn't work well with booktabs, see the manual or tex.stackexchange.com/questions/88929/…. With \midrules you won't get any clashing, by the way. – Torbjørn T. Feb 5 '13 at 14:23
@ChristianR. This won't really work acceptably with booktabs. The booktabs documentation has some very good arguments about why for most tables, vertical lines are not appropriate. See e.g. Vertical lines are discontinuous with booktabs. – Alan Munn Feb 5 '13 at 14:24
There is no use loading booktabs if you want vertical lines, the package explicitly introduces constructs that are incompatible with vertical lines and documents that vertical lines are evil. So If you want vertical lines (which are not always evil:-) use the standard latex \hline for horizontal lines. – David Carlisle Feb 5 '13 at 14:34
@MarcvanDongen The presence of \toprule, \midrule entails booktabs use. (But I agree that Danny should turn this into a compilable example.) – Alan Munn Feb 5 '13 at 15:02
up vote 2 down vote accepted

When using a table containing only formulas it might be easier to use the array environment, which needs to be in math-mode (here displaymath). If you want to use verticle lines, you shouldn't use booktabs, simply use \hline instead.

The most of the following code is self-explanatory, but maybe not \renewcommand\arraystretch{1.5}, which is used to widen the rowheight, because otherwise the fractures will touch the lines.



\mathbf{f(t)} & \mathbf{\textbf{Lap}[f(t)]} \\ \hline \hline
k             & \frac ks           \\ \hline
e^{at}        & \frac{1}{s-a}      \\ \hline
\sin{(at)}    & \frac{a}{s^2+a^2}  \\ \hline
\cos{(at)}    & \frac{s}{s^2+a^2}  \\ \hline
t^n           & \frac{n!}{s^{n+1}} \\ \hline
\sinh{(at)}   & \frac{a}{s^2-a^2}  \\ \hline
\cosh{(at)}   & \frac{s}{s^2-a^2}  \\ \hline



share|improve this answer
This is very badly vertically positioned. It seems to me that \arraystretch isn't the right way to go here... – yo' Feb 5 '13 at 22:49

Your Answer


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.