Generalproblem with layout of tabular environment

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
dimarcom
Posts: 26
Joined: Wed Mar 05, 2008 11:03 am

problem with layout of tabular environment

Post by dimarcom »

Dear texers,

The lines sticking out of the table for the first 2 columns are quite ugly... can you help me removing them ? here's the code:

\documentclass{article}
\begin{document}

\begin{table}[h]
\centering
\begin{tabular}{|c|ccc|p{3cm}p{2.5cm}|} \\ \hline
1 & Rc1/4 & customer & machine & spindle coolant water OUT & water drain \\
2 & Rc1/4 & customer & machine & spindle coolant water IN & \\
\end{tabular}
\end{table}
\end{document}

thanks,
marie.
Attachments
lines of tabular sticking out !?
lines of tabular sticking out !?
table.JPG (8.98 KiB) Viewed 2475 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Re: problem with layout of tabular environment

Post by balf »

Replace the first line of your tabular environment with:
\begin{tabular}{|c|ccc|p{3cm}p{2.5cm}|} \hline

Now I have to say that the vertical lines shouldn't be used. See the doc of the booktabs package.

B.A.
Attachments
booktabs.pdf
(189.24 KiB) Downloaded 233 times
dimarcom
Posts: 26
Joined: Wed Mar 05, 2008 11:03 am

Re: problem with layout of tabular environment

Post by dimarcom »

Hi Balf,

Thanks for the tip about the vertical lines sticking out of my tables. It's been a while since you posted it, but better now than never !

I had a look at booktabs.pdf, it looks quite interesting ! I'll try to use it. Although "never using vertical lines" sounds exagerate, maybe in an ideal typesetting world you don't need vertical lines, but they do help sometimes.

thanks
marie
Post Reply