我可能之前无意中用网上的一些代码在宏级别更改了某些内容。我该如何将其恢复?
现在我面临这个问题,当我输入:\setlength\heavyrulewidth{0.14em} \setlength\lightrulewidth{0.14em}
为了使所有线条的粗细相同,
我得到的底部比顶部线条更厚???
代码:
\documentclass{article}
\usepackage[letterpaper,margin=1in]{geometry}
\setlength{\pdfpagewidth}{8.5in}
\setlength{\pdfpageheight}{11in}
\usepackage[english]{babel}
\usepackage{colortbl}
\usepackage{array}
\usepackage{amssymb,amsmath,array}
\usepackage{siunitx} % don't use 'detect-all' switch unless you know what you're doing
\usepackage{booktabs}
\usepackage{rotating} % for 'sidewaystable' env.
\setlength\heavyrulewidth{0.14em}
\setlength\lightrulewidth{0.14em}
\begin{document}
\begin{sidewaystable}
\sisetup{
input-symbols = (),
table-format = -1.3,
table-space-text-post = ***,
table-align-text-post = false,
group-digits = false
}
\noindent
\begin{tabular}{@{}l *{8}{S} @{}}
\arrayrulecolor{blue}
\toprule
& {(1)} & {(2)} & {(3)} & {(4)} & {(5)} & {(6)} & {(7)} & {(8)} \\
Variables & {FullD} & {FullD} & {FullD} & {FullD} & {FullD} & {FullD} & {FullD} & {FullD} \\
\midrule
STI\_30 & 0.301*** & 0.179** & 0.152* & 0.159 & -0.000 & 0.107 & 0.097 & 0.115 \\
& (0.087) & (0.085) & (0.085) & (0.097) & (0.003) & (0.084) & (0.094) & (0.105) \\
Produce\_Full\_SR & & 0.349*** & 0.321*** & 0.303* & 0.318*** & 0.270*** & 0.244*** & 0.257*** \\
& & (0.071) & (0.074) & (0.170) & (0.074) & (0.074) & (0.078) & (0.090) \\
Has\_Sus\_Efforts & & & 0.078*** & 0.077*** & 0.245*** & 0.001 & 0.046** & 0.129*** \\
& & & (0.020) & (0.020) & (0.094) & (0.013) & (0.019) & (0.041) \\
1o.STI\_30\#1o.Produce\_Full\_SR & & & & 0.000 & & & & \\
& & & & (0.000) & & & & \\
1o.STI\_30\#1o.Has\_Sus\_Efforts & & & & & 0.000 & & & \\
& & & & & (0.000) & & & \\
Water\_Efforts & & & & & & 0.168*** & & \\
& & & & & & (0.039) & & \\
C\_or\_S & & & & & & & 0.202*** & \\
& & & & & & & (0.066) & \\
C\_or\_S1 & & & & & & & & 0.221** \\
& & & & & & & & (0.100) \\
Constant & 0.054*** & 0.029*** & -0.001 & -0.002 & 0.000 & -0.001 & 0.000 & 0.000 \\
& (0.010) & (0.008) & (0.003) & (0.003) & (0.003) & (0.003) & (0.000) & (0.000) \\
\midrule
Observations & {566} & {555} & {552} & {552} & {552} & {552} & {252} & {140} \\
Year FE & {No} & {No} & {No} & {No} & {No} & {No} & {No} & {No} \\
No.\ of obs & {566} & {555} & {552} & {552} & {552} & {552} & {252} & {140} \\
Adjusted\ R\textsuperscript{2} & {0.0696} & {0.211} & {0.233} & {0.232} & {0.234} & {0.275} & {0.199} & {0.133} \\
\bottomrule
\addlinespace
\multicolumn{9}{c}{Robust standard errors in parentheses} \\
\multicolumn{9}{c}{$^{***}\ p<0.01$; $^{**}\ p<0.05$; $^{*}\ p<0.1$} \\
\end{tabular}
\end{sidewaystable}
\end{document}
谢谢你的帮助^^
约翰尼
答案1
我使用 \patchcmd 找到了解决方案:
只需将以下内容添加到代码中 =) 无论如何,感谢大家的帮助^^
\usepackage{booktabs, etoolbox}
\newlength{\toprulewidth}
\setlength{\toprulewidth}{0.14em}
\patchcmd{\toprule}% <cmd>
{\heavyrulewidth}{\toprulewidth}% <search><replace>
{}{}% <success><failure>
\patchcmd{\bottomrule}% <cmd>
{\heavyrulewidth}{\toprulewidth}% <search><replace>
{}{}% <success><failure>