在 TeXstudio 中使用 \usepackage{amssymb,amsmath} 编译 .tex 文件时出现问题(已编辑)

在 TeXstudio 中使用 \usepackage{amssymb,amsmath} 编译 .tex 文件时出现问题(已编辑)

我和我的教授一起为 IEEE Transactions 撰写一篇关于信号处理的论文。他给了我论文的 .tex 和 .pdf 文件让我做一些修改。但是我无法编译给定的 .tex 文件,即使我的教授可以在他的计算机上编译该文件。然后我注意到我的教授正在使用\usepackage{amssymb,amsmath}.之后,我用 替换了它\usepackage{amssymb,amsmath,amsthm},令我惊讶的是,我的 .tex 文件一次性编译好了。但问题是,这样做会导致相应 .pdf 文件的页数增加,这是不可取的。除此之外,使用 ,\usepackage{amssymb,amsmath,amsthm}我的教授无法在他的计算机上编译 .tex 文件。他对我很生气,因为他认为我弄乱了他发给我的 .tex 文件。

这是我收到的编译错误:

Environment proof undefined. \begin{proof}
\begin{document} ended by \end{proof}. \end{proof}
Environment proof undefined. \begin{proof}
\begin{document} ended by \end{proof}. \end{proof}
Environment proof undefined. \begin{proof}
\begin{document} ended by \end{proof}. \end{proof}
Environment proof undefined. \begin{proof}
\begin{document} ended by \end{proof}. \end{proof}
Unknown document class (or package),(caption) standard defaults will be used.
Overfull \hbox (3.33931pt too wide) detected
Underfull \hbox (badness 2884) in paragraph
Obsolete command \bold; \mathbf should be used instead
Overfull \hbox (18.37825pt too wide) in paragraph
Underfull \hbox (badness 5817) in paragraph

这是我的论文模板:

        \documentclass[final]{IEEEtran}
    \IEEEoverridecommandlockouts
    %
    %\bibliographystyle{IEEEtran}
    %\bibliography{IEEEabrv,mybibfile}
    % \overrideIEEEmargins                      
    \setlength{\textheight}{237mm}
    \usepackage{multirow}
    %\usepackage{amssymb,amsmath,amsthm}
    \usepackage{amssymb,amsmath}
    \usepackage{color}
    \usepackage{graphicx}
    \usepackage{tikz}
    \usepackage{epstopdf}
    \usepackage{romannum}
    \usepackage{algorithm}
    \usepackage{subcaption}
    \usepackage{graphicx}
    \usepackage{float}
    \usepackage{multicol}
    \usepackage[noend]{algpseudocode}
    \usepackage{romannum}
    \input{notation.tex}
    
    % \def\oneb{\mathbf{1}}
    % \def\R{{\mathbb R}}
    % \newcommand{\qed}{\hfill $\Box$}
    
    \def\ct{\tilde{c}}
    \def\Dcal{{\cal D}}
    \def\DBP{\D_{{\rm BP}}}
    \def\db{\bar{d}}
    % \def\oneb{\mathbf{1}}
    % \def\R{{\mathbb R}}
    \def\yb{\bar{y}}
    
    \def\cb{\bar{c}}
    \def\ct{\tilde{c}}
    \def\Gsupp{{\rm Gsupp}}
    \def\dmax{d_{{\rm max}} }
    \def\dmin{d_{{\rm min}} }
    
    \def\Rcal{{\cal R}}
    
    \def\boldr{{\bf r}}
    \def\cons{{\mbox{const}}}
    
    
    \newtheorem{corollary}{Corollary}{\bf}{\it}
    \newtheorem{definition}{Definition}{\bf}{\it}
    \newtheorem{example}{Example}{\bf}{\rm}
    \newtheorem{lemma}{Lemma}{\bf}{\it}
    \newtheorem{theorem}{Theorem}{\bf}{\it}
    \newtheorem{proposition}{Proposition}{\bf}{\it}
    \newtheorem{conjecture}{Conjecture}{\bf}{\it}
    \newtheorem{problem}{Problem}{\bf}{\rm}
    
    \begin{document}

    \bibliographystyle{IEEEtran}

