I don't think I have a full answer but I found myself with a similar problem one day and solved it using bold versions of smaller fonts. For som fonts it works and for some it doesn't. This is where you skill and taste comes into effect. Here is my case where I think it works: (the \hskips are cause it's an abbreviation)
\documentclass[12pt]{memoir}
\usepackage[osf]{mathpazo}
\begin{document}
\newcommand{\inchi}{%
\mbox{\textsc{i}%
\hskip 0.1 em {\scriptsize \textbf{n}}%
\hskip 0.1 em {\normalsize \textsc{c}}%
\hskip 0.1 em {\scriptsize \textbf{h}}%
\hskip 0.1 em {\normalsize \textsc{i}}%
}
}
Lorem ipsum \inchi dolor\ldots
\end{document}
You could (i) use the tabular*
instead of the tabular
(or tabularx
) environment, (ii) set the width of the tabular*
to \linewidth
, and (iii) use the (admittedly complicated-looking) expression @{\extracolsep{\fill}}
to make LaTeX expand the intercolumn white space so that the contents of the table take up the full available width. (Unless instructed to do something else, LaTeX inserts intercolumn whitespace in the amount of 2\tabcolsep
between columns in a tabular...
environment.)
Separately, I'd also get rid of the \large
font size directive, use @{}
to get rid of the extra whitespace at the left and right margins of the tables, not use \centering
and instead use \hspace*{\fill}
to separate the two subtables, and make a few other changes here and there to streamline the setup and look of the tables.
Addendum, posted after receiving information that the OP uses a fairly narrow text block: It's still possible to use the tabular*
environment, but with two modifications relative to the code I posted originally (now deleted): (i) reduce the value of the \tabcolsep
parameter from the default value of 6pt
to 1pt
and let LaTeX then insert \fill
for extra separation, and (ii) change the font size to \small
(which is 1pt
less than the default font size).
\documentclass{article}
\usepackage{siunitx,booktabs,subcaption}
\setlength\tabcolsep{1pt} % LaTeX default is 6pt
\sisetup{detect-weight=true,
detect-inline-weight=math,
table-format=1.2(2)}
\begin{document}
\begin{table}
\small % reduce font size by 1pt
\begin{subtable}{0.48\textwidth}
\begin{tabular*}{\linewidth}{@{}l
@{\extracolsep{\fill}} SS
S[table-format=2.2(2)]
S[table-format=2.2(2)]@{}}
\toprule
\phantom{Var.} &
\multicolumn{4}{c}{Error Quantiles}\\
\cmidrule{2-5}
& {25\%} & {50\%} & {75\%} & {95\%}\\
\midrule
A & 0.17(1) & 0.25(3) & 0.33(2) & 0.43(2)\\
B & 0.09(1) & 0.12(1) & 0.17(2) & 0.26(5)\\
C & 0.07(1) & 0.09(1) & 0.11(1) & 0.16(1)\\[1ex]
A & 0.17(83) & 0.26(83) & 0.38(83) & 0.96 \\ % 1e7
B & 0.10(1) & 0.16(1) & 0.22(2) & 0.41(8)\\
C & 0.08(1) & 0.12(1) & 0.19(3) & 0.52(23)\\[1ex]
A & 0.37(6) & 0.73(15) & 1.66(63) & {201}\\ % 1e5
B & 0.07(1) & 0.09(1) & 0.15(2) & 15.50(33)\\
C & 0.06(0) & 0.09(1) & 0.12(1) & 0.20(2)\\
\bottomrule
\end{tabular*}%
\caption{}
\end{subtable}%
\hspace*{\fill}%
\begin{subtable}{0.48\textwidth}
\begin{tabular*}{\linewidth}{@{}l
@{\extracolsep{\fill}} SS
S[table-format=2.2(2)]
S[table-format=2.2(2)]@{}}
\toprule
\phantom{Var.}
& \multicolumn{4}{c}{Error Quantiles}\\
\cmidrule{2-5}
& {25\%} & {50\%} & {75\%} & {95\%}\\
\midrule
A & 0.17(1) & 0.25(3) & 0.33(2) & 0.43(2)\\
B & 0.09(1) & 0.12(1) & 0.17(2) & 0.26(5)\\
C & 0.07(1) & 0.09(1) & 0.11(1) & 0.16(1)\\[1ex]
A & 0.17(83) & 0.26(83) & 0.38(83) & 0.96 \\ % 1e7
B & 0.10(1) & 0.16(1) & 0.22(2) & 0.41(8)\\
C & 0.08(1) & 0.12(1) & 0.19(3) & 0.52(23)\\[1ex]
A & 0.37(6) & 0.73(15) & 1.66(63) & {201}\\ % 1e5
B & 0.07(1) & 0.09(1) & 0.15(2) & 15.50(33)\\
C & 0.06(0) & 0.09(1) & 0.12(1) & 0.20(2)\\
\bottomrule
\end{tabular*}%
\caption{}
\end{subtable}
\end{table}
\end{document}
Second Addendum: In case you feel that this setup (with font size \small
, 10% smaller than the "normal" font size) doesn't provide enough whitespace between the columns, you could use \footnotesize
(20% smaller than the "normal" font size):
Best Answer
The AMS classes have a
\larger
command that works out of the box:This won't work in subscripts/superscripts, though. Unfortunately
\text
doesn't update\@currsizeindex
, so using\text
instead of\mbox
, which would be the obvious attempt, doesn't give the desired result.A possible way out is to update the sizes manually: