我想在表格的前两列之间放置右向双箭头
我的代码:
\documentclass[12pt,a4paper]{article}
\usepackage{algorithmic,algorithm,amsmath} %for mathematics %
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{array}
\usepackage{paralist}
\usepackage{bigstrut}
\usepackage{multirow}
\usepackage{dcolumn}
\begin{document}
\newcolumntype{d}[1]{D{.}{.}{#1}}
{\setlength{\extrarowheight}{1.5pt}
\setlength{\tabcolsep}{1pt}
\begin{table}[htbp]
\centering
\caption{The Results of Granger and MWALD tests}
\begin{tabular}{llccccc}
\toprule
\multirow{2}[4]{*}{Null Hypothesis} & \multicolumn{2}{c}{Grangers’ test (Short run)} & & \multicolumn{2}{c}{MWALD test (Long run)} \\
\cmidrule(r){3-4} \cmidrule(r){6-7}
\multicolumn{1}{l}{} & \multicolumn{1}{l}{} &\multicolumn{1}{c}{F-Statistics} &\multicolumn{1}{c}{p-values} & &\multicolumn{1}{c}{$\chi^{2}$-Statistics} & \multicolumn{1}{c}{p-values} \\
\midrule
\multicolumn{1}{l}{LTC} & \multicolumn{1}{l}{LGDP} & 7.736** & 0.021 & & 0.169 & 0.919 \\
\multicolumn{1}{l}{LGDP} & \multicolumn{1}{l}{LTC} & 0.504 & 0.777 & & 1.763 & 0.414 \\
\multicolumn{1}{l}{LCO2} & \multicolumn{1}{l}{LGDP} & 10.829* & 0.005 & & .324 & & 6.490 & 0.039 \\
\multicolumn{1}{l}{LCO2} & \multicolumn{1}{l}{LCC} & 10.673* & 0.014 & & 7.378** & 0.025 \\
\bottomrule
\end{tabular}%
\label{tab:addlabel}%
\end{table}%
\end{document}
答案1
您可以@{<symbol>}
在 中使用 as 。如果您在最后一行中\begin{tabular}{l@{$\Longrightarrow\,\,\,$}ld{5}d{3}d{5}d{3}}
使用 as ,则此方法无效。我已使用并在 周围对齐数字。\multicolumn{1}{l}{LCO2}
dcolumn
.
\documentclass[12pt,a4paper]{article}
\usepackage{mathtools}
\usepackage{booktabs}
\usepackage{array,dcolumn}
\begin{document}
\newcolumntype{d}[1]{D{.}{\cdot}{#1}}
%\newcolumntype{d}[1]{D{.}{.}{#1}}
{\setlength{\extrarowheight}{1.5pt}
%\setlength{\tabcolsep}{.3em}
\begin{table}[htbp]
\centering
\caption{The Results of Granger and MWALD tests}
\begin{tabular}{l@{$\Longrightarrow\,\,\,$}ld{5}d{3}d{5}d{3}}
\toprule
\multicolumn{1}{l}{Null} & \multicolumn{1}{l}{} & \multicolumn{2}{c}{Grangers’ test (Short run)} & \multicolumn{2}{c}{MWALD test (Long run)} \\
\cmidrule(r){3-4} \cmidrule(r){5-6}
\multicolumn{1}{l}{Hypothesis} & \multicolumn{1}{l}{} &\multicolumn{1}{c}{F-Statistics} &\multicolumn{1}{c}{p-values} & \multicolumn{1}{c}{$\chi^{2}$-Statistics} & \multicolumn{1}{c}{p-values} \\
\midrule
LTC & LGDP & 7.736** & 0.021 & 0.169 & 0.919 \\
LGDP & LTC & 0.504 & 0.777 & 1.763 & 0.414 \\
LCO2 & LGDP & 10.829* & 0.005 & 10.321* & 0.006 \\
LGDP & LCO2 & 1.793 & 0.408 & 3.694 & 0.158 \\
LTC & LCO2 & 8.652* & 0.013 & 5.775*** & 0.056 \\
LCO2 & LTC & 6.405** & 0.041 & 4.704*** & 0.095 \\
LIC & LGDP & 5.235*** & 0.073 & 0.681 & 0.711 \\
LGDP & LIC & 1.555 & 0.460 & 3.732 & 0.155 \\
LCO2 & LGDP & 16.186* & 0.000 & 8.900* & 0.012 \\
LGDP & LCO2 & 1.818 & 0.403 & 2.086 & 0.352 \\
\multicolumn{1}{l}{LCO2} & LCC & 10.673* & 0.014 & 7.378** & 0.025 \\
\bottomrule
\end{tabular}%
\label{tab:addlabel}%
\end{table}%
\end{document}