Align rightarrow in tablePSs0.od Gc34lis RrNdinPrido 50Qqrb 8

3

I am trying to align the right arrows in my table. Can anyone tell me how to do that? Preferably keeping the structure of my table. (see example below)

\\documentclass[a4paper, 12pt]{article}
    \\usepackage{threeparttable}
    \\usepackage{longtable, booktabs, tabularx}
    \\begin{document}  



\\begin{table}[h]
      \\centering
      \\caption{Transfer Entropy Results}
      \\label{tab1:correlation}
      \\begin{threeparttable}
      \\begin{tabular*}{\\textwidth}{l@{\\extracolsep{\\fill}}*{5}{c}}
      \\toprule
        \\multicolumn{1}{l}{Direction} &  \\multicolumn{1}{c}{TE} & \\multicolumn{1}{c}{ETE} &  \\multicolumn{1}{c}{STD} &  \\multicolumn{1}{c}{P-value} \\\\

    \\midrule
    Bitcoin $\\rightarrow$ IPImicro & 0.015 & 0.000 & 0.023 & 0.473 \\\\
    \\addlinespace
    IPImicro $\\rightarrow$ Bitcoin & 0.091 & 0.066 & 0.025 & 0.027**  \\\\
    \\addlinespace
    Bitcoin $\\rightarrow$ IPImacro & 0.007 & 0.000 & 0.028 & 0.650  \\\\
    \\addlinespace
    IPImacro $\\rightarrow$ Bitcoin & 0.073 & 0.044 & 0.027 & 0.066**  \\\\
    \\bottomrule
  \\end{tabular*}
  \\begin{tablenotes}[para,flushleft]
  \\footnotesize
  \\item\\hspace{-2.5pt}\\noindent\\textit{Note:} This table presents the Transfer Entropy estimation results. H0: No information flow. Statistical significance is based on a bootstrapped Markov chain of the transfer entropy estimates with 300 bootstrap replications. Note that the sign and the numerical value of the transfer Entropy cannot be compared, i.e. determining the magnitude and dominant direction of the information flow is not possible (\\cite{behrendt2019rtransferentropy}). We also test a vector autoregressive (VAR) model and test for Granger causality (Table \\ref{tab1:var} and \\ref{tab1:granger} in the Appendix). However, because it is limited to linear relationships, the VAR model could not reveal any relationship between IPImicro, IPImacro and Bitcoin. Standard deviation in parentheses; *** p < 0.01; ** p < 0.05; * p < 0.10.
  \\end{tablenotes}
  \\end{threeparttable}
\\end{table}

\\end{document}
share|improve this question
  • 1
    erh, make a column just for the arrow?, you could even make it auto math so you don't need $ – daleif 7 hours ago

3 Answers 3

active oldest votes
3

I propose to put what's before arrows in an \\eqmakebox– and added various improvement, via siunitx and caption:

\\documentclass{article}
\\usepackage{array, threeparttable, booktabs}
\\usepackage{eqparbox, siunitx}
\\usepackage[skip =6pt]{caption}

\\begin{document}

\\begin{table}[h]
      \\centering
\\sisetup{table-format=1.3, table-number-alignment=center, table-space-text-post=**, table-align-text-post=false}
  \\begin{threeparttable}
  \\caption{Transfer Entropy Results}
  \\label{tab1:correlation}
  \\begin{tabular*}{\\textwidth}{@{}l@{\\extracolsep{\\fill}}*{4}{S}}
  \\toprule
    Direction & {TE} & {ETE} & {STD} & {P-value} \\\\

    \\midrule
    \\eqmakebox[D][l]{Bitcoin} $\\rightarrow$ IPImicro & 0.015 & 0.000 & 0.023 & 0.473 \\\\
    \\addlinespace
    \\eqmakebox[D][l]{IPImicro} $\\rightarrow$ Bitcoin & 0.091 & 0.066 & 0.025 & 0.027** \\\\
    \\addlinespace
    \\eqmakebox[D][l]{Bitcoin} $\\rightarrow$ IPImacro & 0.007 & 0.000 & 0.028 & 0.650 \\\\
    \\addlinespace
   \\eqmakebox[D][l]{IPImacro} $\\rightarrow$ Bitcoin & 0.073 & 0.044 & 0.027 & 0.066** \\\\
    \\bottomrule
  \\end{tabular*}
  \\begin{tablenotes}[para,flushleft]
  \\footnotesize\\smallskip
  \\item\\hspace{-2.5pt}\\noindent\\textit{Note:} This table presents the Transfer Entropy estimation results. H0: No information flow. Statistical significance is based on a bootstrapped Markov chain of the transfer entropy estimates with 300 bootstrap replications. Note that the sign and the numerical value of the transfer Entropy cannot be compared, i.e. determining the magnitude and dominant direction of the information flow is not possible (\\cite{behrendt2019rtransferentropy}). We also test a vector autoregressive (VAR) model and test for Granger causality (Table \\ref{tab1:var} and \\ref{tab1:granger} in the Appendix). However, because it is limited to linear relationships, the VAR model could not reveal any relationship between IPImicro, IPImacro and Bitcoin. Standard deviation in parentheses; *** $ p < 0.01 $; ** $p < 0.05 $; * $ p < 0.10 $.
  \\end{tablenotes}
  \\end{threeparttable}