\bibliography{Comp-Sens}

% \cleardoublepage

\end{document}

这是我的“notation.tex”文件:

% This file contains the notation for the book on hidden Markov processes.
% Latest update on 15.08.09, rearranging, grouping, and getting rid of
% unnecessary definitions.

% Bold face Roman symbols

\def\oneb{{\bf 1}}

\def\a{{\bf a}}
\def\b{{\bf b}}
\def\c{{\bf c}}
\def\dd{{\bf d}}
\def\eb{{\bf e}}
\def\f{{\bf f}}
\def\gbold{{\bf g}}
\def\h{{\bf h}}
\def\i{{\bf i}}
\def\j{{\bf j}}
\def\k{{\bf k}}
\def\p{{\bf p}}
\def\q{{\bf q}}
\def\rbold{{\bf r}}
\def\u{{\bf u}}
\def\v{{\bf v}}
\def\w{{\bf w}}
\def\x{{\bf x}}
\def\y{{\bf y}}
\def\z{{\bf z}}
\def\Z{{\bf Z}}

% Calligraphic symbols

\def\A{{\cal A}}
\def\B{{\cal B}}
\def\C{{\cal C}}
\def\Dcal{{\cal D}}
\def\E{{\cal E}}
\def\F{{\cal F}}
\def\G{{\cal G}}
\def\H{{\cal H}}
\def\I{{\cal I}}
\def\Lcal{{\cal L}}
\def\M{{\cal M}}
\def\N{{\cal N}}
\def\P{{\cal P}}
\def\Q{{\cal Q}}
\def\Rcal{{\cal R}}
\def\S{{\cal S}}
\def\T{{\cal T}}
\def\U{{\cal U}}
\def\V{{\cal V}}
\def\X{{\cal X}}
\def\Y{{\cal Y}}
\def\Zcal{{\cal Z}}

% Blackboard style symbols

\def\Abb{{\mathbb A}}
\def\Bbb{{\mathbb B}}
\def\Cbb{{\mathbb C}}
\def\Fbb{{\mathbb F}}
\def\Mbb{{\mathbb M}}
\def\Nbb{{\mathbb N}}
\def\Nm{{\mathbb N}}
\def\R{{\mathbb R}}
\def\Sbb{{\mathbb S}}
\def\Sm{{\mathbb S}}
\def\Xbb{{\mathbb X}}
\def\Ybb{{\mathbb Y}}
\def\Zbb{{\mathbb Z}}
\def\Zm{{\mathbb Z}}

% Abbreviations for greek letters

\def\al{\alpha}
\def\d{\delta}
\def\D{\Delta}
\def\e{\epsilon}
\def\g{\gamma}
\def\GA{\Gamma}
\def\l{\lambda}
\def\L{\Lambda}
\def\om{\omega}
\def\OM{\Omega}
\def\r{\rho}
\def\s{\sigma}
\def\SI{\Sigma}
\def\t{\tau}
\def\th{\theta}
\def\Th{\Theta}

% Bold greek letters

\def\balpha{{\boldsymbol \alpha}}
\def\bbeta{{\boldsymbol \beta}}
\def\boldeta{{\boldsymbol \eta}}
\def\bgamma{{\boldsymbol \gamma}}
\def\bl{{\boldsymbol \lambda}}
\def\bmu{{\boldsymbol \mu}}
\def\bnu{{\boldsymbol \nu}}
\def\bth{{\boldsymbol \theta}}
\def\bphi{{\boldsymbol \phi}}
\def\bpsi{{\boldsymbol \psi}}
\def\bpi{{\boldsymbol \pi}}
\def\bsig{{\boldsymbol \sigma}}

% Bars, hats, tildes etc.

