I have the following part table:
\begin{table}[!h]
\centering
\begin{adjustbox}{width=1\textwidth}
\small
\begin{tabular}{|l||l|}
\hline
\textbf{Element Name} & \textbf{Description} \\
\hline
SemiMajorAxis & The length of the semi-major axis $a$, $b$ and $c$ of the 3D \\\hline
\end{tabular}
\end{adjustbox}
\caption[A description of the XML elements containing the ellipsoid information]{A description of the XML elements containing the information of the ellipsoid.}
\label{tab:XML_defs}
\end{table}
I would like to align the name "Element Name" and "Description" at the center of the cell without affecting the rest of the rows.
Best Answer
You need to replace
with
Instead of using
\adjustbox
to cram the table into width of the text block, do consider using atabularx
environment instead of thetabular
environment and using a column of typeX
for the second column. Text in anX
column will can wrap, as needed. You may also want to consider giving the table a more "open" look, by getting rid of all vertical lines and using horizontal lines more sparingly. In the following screenshot, the second table is drawn with the help of the line-drawing macros of thebooktabs
package.