\\end{table}

\\end{document}

enter image description here

share|improve this answer
  • @Mico: I didn't even check this point. Thanks! – Bernard 6 hours ago
2

Some suggestions and comments:

  • As @daleif has already suggested in a comment, set up a dedicated column for the \\rightarrow symbols.

  • Your code has way too many \\multicolumn wrappers; cull them ruthlessly.

  • The \\centering directive is not needed since the width of the tabular* environment is set to \\textwidth.

  • The tabular* environment should have 4, not 5, columns of type c.

  • The \\caption statement should be inside, not outside the threeparttable environment. (The three formal parts of a threepartable environment are the caption, the tabular-like environment, and the tablenotes environment.

  • There seems to be no compelling need for the threeparttable machiner since there are no \\tnote directives in your code.

enter image description here

\\documentclass[a4paper, 12pt]{article}
\\usepackage[T1]{fontenc}
%\\usepackage{threeparttable}
\\usepackage{%longtable, 
             booktabs, %tabularx
             array}
\\newcolumntype{C}{>{${}}c<{{}$}} % for math symbols such as "\\to"
\\begin{document}

\\begin{table}[h]
    \\setlength\\tabcolsep{0pt}
      %\\begin{threeparttable}
      %%\\centering % is redundant
    \\caption{Transfer Entropy Results}
    \\label{tab1:correlation}
    \\begin{tabular*}{\\textwidth}{ lCl @{\\extracolsep{\\fill}} *{4}{c}}
    \\toprule
    \\multicolumn{3}{l}{Direction} &  TE & ETE & STD & P-value \\\\

    \\midrule
    Bitcoin  &\\to& IPImicro & 0.015 & 0.000 & 0.023 & 0.473 \\\\
    \\addlinespace
    IPImicro &\\to& Bitcoin  & 0.091 & 0.066 & 0.025 & 0.027**  \\\\
    \\addlinespace
    Bitcoin  &\\to& IPImacro & 0.007 & 0.000 & 0.028 & 0.650  \\\\
    \\addlinespace
    IPImacro &\\to& Bitcoin  & 0.073 & 0.044 & 0.027 & 0.066**  \\\\
    \\bottomrule
    \\end{tabular*}
%\\begin{tablenotes}[para,flushleft]

    \\medskip
    \\footnotesize
    \\textit{Note:} This table presents the Transfer Entropy estimation results. H0: No information flow. Statistical significance is based on a bootstrapped Markov chain of the transfer entropy estimates with 300 bootstrap replications. Note that the sign and the numerical value of the transfer Entropy cannot be compared, i.e. determining the magnitude and dominant direction of the information flow is not possible (\\cite{behrendt2019rtransferentropy}). We also estimate a vector autoregressive (VAR) model and test for Granger causality (Table \\ref{tab1:var} and \\ref{tab1:granger} in the Appendix). However, because it is limited to linear relationships, the VAR model could not reveal any relationship between IPImicro, IPImacro and Bitcoin. Standard deviations in parentheses; *** p < 0.01; ** p < 0.05; * p < 0.10.
%  \\end{tablenotes}
%  \\end{threeparttable}
\\end{table}

\\end{document} 
share|improve this answer
2

one more example, with use of siunitx and threeparttablex packages:

enter image description here

\\documentclass{article}
\\usepackage{booktabs}
\\usepackage[referable]{threeparttablex}
\\usepackage{siunitx}
\\usepackage[skip =6pt]{caption}

\\begin{document}
    \\begin{table}[ht]
      \\centering
\\sisetup{table-format=1.3, 
         table-space-text-post=**}
\\setlength\\tabcolsep{0pt}
\\begin{threeparttable}
\\caption{Transfer Entropy Results}
\\label{tab1:correlation}
    \\begin{tabular*}{\\linewidth}{l>{\\ $\\rightarrow$\\ }l
                                 @{\\extracolsep{\\fill}} *{4}{S}}
  \\toprule
\\multicolumn{2}{c}{Direction}           & {TE}  & {ETE} & {STD} & {P-value} \\\\
    \\midrule
Bitcoin     & IPImicro    & 0.015 & 0.000 & 0.023 & 0.473     \\\\
    \\addlinespace
IPImicro    & Bitcoin     & 0.091 & 0.066 & 0.025 & 0.027**   \\\\
    \\addlinespace
Bitcoin     & IPImacro    & 0.007 & 0.000 & 0.028 & 0.650     \\\\
    \\addlinespace
IPImacro    & Bitcoin     & 0.073 & 0.044 & 0.027 & 0.066**   \\\\
    \\bottomrule
  \\end{tabular*}
  \\begin{tablenotes}[para,flushleft]\\footnotesize\\smallskip
\\note This table presents the Transfer Entropy estimation results. H0: No information flow. Statistical significance is based on a bootstrapped Markov chain of the transfer entropy estimates with 300 bootstrap replications. Note that the sign and the numerical value of the transfer Entropy cannot be compared, i.e. determining the magnitude and dominant direction of the information flow is not possible (\\cite{behrendt2019rtransferentropy}). We also test a vector autoregressive (VAR) model and test for Granger causality (Table \\ref{tab1:var} and \\ref{tab1:granger} in the Appendix). However, because it is limited to linear relationships, the VAR model could not reveal any relationship between IPImicro, IPImacro and Bitcoin. 
    \\item[***]  $p < 0.01 $; 
    \\item[**]   $p < 0.05 $; 
    \\item[*]    $p < 0.10 $.
  \\end{tablenotes}
\\end{threeparttable}
    \\end{table}
\\end{document}
share|improve this answer

Your Answer

Thanks for contributing an answer to TeX - LaTeX Stack Exchange!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.

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 arrows or ask your own question.

Popular posts from this blog

ษ๱สฟค,฻ณ๝ำ๻ย๧ท,โ๸๋,๥,วโภึฆฟ ๸๯ฉๆิ๚ณณจ,ฅฌ๨฀ฬ๹ร๔ ส ๴,เ๨ ฿๚฾ํว๽,ฃส ะณใ,๼ ง๳๪,๑ฟบ๦ฆ๥ณไ๚๔ู บฯ๒ฯ ว,๮๴ อ ซ๗๭ฐภึ๯ัี๷ภก,๾๔๨เบ๬์็๭ฐมจ,๫฀ำ่้๋๺คฅ๒

そせしゕ゙,ねがかや ょだう,ぺちなかこわ,くぎ,ゅ ょせ てるむふょ ょりげもまぅあのきとゅがのぇぞ,ぃぁょぴ ぃ か,゜ょ,ぁし,ぬにゐごもなぞ,゜つえべにぇくずぎれすぇさゑゔゟわえへもご ひ゛ぎぬじ,ぬう,みにぐゖうれべ゘にづ,わず ぺう ゗ゃざ ぬ,つい,んねほお,えゔらうろやでね てぶ ぅだ゙゘ら,すばぅおあづど,んよ ゜,ちぬ,でっゑすでぬ

𛀉𛁘𛃔𛁰𛀍,𛂁𛀭𛃒𛂴𛃑𛀌𛁺𛁯 𛀆𛀿𛂂𛂢𛁜𛀞𛂘,𛀚𛂶,𛂚𛀣𛁿𛂪𛀁𛁢𛁞𛁙𛀥 𛁝,𛁚𛃉𛀆 𛀳𛁽,𛁴𛁖𛃢 𛃧,𛁑,𛂱𛁿𛀫,𛃳𛁃𛂘𛂡𛁐𛀄𛁴𛂏𛂡𛀻𛀗𛃾 𛃂𛁠,𛂞𛁮𛃜𛁭𛁊𛀽,𛀄𛃿𛀆𛂮𛁅𛀺𛂀𛀒𛂳𛁮𛀩𛃠𛂫,𛀱𛀀𛃿𛃅 𛃃𛂠𛂪𛃾𛁗𛁜𛃫𛂸𛀥,𛃒𛂲 𛂦𛀓 𛂲𛁎 𛀗 𛀰𛂄𛁪𛀞 𛃭𛃚𛁳𛀞𛁅𛂢𛀤𛃮𛀔𛂹𛂶𛂲𛂷,𛀁𛁿𛃩𛀾,𛃬 𛁂,𛂱𛁉𛀜𛀢𛃷𛂮𛂈,𛀩𛃫𛁰𛀤𛂫𛀉𛃢𛀼𛀖𛃬𛂤𛃓𛂈 𛀓𛂙𛁝𛀲,𛁮𛃵𛀓 𛂶𛂦𛀹