如何在Latex中以数学模式全局转换文章(在数学模式和文本模式中)中出现的所有数字?或如何为乳胶中的数字全局设置字体? N:B:我用背叶。谢谢。
\documentclass[12pt,leqno]{article}
\usepackage{times} % set font Times New Roman
\usepackage[margin=1in]{geometry}
\usepackage{amsfonts}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{multirow}
\usepackage{booktabs,threeparttable}
\usepackage{booktabs,siunitx}
\begin{document}
I want all the numerical numbers like 1, 2, 3, 4, -5, -8, 100, -58, 48 in math mode.
Like $1, 2, 3, 4, -5, -8, 100, -58, 48$.
\begin{table}[H]
\fontsize{10pt}{10pt}
\selectfont
\centering
\renewcommand*\TPTnoteLabel[1]{\parbox[b]{3em}{\hfill#1\,}}
\begin{threeparttable}
\caption{{Reduced form Estimates}}\label{tab:t4}
\begin{tabular}{l c c c c}
\hline
\toprule%\rowstyle{\bfseries}
&\multicolumn{4}{c}{{\textsc{Dependent Variable:}}} \\
\cmidrule{2-5}
\multicolumn{1}{l}{{\textsc{Independent Variable:}}} & \multicolumn{1}{c}{1} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{3} & \multicolumn{1}{c}{4}\\
\midrule
XXX & -0.2053***& 0.0815***& 0.0773***& $0.1090$***\\
& (0.0006) & (0.0007) & (0.0006) & (0.0008) \\
\hline
\(N\) & 752978 & 752978 & 752978 & 752978 \\
\end{tabular}
\footnotesize
\begin{tablenotes}
\item [{Notes}:] Heteroscedasticity robust standard errors in parentheses. Significance levels are indicated by \textsuperscript{***}$p<0.01$, \textsuperscript{**}$p<0.05$, \textsuperscript{*}$p<0.1$.
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
无论如何您正在加载siunitx
程序包,因此您应该将数字写为
I want all the numerical numbers like \num{1}, \num{2}, \num{3}, \num{4}, \num{-5}, \num{-8}, \num{100}, \num{-58}, \num{48} in math mode.
Like $\num{1}, \num{2}, \num{3}, \num{4}, \num{-5}, \num{-8}, \num{100}, \num{-58}, \num{48}$.
和siunitx
将处理其余的内容,例如它将自动选择正确的字体和模式。
与您的问题无关,但不要多次加载同一软件包。