1

i made a table where latex creates a big white-space between 2nd and 3rd column. Is there a way to force latex to reduce the width or to let it choose a better width by itself? The numbers themselves in the third column are OK. Here is a MWE:

    \documentclass{article}
    \usepackage{spreadtab}
    \usepackage{siunitx}


    \begin{document}

    \begin{spreadtab}{{tabular}{r r | S[scientific-notation=fixed, 
      fixed-exponent=-4, round-precision=2, round-mode=places]}}
      \toprule
      {@n1} & {@n2} & {@n2} \\
      \midrule
      88 & 4.3 & \STcopy{v}{b2/a2/a2/ln(a2)} \\
      144 & 10 & \\
      322 & 39 & \\
      692 & 176 & \\
      1498 & 922 & \\
      3180 & 3846 & \\
      \bottomrule
    \end{spreadtab} 

    \end{document}

which looks currently like:

enter image description here

Options from the siunitx package like table-unit-alignment = left and table-number-alignment = left change either nothing or remove the exponential part of the number.

1

You can tell siunitx how much space it should reserve for the S columns by giving a suitable table-format.

\documentclass{article}
\usepackage{spreadtab}
\usepackage{siunitx}
\usepackage{booktabs}


\begin{document}

\begin{spreadtab}{{tabular}{r r | S[scientific-notation=fixed, 
fixed-exponent=-4, round-precision=2, round-mode=places, table-format=1.2e-1]}}
\toprule
{@n1} & {@n2} & {@n2} \\
\midrule
88 & 4.3 & \STcopy{v}{b2/a2/a2/ln(a2)} \\
144 & 10 & \\
322 & 39 & \\
692 & 176 & \\
1498 & 922 & \\
3180 & 3846 & \\
\bottomrule
\end{spreadtab} 

\end{document}

enter image description here

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.