命令“\Bbbk”已定义。...ol{\Bbbk} {\mathord}{AMSb}{"7C} 当我尝试运行 mnras_template.tex 时

命令“\Bbbk”已定义。...ol{\Bbbk} {\mathord}{AMSb}{"7C} 当我尝试运行 mnras_template.tex 时

\Bbbk' already defined. ...ol{\Bbbk} {\mathord}{AMSb}{"7C}当我尝试运行 mnras_template.tex 时的命令

它起初可以工作,然后更新了一些包,现在如果不注释掉一些包它就无法运行。

答案1

问题出在他们的模板文件中(MWE 在下面,因为当我尝试将 MWE 包含在问题中时,我的编辑被拒绝)。

我的解决方案:

注释掉或者最好删除该行,\usepackage{amssymb}因为它与 MNRAS 包的更新版本冲突。

MNRAS 出版商提出的解决方案:

移动线

\usepackage{newtxtext,newtxmath}

到序言的末尾。无论是否amssymb单独加载,这都可以正常工作。希望 CTAN 上的新版本模板也能反映这一变化。

梅威瑟:

\documentclass[fleqn,usenatbib]{mnras}

% MNRAS is set in Times font. If you don't have this installed (most LaTeX
% installations will be fine) or prefer the old Computer Modern fonts, comment
% out the following line
\usepackage{newtxtext,newtxmath}
% Depending on your LaTeX fonts installation, you might get better results with one of these:
% \usepackage{mathptmx}
% \usepackage{txfonts}

% Use vector fonts, so it zooms properly in on-screen viewing software
% Don't change these lines unless you know what you are doing
\usepackage[T1]{fontenc}
% \usepackage[utf8]{inputenc}

% Allow "Thomas van Noord" and "Simon de Laguarde" and alike to be sorted by "N" and "L" etc. in the bibliography.
% Write the name in the bibliography as "\VAN{Noord}{Van}{van} Noord, Thomas"
\DeclareRobustCommand{\VAN}[3]{#2}
\let\VANthebibliography\thebibliography
\def\thebibliography{\DeclareRobustCommand{\VAN}[3]{##3}\VANthebibliography}


%%%%% AUTHORS - PLACE YOUR OWN PACKAGES HERE %%%%%

% Only include extra packages if you really need them. Common packages are:
\usepackage{graphicx}   % Including figure files
\usepackage{amsmath}    % Advanced maths commands
\usepackage{amssymb}    % Extra maths symbols  <----- DELETE THIS LINE

\title[Short title, max. 45 characters]{MNRAS \LaTeXe\ template -- title goes here}

\author[authors running]{
First Author$^{1}$\thanks{E-mail: email}
\\
% List of institutions
$^{1}$Institution
}

% These dates will be filled out by the publisher
\date{Accepted XXX. Received YYY; in original form ZZZ}

% Enter the current year, for the copyright statements etc.
\pubyear{2020}

% Don't change these lines
\begin{document}
\label{firstpage}
\pagerange{\pageref{firstpage}--\pageref{lastpage}}
\maketitle

\begin{abstract}
Abstract...
\end{abstract}

\begin{keywords}
keyword1 -- keyword2 -- keyword3
\end{keywords}

\section{Introduction}

Text...


\bibliographystyle{mnras}
\bibliography{example} % if your bibtex file is called example.bib

% Don't change these lines
\bsp    % typesetting comment
\label{lastpage}
\end{document}

答案2

newtxmath由于和amssymbpkgs都定义了\Bbbk,您只需要\let\Bbbk\relax在它们之间添加 即可禁用前面的定义。假设您想保留 中的定义newtxmath,那么下面的方法就可以了。

\usepackage{amssymb}
\let\Bbbk\relax
\usepackage{newtxmath}

答案3

它不起作用。这是我的:

在 mymain.tex 中

 \documentclass[pifootnote,degree=doctor,openright,oneside,fontset=fandol]{ccnuthesis}
   \usepackage{ccnuthesis}
   \usepackage{comment}
   \usepackage{tikz}
   \usepackage{slashed}
   \usepackage{IEEEtrantools}
   \usepackage{amsfonts}
   %%\let\Bbbk\relax
   \usepackage{amssymb}
   ...

在 ccnuthesis.cls

   ...
   \RequirePackage{amsmath}
   \RequirePackage[defaultsups]{newtxtext}
   \RequirePackage{newtxmath}
   ...

论著

 \ProvidesPackage{ccnuthesis}[2017/12/28 4.1 put any packages you would like to use here]
   \RequirePackage{amssymb}
   ...
  1. 我已移動\usepackage{ccnuthesis}\usepackage{amssymb}出現錯誤!
  2. 我已经添加了%%\let\Bbbk\relax的前行\usepackage{amssymb}。出现错误!

相关内容