1

Would you know why the spacing between column "ssDNA8" and "dsDNA2" on line 2 looks more narrow than between "ssDNA1" and "dsDNA0", "ssDNA5" and "dsDNA5" ?

\begin{table}
  \centering
\begin{tabular}{@{}l@{\hspace*{0.1cm}}c@{\hspace*{0.4cm}}c@{\hspace*
{0.6cm}}c@{\hspace*{0.4cm}}c@{\hspace*{0.6cm}}c@{\hspace*{0.4cm}}c@{}}
\toprule
&\multicolumn{1}{c}{ssDNA8} & {dsDNA2} & {ssDNA1} & {dsDNA0} & {ssDNA5} & 
{dsDNA5} \\
\hline 
\\[-1em]
A$_{\text{1}}$&\multicolumn{1}{c}{1240 ± 80} & {1540 ± 100} & {4420 ± 30} & 
{8960 ± 30} & {1110 ± 40} & {8880 ± 20} \\
\bottomrule
\hline 
\end{tabular}
 \label{table1}
\end{table}

enter image description here

I would like to have a small and identical spacing in line 2, between columns "ssDNA8" and "dsDNA2", "ssDNA1" and "dsDNA0", "ssDNA5" and "dsDNA5" and a larger and identical spacing between columns "dsDNA2"and "ssDNA1", "dsDNA0"and "ssDNA5".

  • 2
    Welcome! Between columns, in the table preamble, you have a series of @\hspace{some length} with lengths from 1 mm to 6 mm, that's all. The normal spacing is fixed by the value of \tabcolsep, 6pt if I remember well (~ 2 mm), and you can change it. – Bernard Aug 4 '17 at 11:31
  • 1
    Maybe just remove those manual hspaces and instead \setlength{\tabcolsep}{8pt} or some other length that looks good to you. In this way, you can adjust the spaces between all columns at the same time. – Michael Palmer Aug 4 '17 at 11:34
  • However I would like to set the spacing between some columns differently in a repetitive manner. – Mathy Aug 4 '17 at 11:46
  • And what would this "repeated manner" be? – Mico Aug 4 '17 at 11:49
  • I would like to have a small and identical spacing in line 2, between columns "ssDNA8" and "dsDNA2", "ssDNA1" and "dsDNA0", "ssDNA5" and "dsDNA5" and a larger and identical spacing between columns "dsDNA2"and "ssDNA1", "dsDNA0"and "ssDNA5". – Mathy Aug 4 '17 at 11:50
1

Something along the following lines may be what you're looking for. I suggest that if you want to vary the amounts of intercolumn whitespace, you should make it really obvious. 4mm vs 6mm may simply not be enough variation; consider 3mm and 8mm, say, instead.

enter image description here

\documentclass{article}
\usepackage{booktabs} %% for \toprule, \midrule, and \bottomrule macros

% Choose the values of the following 2 length parameters to suit your needs:
\newlength\lengtha \setlength\lengtha{3mm} 
\newlength\lengthb \setlength\lengthb{8mm}

\begin{document}
\begin{table}
\caption{Some caption} \label{table1}
\medskip
\centering
\begin{tabular}{@{} l
                @{\hspace*{2mm}}     c
                @{\hspace*{\lengtha}}c
                @{\hspace*{\lengthb}}c
                @{\hspace*{\lengtha}}c
                @{\hspace*{\lengthb}}c
                @{\hspace*{\lengtha}}c @{}}
\toprule
         & ssDNA8 & dsDNA2 & ssDNA1 & dsDNA0 & ssDNA5 & dsDNA5 \\
\midrule
A$_{1}$ & $1240\pm80$ & $1540\pm100$ & $4420\pm30$ & $8960\pm30$ & $1110\pm40$ & $8880\pm20$ \\
\bottomrule
\end{tabular}
\end{table}

\end{document}

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.