\def\ab{\bar{a}}
\def\ah{\hat{\a}}
\def\Ab{\bar{A}}
\def\Bb{\bar{\B}}
\def\bmuh{\hat{\bmu}}
\def\cb{\bar{c}}
\def\dh{\hat{d}}
\def\Eh{\hat{E}}
\def\fb{\bar{f}}
\def\fh{\hat{f}}
\def\kb{\bar{k}}
\def\pb{\bar{p}}
\def\ph{\hat{p}}
\def\Pb{\bar{P}}
\def\PB{\bar{\cal P}}
\def\Ph{\hat{P}}
\def\Pt{\tilde{P}}
\def\Ptt{\tilde{\P}}
\def\qb{\bar{q}}
\def\Qt{\tilde{Q}}
\def\rbar{\bar{\rho}}
\def\Sb{\bar{S}}
\def\ub{\bar{u}}
\def\vb{\bar{v}}
\def\xb{\bar{x}}
\def\xt{\tilde{x}}
\def\yb{\bar{y}}
\def\zb{\bar{z}}
\def\zt{\tilde{z}}

\def\lb{\bar{\l}}
\def\nub{\bar{\nu}}
\def\thb{\bar{\theta}}

% Approaching infinity

\def\kai{k \ap \infty}
\def\lai{l \ap \infty}
\def\mai{m \ap \infty}
\def\nai{n \ap \infty}
\def\tai{t \ap \infty}
\def\Tai{T \ap \infty}

% Miscellaneous mathematical symbols

\def\ap{\rightarrow}
\def\arg{{\rm arg}}
\def\lip{\langle}
\def\rip{\rangle}
\def\es{\emptyset}
\def\seq{\subseteq}
\def\dag{\dagger}

\def\bi{\{0,1\}}
\def\bim{\bi^m}
\def\bin{\bi^n}
\def\bimn{\bi^{m \times n}}
\def\bp{\{-1,1\}}
\def\bz{{\bf 0}}
\def\imp{\; \Longrightarrow \;}
\def\orr{\vee}
\def\fa{\; \forall}
\def\mult{x_1 , \ldots , x_m}
\def\xvec{[ x_1 \ldots x_m ]^t}

\def\half{\frac{1}{2}}
\def\st{\mbox{ s.t. }}
\def\sg{\mbox{sign}}
\def\nm{\Vert}
\def\mgf{{\rm mgf}}

\renewcommand{\iff}{\mbox{$\; \; \Longleftrightarrow \; \;$}}
\renewcommand{\and}{\mbox{$\wedge$}}

% Typesetting commands

\newcommand{\bc}{\begin{center}}
\newcommand{\ec}{\end{center}}
\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
\newcommand{\bd}{\begin{displaymath}}
\newcommand{\ed}{\end{displaymath}}
\newcommand{\ba}{\begin{array}}
\newcommand{\ea}{\end{array}}
\newcommand{\ben}{\begin{enumerate}}
\newcommand{\een}{\end{enumerate}}
\newcommand{\bit}{\begin{itemize}}
\newcommand{\eit}{\end{itemize}}
\newcommand{\beq}{\begin{eqnarray}}
\newcommand{\eeq}{\end{eqnarray}}
\newcommand{\btab}{\begin{tabular}}
\newcommand{\etab}{\end{tabular}}
\newcommand{\bfig}{\begin{figure}}
\newcommand{\efig}{\end{figure}}
\newcommand{\btp}{\begin{tikzpicture}}
\newcommand{\etp}{\end{tikzpicture}}

% Environment commands

% \newtheorem{corollary}{Corollary}{\bf}{\it}
% \newtheorem{definition}{Definition}{\bf}{\it}
% \newtheorem{example}{Example}{\bf}{\rm}
% \newtheorem{lemma}{Lemma}{\bf}{\it}
% \newtheorem{theorem}{Theorem}{\bf}{\it}
% \newtheorem{proposition}{Proposition}{\bf}{\it}
% \newtheorem{conjecture}{Conjecture}{\bf}{\it}
% \newtheorem{problem}{Problem}{\bf}{\rm}

% Additional commands for compressed sensing papers

\newcommand{\argmin}{\operatornamewithlimits{arg min}}
\newcommand{\argmax}{\operatornamewithlimits{arg max}}
\renewcommand{\mod}{~{\rm mod}~}

% \DeclareMathOperator*{\argmin}{arg\,min}
% \DeclareMathOperator*{\argmax}{arg\,max}

\def\boldr{{\bf r}}
\def\cons{{\mbox{const}}}

% Norm symbols

