我手头有一个使用旧模板编写的文档,现在我想将其复制到新模板。但是,当我执行此操作并执行代码时,我遇到了错误
缺失
$
插入。
对于所有内联数学模式。这是因为在我的初始模板中,我使用符号\( \)
来编写所有内联数学方程式,而不知何故我的新模板不接受这种符号,而是强迫我改用$
。所以,我的问题是:我应该怎么做才能定义相等性$...$ = \(...\)
或者如何交换这两者?
答案1
这是尝试稍微清理一下。还可以做更多,但我认为这会修改原始模板中最糟糕的功能。
\documentclass[12pt,letterpaper]{article}
\usepackage{mathtools,amssymb}
\usepackage{graphicx,xcolor}
\usepackage{verbatim}
\usepackage{fancybox}
\usepackage{ulem}
\usepackage{enumitem}
% \usepackage{subfigure}% obsolete! use subfig or, better, subcaption
\usepackage{bbm}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\newlength\normalparindent
\setlength\normalparindent\parindent
\usepackage{parskip,setspace}
\setstretch{1.3}
\usepackage[textwidth = 6.5in, textheight = 8.5in, marginparwidth=0pt, marginparsep=0pt, headheight=0pt, headsep=0pt, left=1in, top=1.2in]{geometry}
\usepackage{titling}
\newcommand{\Comment}[1]{{}}
\definecolor{MyDarkBlue}{rgb}{0.15,0.15,0.45}
\usepackage[linktocpage=true]{hyperref}
\hypersetup{
colorlinks=true,
citecolor=MyDarkBlue,
linkcolor=MyDarkBlue,
urlcolor=MyDarkBlue,
pdfauthor={John Smith},
pdftitle={SUBJECT},
pdfsubject={hep-th}
}
% use align rather than eqnarray
\newcommand{\nn}{\nonumber}
\newcommand{\gmu}{\gamma^\mu}
\newcommand{\gnu}{\gamma^\nu}
\newcommand{\glmu}{\gamma_\mu}
\newcommand{\gf}{\gamma^5}
\newcommand{\Tr}{\text{Tr}}
\newcommand{\qb}{\mathbf{q}}
\newcommand{\pb}{\mathbf{p}}
\newcommand{\kb}{\mathbf{k}}
\newcommand{\xb}{\mathbf{x}}
\newcommand{\pd}{(2\pi)^d}
\newcommand{\intx}{\int d^d \mathbf{x}\ }
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\newcommand{\lb}{\left[}
\newcommand{\rb}{\right]}
\newcommand{\half}{\frac{1}{2}}
\newcommand{\pf}{(2\pi)^4}
\newcommand{\intkd}{\int \frac{d^Dk}{(2\pi)^D}\ }
\newcommand{\intpd}{\int \frac{d^Dp}{(2\pi)^D}\ }
\newcommand{\intpdo}{\int \frac{d^{D-1}k}{(2\pi)^{D-1}}\ }
\newcommand{\intl}{\int \frac{d^4l}{(2\pi)^4}\ }
\newcommand{\intld}{\int \frac{d^dl}{(2\pi)^d}\ }
\newcommand{\intle}{\int \frac{d^4l_E}{(2\pi)^4}\ }
\newcommand{\intp}{\int d^d \mathbf{p}\ }
\newcommand{\wsp}{\omega_{\mathbf{p}}}
\newcommand{\intpp}{\int \frac{d^d \mathbf{p}}{\sqrt{\pd 2\wsp}}\ }
\title{SUBJECT\thanks{This is a title.}}
\author{John Smith\textsuperscript{\itshape a,}\thanks{E-mail address: \Comment{\href{[email protected]}}{\url{[email protected]}}}}
\date{}
\pretitle{\begin{center}\LARGE\bfseries}% Note that your original settings do not get bold small-caps and would not do so even if this shape existed in bold for this font. If you want small-caps, change \bfseries to \scshape
\posttitle{\par\end{center}\vskip 10mm}
\preauthor{\begin{center}\large\scshape}
\postauthor{\par\end{center}\vskip 10mm}
\predate{}
\postdate{}
\renewcommand\maketitlehookc{\begin{center}\itshape\textsuperscript{a}Department,\par Address\par\end{center}\vskip 10mm}
\numberwithin{equation}{section}
\begin{document}
\setlength\parindent\normalparindent% Not at all clear this is wise with skip between paragraphs as well, but if you must, you must...
\maketitle\thispagestyle{empty}
\begin{abstract}
Abstract goes in here.
\end{abstract}
\clearpage
\tableofcontents
\clearpage
\section{Introduction}
\section{Conclusions}
\section{Acknowledgements}
\appendix
\section{Appendix 1}
\addcontentsline{toc}{section}{References}
\input{references.tex}
\end{document}