Graphics, Figures & TablesProblem with my tables!

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

Problem with my tables!

Post by lukaszskowron96 »

Hi. So I created a bunch of tables for my document, but when I zoom in I can see that line don't really touch each other perfectly. Is there any way to get rid of this? I mean to make a table as one full line all-around? It is really annoying me and I hope there is a way to fix it with some kind of package.
A zoomed-in table.
A zoomed-in table.
latexforumtables.png (8.95 KiB) Viewed 2594 times

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Problem with my tables!

Post by Johannes_B »

How are you generating the table? What is the code for it?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

Problem with my tables!

Post by lukaszskowron96 »

Code: Select all

\begin{table}[!ht]
\begin{center}
\begin{tabular}{ | c | c | c |}
\hline
\multirow{2}{*}{Parameter} & \multirow{2}{*}{Undrained Conditions} & \multirow{2}{*}{Drained Conditions} \\ 
 & & \\ \hline
Friction angle - \( \phi \) & \( \phi = \phi_{u} = 0 \) & \( \phi = \phi' > 0 \) \\ \hline
Cohesion - \(c\) & \( c = s_{u} > 0 \) & \( c = c' = 0 \) \\ \hline
Surcharge - \(q\) & \(q\) (total stress) & \( q'\) (effective stress) \\ \hline
Unit weight - \( \gamma \) & \( \gamma \) (total weight) & \( \gamma'\) (effective weight) \\
\hline
\end{tabular}
\end{center}
\caption{\label{tab:table-name}Undrained and drained parameters}
\end{table}
lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

Problem with my tables!

Post by lukaszskowron96 »

Ok, I changed all \hline into \cline{1-3} and seems like the problem is gone for all upper lines, however there is still that problem at the bottom. See picture. Any ideas how to change that? I mean I can live with that but would like to know if there's a way.
A zoomed-in table number two.
A zoomed-in table number two.
latexforumtables2.png (11.57 KiB) Viewed 2571 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10334
Joined: Mon Mar 10, 2008 9:44 pm

Problem with my tables!

Post by Stefan Kottwitz »

This simply fixes it:

\usepackage{array}

Stefan
LaTeX.org admin
lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

Problem with my tables!

Post by lukaszskowron96 »

Thanks! It works now!

And there is no need to change to \cline{1-3}.
Post Reply