\newcommand{\nmm}[1]{ \nm #1 \nm }
\newcommand{\nmeu}[1]{ \nm #1 \nm_2 }
\newcommand{\nmeusq}[1]{ \nm #1 \nm_2^2 }
\newcommand{\nmA}[1]{ \nm #1 \nm_A }
\newcommand{\nmF}[1]{ \nm #1 \nm_F }
\newcommand{\nmM}[1]{ \nm #1 \nm_M }
\newcommand{\nmN}[1]{ \nm #1 \nm_N }
\newcommand{\nmP}[1]{ \nm #1 \nm_P }
\newcommand{\nmS}[1]{ \nm #1 \nm_S }
\newcommand{\nmp}[1]{ \nm #1 \nm_p }
\newcommand{\nmq}[1]{ \nm #1 \nm_q }
\newcommand{\nmv}[1]{ \nm #1 \nm_v }
\newcommand{\nmcmu}[1]{ \nm #1 \nm_{C,\mu} }
\newcommand{\nmgmu}[1]{ \nm #1 \nm_{{\rm SGL},\mu} }

% Inner product symbol
\newcommand{\IP}[2]{ \langle #1 , #2 \rangle }

% Combinatorial parameter symbol
\newcommand{\nchk}[2]{ \left( \ba{c} #1 \\ #2 \ea \right) }
% Legendre symbol
\newcommand{\Leg}[2]{ \left( \frac{#1}{#2} \right) }

\newcommand{\halmos}{\hfill $\Box$}


% \newcommand{\det}{{\rm det}}
\newcommand{\rk}{{\rm{rank}}}
\newcommand{\supp}{{\rm{supp}}}
\newcommand{\tr}{{\rm{tr}}}
% \newcommand{\mod}{\rm{ mod }}

\def\Jh{\hat{J}}

\def\vcd{\mbox{VC-dim}}

\def\Cm{\Cbb^m}
\def\Cn{\Cbb^n}
\def\Cr{\Cbb^r}
\def\Cs{\Cbb^s}
\def\Ckl{\Cbb^{k \times l}}
\def\Cmn{\Cbb^{m \times n}}
\def\Cmr{\Cbb^{m \times r}}
\def\Cno{\Cbb^{n_1 \times n_2}}
\def\Cns{\Cbb^{n \times s}}
\def\Crr{\Cbb^{r \times r}}
\def\Crs{\Cbb^{r \times s}}
\def\Fm{\Fbb_2^m}
\def\Fmn{\Fbb_2^{m \times n}}
\def\Fn{\Fbb_2^n}
\def\Fp{\Fbb_p}
\def\Fq{\Fbb_q}
\def\Fqs{\Fbb_q^*}
\def\PGq{PGL(2,\Fq)}
\def\PSq{PSL(2,\Fq)}
\def\PScq{PSL^c(2,\Fq)}
\def\Rkl{\R^{k \times l}}
\def\Rmn{\R^{m \times n}}
\def\Rno{\R^{n_1 \times n_2}}

\def\ulo{u_{\L_0}}
\def\uloc{u_{\L_0^c}}
\def\vlo{v_{\L_0}}
\def\vloc{v_{\L_0^c}}
\def\xd{x_\downarrow}
\def\xh{\hat{x}}
\def\Xh{\hat{X}}
\def\xl{x_{\L}}
\def\xlc{x_{\L^c}}
\def\xlo{x_{\L_0}}
\def\xloc{x_{\L_0^c}}
\def\hl{h_{\L}}
\def\hlc{h_{\L^c}}
\def\hlo{h_{\L_0}}
\def\hloc{h_{\L_0^c}}
\def\hso{h_{S_0}}
\def\hsoc{h_{S_0^c}}

\def\GkS{{\rm GkS}}
\def\ru{\underline{\r}}
\def\rb{\bar{\r}}



\def\nmsl1{\nm_{{\rm SL1}}}

有人能帮我解决这个问题吗?我正在使用 TeXstudio 2.12.14 (git 2.12.14),使用 Qt 版本 5.8.0,用 Qt 5.8.0 R 编译。

答案1

尝试添加\newtheorem{proof}{Proof}{\bf}{\it}。我已经添加了,并且编译成功。我有 TexLive。

相关内容