如何在 Latex 表中的两列之间放置特殊字符

如何在 Latex 表中的两列之间放置特殊字符

我想在表格的前两列之间放置右向双箭头

我的代码:

\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}

在此处输入图片描述

答案2

您随时可以在中间添加新列并用所需的符号填充它。

如何查找符号? 如何查找符号?

从不同字体导入单个符号 从不同字体导入单个符号

如何找出文档或图片中使用的字体? 如何找出文档或图片中使用的字体?

相关内容