表中蓝色 (*) 星号

表中蓝色 (*) 星号

我正在尝试找到一种方法来在我的表格中包含蓝色 (*) 星号

这是我的代码:

  \documentclass{article}
 \usepackage[T1]{fontenc}
 \usepackage[margin=2.5cm,a4paper]{geometry} % set page parameters suitably
  \usepackage{booktabs}
   \usepackage{siunitx}
   \usepackage[skip=1ex]{caption}

  \begin{document}
   \begin{table}[p]
      \sisetup{input-open-uncertainty  = ,
        input-close-uncertainty = ,
        table-space-text-pre    = (,
        table-space-text-post   = ***,
        table-format            = 3.3,
        table-align-text-pre    = false,
        table-align-text-post   = false}

  \centering
  \caption{Risk} 
   \label{tab:min}
    \begin{tabular}{@{} l *{4}{S} @{}}
  \toprule
& \multicolumn{2}{c}{\textit{Credit risk}}
& \multicolumn{2}{c@{}}{\textit{Insolvency risk}}  \\
& \multicolumn{2}{c}{\textit{(NPLs)}}
& \multicolumn{2}{c@{}}{\textit{(Z-score)}} \\
 \cmidrule(lr){2-3} \cmidrule(l){4-5}
   & {Eq} & {Eq} & {Eq} & {Eq} \\
   & {(1)} & {(2)} & {(3)} & {(4)} \\
  \midrule
  Constant
  & 1.06 & -14.380*** & 8.004*** & -23.251*** \\
  & (11.22) & (12.12) & (14.30) & (4.145) \\
  \addlinespace
  NPL$_{i,t-1}$
   & 0.43***   &  0.45*** & &   \\
   & (-2.49) & (-2.45)  & &   \\
   \addlinespace
   $\ln Z_{it-1}$
   & & &  0.41***  & 0.11*** \\
   & &  & (5.13) & (4.02) \\
    \addlinespace
   CEO\_PC$_{it}$
   & 6.48***  & 6.78*** & 1.02 & 1.02 \\
   & (12.01) & (11.45) & (1.22) & (1.02) \\
   \addlinespace
  Board\_ind
  & -0.452***  & -0.302*** & -0.471***  & -4.144** \\
  & (-2.26) & (-2.04) & (-9.01) & (-9.45) \\
  \addlinespace
 OwnQ
  & 172.346***& & 34.885*** & \\
  & (10.328) & & (4.545) &  \\
  \addlinespace
 OwnL
  & & 30.974*** & &  7.323**   \\
  & & (5.803) & & (3.704) \\
  \addlinespace
  CEO\_PC$_{it}$${}\times{}$OwnQ$_{i,t}$
   & 14.358** & & 2.479* & \\
   & (14.103) & & (6.961) & \\
   \addlinespace
  CEO\_PC$_{it}$${}\times{}$OwnQ$_{i,t}$
   & & 1.660** & & 6.437* \\
   & & (11.014) & & (7.461) \\
    \addlinespace
   Board\_ind$_{i,t}$${}\times{}$OwnL$_{i,t}$
   & 0.735**    & & -1.743* & \\
   & (10.900) & & (4.476) & \\
   \addlinespace
  Board\_ind$_{i,t}$${}\times{}$OwnL$_{i,t}$
    & & -2.939*** & & 2.046*** \\
    & & (7.612)& & (3.113) \\
   \addlinespace

   \midrule
  Year dummy     & {Yes} & {Yes} & {Yes} & {Yes} \\
  R$^2$          & 0.546 & 0.314 & 0.178 & 0.112 \\
  Adjusted R$^2$ & 0.543 & 0.309 & 0.173 & 0.106 \\
  Sargan test    & 146.365 & 101.519 & 65.110 & 43.686 \\
  \bottomrule
  \addlinespace
  \multicolumn{5}{@{}l}{* $p<0.1$; ** $p<0.05$; *** $p<0.01$}\\
  \end{tabular}
  \end{table}
  \end{document}

答案1

查看是否定义新命令,例如

\usepackage{xcolor}
\newcommand\tc[1]{\textcolor{blue}{#1}}

然后例如在表格主体的列标题后的第一行中使用它,如下所示:

  & 1.06 & -14.380\tc{***} & 8.004\tc{***} & -23.251\tc{***} \\
  & (11.22) & (12.12) & (14.30) & (4.145) \\

结果是:

在此处输入图片描述

答案2

您可以使用xcolor(或color)包和类似的命令{\color{blue}*}

相关内容