2

I have the MWE as follows:

\documentclass[12pt]{article}
\usepackage{caption}
\captionsetup[table]{position=bottom}
\begin{document}
\begin{table}
\centering
\begin{tabular}{|r|l|}
\hline
\textbf{Paramagnetic metal}&\textbf{Magnetic susceptibility}\\
\hline
Tungsten&$6.8~\text{x}~10^{-5}$\\
\hline
Aluminium&$2.2~\text{x}~10^{-5}$\\
\hline
Lithium&$1.4~\text{x}~10^{-5}$\\
\hline
Magnesium&$1.2~\text{x}~10^{-5}$\\
\hline
Sodium&$0.72~\text{x}~10^{-5}$\\
\hline
\end{tabular}
\caption{Magnetic susceptibility  of some selected paramagnetic metals}
\end{table}
\end{document}

It produces this:
enter image description here

Now I would like to add some space between the \hline and -5 and as well maintain the table look as such (without making it lengthier (I mean visibly)). When I see my document, it feels like, -5 is touching the line, which I don't want

2
2

I would use booktabs too, avoiding rules as much as possible; but also siunitx for the second column, in order to fully align the numbers. Also the data are easier to input.

\documentclass[12pt]{article}
% load the golden pair for numeric tables
\usepackage{siunitx,booktabs}

\usepackage{caption}
\captionsetup[table]{position=bottom}

\begin{document}
\begin{table}
\centering
\begin{tabular}{ l S[table-format=1.2E-1] }
\toprule
\multicolumn{1}{c}{\textbf{Paramagnetic}} & {\textbf{Magnetic}}       \\
\multicolumn{1}{c}{\textbf{metal}}        & {\textbf{susceptibility}} \\
\midrule
Tungsten  & 6.8E-5\\
Aluminium & 2.2E-5\\
Lithium   & 1.4E-5\\
Magnesium & 1.2E-5\\
Sodium    & 0.72E-5\\
\bottomrule
\end{tabular}
\caption{Magnetic susceptibility  of some selected paramagnetic metals}
\end{table}
\end{document}

Breaking the headers into two rows makes the table narrower and easier to read. The first column should be left aligned, rather than right aligned.

The value for table-format is easy to explain: your numbers have one digit for the integer part and at most two for the decimal part; then they have an exponential part, one digit with minus sign. Thus 1.2E-1

The headers for the second column should be braced, in order for siunitx to center them.

enter image description here

3

Package array provides \extrarowheight, which adds extra space to the height of the rows:

\documentclass[12pt]{article}
\usepackage{caption}
\captionsetup[table]{position=bottom}
\usepackage{amstext}
\usepackage{array}
\setlength{\extrarowheight}{2pt}

\begin{document}
\begin{table}
\centering
\begin{tabular}{|r|l|}
\hline
\textbf{Paramagnetic metal}&\textbf{Magnetic susceptibility}\\
\hline
Tungsten&$6.8~\text{x}~10^{-5}$\\
\hline
Aluminium&$2.2~\text{x}~10^{-5}$\\
\hline
Lithium&$1.4~\text{x}~10^{-5}$\\
\hline
Magnesium&$1.2~\text{x}~10^{-5}$\\
\hline
Sodium&$0.72~\text{x}~10^{-5}$\\
\hline
\end{tabular}
\caption{Magnetic susceptibility  of some selected paramagnetic metals}
\end{table}
\end{document}

Result

And without the many ugly lines:

\documentclass[12pt]{article}
\usepackage{caption}
\captionsetup[table]{position=bottom}
\usepackage{amstext}
\usepackage{array}
%\setlength{\extrarowheight}{2pt}% not really needed here
\usepackage{booktabs}

\begin{document}
\begin{table}
\centering
\begin{tabular}{rl}
\toprule
\textbf{Paramagnetic metal}&\textbf{Magnetic susceptibility}\\
\midrule
Tungsten&$6.8~\text{x}~10^{-5}$\\
Aluminium&$2.2~\text{x}~10^{-5}$\\
Lithium&$1.4~\text{x}~10^{-5}$\\
Magnesium&$1.2~\text{x}~10^{-5}$\\
Sodium&$0.72~\text{x}~10^{-5}$\\
\bottomrule
\end{tabular}
\caption{Magnetic susceptibility  of some selected paramagnetic metals}
\end{table}
\end{document}

Result booktabs

2
  • How do you get the light ping color in your background??? please tell me – subham soni Jul 18 '14 at 16:26
  • 1
    @subhamsoni: I am putting the images inside a quotation: > ![...][...]. And I am generating the images with transparent background (ghostscript's pngalpha device or making it transparent using gimp). – Heiko Oberdiek Jul 18 '14 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.