LaTeX forum ⇒ Graphics, Figures & TablesProblem with my tables! Topic is solved

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

Problem with my tables!

Postby lukaszskowron96 » Tue Nov 06, 2018 11:21 pm

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.

latexforumtables.png
A zoomed-in table.
latexforumtables.png (8.95 KiB) Viewed 117 times

User avatar
Johannes_B
Site Moderator
Posts: 3883
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Nov 07, 2018 7:42 am

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: 26
Joined: Tue Oct 09, 2018 1:01 pm

Postby lukaszskowron96 » Wed Nov 07, 2018 2:40 pm

  1. \begin{table}[!ht]
  2. \begin{center}
  3. \begin{tabular}{ | c | c | c |}
  4. \hline
  5. \multirow{2}{*}{Parameter} & \multirow{2}{*}{Undrained Conditions} & \multirow{2}{*}{Drained Conditions} \\
  6. & & \\ \hline
  7. Friction angle - \( \phi \) & \( \phi = \phi_{u} = 0 \) & \( \phi = \phi' > 0 \) \\ \hline
  8. Cohesion - \(c\) & \( c = s_{u} > 0 \) & \( c = c' = 0 \) \\ \hline
  9. Surcharge - \(q\) & \(q\) (total stress) & \( q'\) (effective stress) \\ \hline
  10. Unit weight - \( \gamma \) & \( \gamma \) (total weight) & \( \gamma'\) (effective weight) \\
  11. \hline
  12. \end{tabular}
  13. \end{center}
  14. \caption{\label{tab:table-name}Undrained and drained parameters}
  15. \end{table}

lukaszskowron96
Posts: 26
Joined: Tue Oct 09, 2018 1:01 pm

Postby lukaszskowron96 » Wed Nov 07, 2018 3:22 pm

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.

latexforumtables2.png
A zoomed-in table number two.
latexforumtables2.png (11.57 KiB) Viewed 94 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 9152
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Nov 07, 2018 9:29 pm

This simply fixes it:

\usepackage{array}

Stefan
Site admin

lukaszskowron96
Posts: 26
Joined: Tue Oct 09, 2018 1:01 pm

Postby lukaszskowron96 » Wed Nov 07, 2018 9:48 pm

Thanks! It works now!

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


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 8 guests