0

I am trying to centre the content of this table vertically and horizontally as well to make it look better. enter image description here

and here is the code I am using

\begin{table} 
\caption{Direct vs. indirect trust management steps}
\centering
\label{table:nice_table}
\small
\begin{tabular}{p{3cm} p{4.5cm} p{4.5cm}}

\textbf{Step} & \textbf{Direct trust} & \textbf{Indirect trust}    \\
\hline

\textbf{Trust initialization} & Neutral value &  Using recommendations   
\\
\hline

\textbf{Information collection} & Direct observation & Reputation built by other nodes 
\\
\hline 

\textbf{Trust calculating} & Trust values stored locally  &  Trust values are 
distributed over the network \\
\hline

\textbf{Decision making} & Made by the node &  Made by the node \\
\hline


\end{tabular}
\end{table}

Any help would be appreciated.

1 Answers1

0

For insight on how to center the table vertically and horizontally, see this LaTeX forum post: https://latex.org/forum/viewtopic.php?t=5603

In this forum, users have used

{c|c|c|…}

for horizontal centering, and

>{\centering\arraybackslash}m{1in}

for vertical centering in conjunction with the previous horizontal centering.

Hope this helps!

DTcoder
  • 14
  • 2