0

I have a strange indentation of the first column I just can't get rid of. Anyone has ideas whats wrong?

\documentclass{article}
\usepackage{multicol}                           % define a multicols environment which 
\usepackage{array}
\begin{document}

\begin{table}
    \footnotesize
    \renewcommand{\arraystretch}{1.3}%
    \begin{tabular*}{\textwidth}{ @{\extracolsep{\fill}}l >{\hspace{0.02\textwidth}}l >{\centering}b{0.23\textwidth} >{\centering}b{0.23\textwidth}}%
        
        \multicolumn{1}{b{0.15\textwidth}}{Behavioural\break intentions} & \multicolumn{1}{c}{Path} & Serial Mediation Effects (\textit{without} control of RF) with 95\%-CI & Serial Mediation Effects (\textit{with} control of RF) \break with 95\%-CI  \tabularnewline 
        
        KB & BEG $\rightarrow$ MU $\rightarrow$ GA $\rightarrow$ KB & 0,06 \hspace{0.02\textwidth} [0,03; 0,10] & 0,01 \hspace{0.02\textwidth} [-0,02; 0,04] \tabularnewline
        
        WOM & BEG $\rightarrow$ MU $\rightarrow$ GA $\rightarrow$ WOM & 0,06 \hspace{0.02\textwidth} [0,03; 0,10] & 0,01 \hspace{0.01\textwidth} [-0,02; 0,05] \tabularnewline
        
        MPB & BEG $\rightarrow$ MU $\rightarrow$ GA $\rightarrow$ MPB & -0,04 \hspace{0.02\textwidth} [-0,08; -0,01] & -0,01 \hspace{0.02\textwidth} [-0,03; 0,01] \tabularnewline
        
    \end{tabular*} 
\end{table}

\end{document}
2
  • 3
    \multicolumn{1}{@{}b{0.15\textwidth}}{Behavioural intentions} should work.
    – leandriis
    Commented Jan 5, 2021 at 11:00
  • Perfect that's it! Thx so much for your fast reply!
    – kilsen
    Commented Jan 5, 2021 at 11:05

1 Answer 1

1

Addint the @{} into the \multicolumn command as in \multicolumn{1}{@{}b{0.15\textwidth}}{Behavioural intentions} results in "Behavioural" being horizontally aligned with the other contents in the first column.

Since the table is wider than the textwidth and all the manual spacing and distances seem a bit compilcated, I added a second alternative version of the table that you might also like:

enter image description here

\documentclass{article}

\usepackage{array}
\begin{document}

\begin{table}
    \footnotesize
    \renewcommand{\arraystretch}{1.3}%
    \begin{tabular*}{\textwidth}{ @{\extracolsep{\fill}}l >{\hspace{0.02\textwidth}}l >{\centering}b{0.23\textwidth} >{\centering}b{0.23\textwidth}}%
        
        \multicolumn{1}{@{}b{0.15\textwidth}}{Behavioural\break intentions} & \multicolumn{1}{c}{Path} & Serial Mediation Effects (\textit{without} control of RF) with 95\%-CI & Serial Mediation Effects (\textit{with} control of RF) \break with 95\%-CI  \tabularnewline 
        
        KB & BEG $\rightarrow$ MU $\rightarrow$ GA $\rightarrow$ KB & 0,06 \hspace{0.02\textwidth} [0,03; 0,10] & 0,01 \hspace{0.02\textwidth} [-0,02; 0,04] \tabularnewline
        
        WOM & BEG $\rightarrow$ MU $\rightarrow$ GA $\rightarrow$ WOM & 0,06 \hspace{0.02\textwidth} [0,03; 0,10] & 0,01 \hspace{0.01\textwidth} [-0,02; 0,05] \tabularnewline
        
        MPB & BEG $\rightarrow$ MU $\rightarrow$ GA $\rightarrow$ MPB & -0,04 \hspace{0.02\textwidth} [-0,08; -0,01] & -0,01 \hspace{0.02\textwidth} [-0,03; 0,01] \tabularnewline
        
    \end{tabular*} 
\end{table}

\begin{table}
    \footnotesize
    \setlength{\tabcolsep}{0pt}
    \renewcommand{\arraystretch}{1.3}%
    \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}l  l *{4}{>{\(}r<{\)}r}}%
        
        Behavioural  & \multicolumn{1}{c}{Path} & \multicolumn{4}{c}{Serial Mediation Effects with 95\%-CI} \\
        intentions   &                          & \multicolumn{2}{c}{(\textit{without} control of RF)} &  \multicolumn{2}{c}{(\textit{with} control of RF)}   \\
        
        KB & BEG $\rightarrow$ MU $\rightarrow$ GA $\rightarrow$ KB & 0,06 & [0,03; 0,10] & 0,01 & [-0,02; 0,04] \\
        
        WOM & BEG $\rightarrow$ MU $\rightarrow$ GA $\rightarrow$ WOM & 0,06 & [0,03; 0,10] & 0,01 & [-0,02; 0,05] \\
        
        MPB & BEG $\rightarrow$ MU $\rightarrow$ GA $\rightarrow$ MPB & -0,04 & [-0,08; -0,01] & -0,01 & [-0,03; 0,01] \\
        
    \end{tabular*} 
\end{table}

\end{document}
2
  • Awesome and beautiful! Indeed I like the second one better :). What exactly does the *{4}{>{\(}r<{\)} line?
    – kilsen
    Commented Jan 6, 2021 at 8:46
  • It inserts 4 right aligned columns whose contents automatically are all in math mode.
    – leandriis
    Commented Jan 7, 2021 at 22:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .