I have created the following table using this online tool:
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\begin{document}
\begin{table}[]
\centering
\begin{tabularx}{1.5\textwidth}{|c|c|c|c|X|}
\hline
\textbf{\begin{tabular}[c]{@{}c@{}}Unit\\ Name\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Unit\\ Symbol\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Dimension\\ Symbol\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Quantity\\ Name\end{tabular}} & \multicolumn{1}{c|}{\textbf{Definition}} \\ \hline
second & \textbf{s} & T & time & The second, symbol s, is the SI unit of time. It is defined by taking the fixed numerical value of the caesium frequency $\Delta \nu_{Cs}$, the unperturbed ground-state hyperfine transition frequency of the caesium-133 atom, to be 9192631770 when expressed in the unit Hz, which is equal to $s^{−1}$. \\ \hline
metre & \textbf{m} & L & length & The metre, symbol m, is the SI unit of length. It is defined by taking the fixed numerical value of the speed of light in vacuum c to be 299792458 when expressed in the unit $m s^{−1}$, where the second is defined in terms of $\Delta \nu_{Cs}$. \\ \hline
kilogram & \textbf{kg} & M & mass & The kilogram, symbol kg, is the SI unit of mass. It is defined by taking the fixed numerical value of the Planck constant h to be $6.62607015 10^{−34}$ when expressed in the unit $J s$, which is equal to $kg m s^{-1}$, where the metre and the second are defined in terms of c and $\Delta \nu_{Cs}$. \\ \hline
ampere & \textbf{A} & I & \begin{tabular}[c]{@{}c@{}}electric\\ current\end{tabular} & The ampere, symbol A, is the SI unit of electric current. It is defined by taking the fixed numerical value of the elementary charge e to be $1.602176634 10^{−19}$ when expressed in the unit C, which is equal to $A s$, where the second is defined in terms of $\Delta \nu_{Cs}$. \\ \hline
kelvin & \textbf{K} & $\Theta$ & \begin{tabular}[c]{@{}c@{}}thermo-\\dynamic\\ temperature\end{tabular} & The kelvin, symbol K, is the SI unit of thermodynamic temperature. It is defined by taking the fixed numerical value of the Boltzmann constant k to be $1.380649 10^{−23}$ when expressed in the unit $J K^{−1}$, which is equal to $kg m^{2} s^{−2} K^{−1}$, where the kilogram, metre and second are defined in terms of h, c and $\Delta \nu_{Cs}$. \\ \hline
mole & \textbf{mol} & N & \begin{tabular}[c]{@{}c@{}}amount of\\ substance\end{tabular} & The mole, symbol mol, is the SI unit of amount of substance. One mole contains exactly $6.022 140 76 10^{23}$ elementary entities. This number is the fixed numerical value of the Avogadro constant, $N_{A}$, when expressed in the unit $mol^{−1}$ and is called the Avogadro number. The amount of substance, symbol n, of a system is a measure of the number of specified elementary entities. An elementary entity may be an atom, a molecule, an ion, an electron, any other particle or specified group of particles. \\ \hline
candela & \textbf{cd} & J & \begin{tabular}[c]{@{}c@{}}luminous\\ intensity\end{tabular} & The candela, symbol cd, is the SI unit of luminous intensity in a given direction. It is defined by taking the fixed numerical value of the luminous efficacy of monochromatic radiation of frequency $540 10^{12}$ Hz, $K_{cd}$, to be 683 when expressed in the unit $lm W^{−1}$, which is equal to $cd sr W^{−1}$, or $cd sr kg^{−1} m^{−2} s^{3}$, where the kilogram, metre and second are defined in terms of h, c and $\Delta \nu_{Cs}$. \\ \hline
\end{tabularx}
\caption{Definitions of the SI units and their associated dimensions.}
\label{table: SI-definitions}
\end{table}
\end{document}
I copied it into my .tex where it produces the following output
:
Now I have two questions:
How do I center the entire table horizontally to fit my page? I have currently set the table width to
1.5\textwidth, but this need not necessarily be the final value.(As long as the right-most column looks nice, I'm happy.)How do I center the contents of the first four columns to their respective cells? Not just center horizontally (which it is already), but also vertically.
EDIT:
added documentclass & packages used
fixed all errors (only warnings and badboxes left relating to the too-wide table)
{1.5\textwidth}can't be centred with\centeringas it is wider than the text block. Di you really want to make it stick in to the margins? – David Carlisle Apr 06 '20 at 19:36\textwidthwide, it is longer than the page. So yes it should stick past the margin. – Douglas James Bock Apr 06 '20 at 19:42geometrypackage? If yo, please also include the corresponding settings into your example code. – leandriis Apr 06 '20 at 19:45\makebox[0pt]{\begin{tabular}....\end{tabular}then the width will be hidden and it will over-print the margins (many publications would not accept such a setting) there are several answers on site showing this. Similarly I wouldn't vertically centre (makes the table harder to read) but if you want that make tehXcolumn usemnotpby redefining\tabularxcolumn– David Carlisle Apr 06 '20 at 19:47! Please use \mathaccent for accents in math mode.– David Carlisle Apr 06 '20 at 19:54\begin{table}[]isn't strictly an error but it generates a warningLaTeX Warning: No positions in optional float specifier.LaTeX catches this as its natural meaning would be to not allow the table to be positioned anywhere. – David Carlisle Apr 06 '20 at 19:57siunitxpackage to properly typeset thouse units? – leandriis Apr 06 '20 at 20:00$mol\textasciicircum{}\{−1\}\$this sets mol in math italic instead of roman then literally typesets^{-1}rather than a superscript -1 then typesets a literal$instead of ending math mode, making the following text all math italic as you can see in the image you post above. – David Carlisle Apr 06 '20 at 20:04