Command \Bbbk' already defined. ...ol{\Bbbk} {\mathord}{AMSb}{"7C}
when I try to run the mnras_template.tex
It worked at first and then is updated some of the packages and now it will not run without commenting out some of the packages.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityThe issue is in their template file (the MWE is below because when I tried to include the MWE in the question, my edit was rejected).
My solution:
Comment out or better delete the line saying \usepackage{amssymb}
because it clashed with the updated version of the MNRAS package.
Solution proposed by the MNRAS publishers:
Move the line
\usepackage{newtxtext,newtxmath}
to the end of the preamble. This works with or without loading amssymb
separately. Hopefully, a new version of the template on CTAN will reflect this change as well.
MWE:
\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}
As both newtxmath
and amssymb
pkgs define \Bbbk
, you simply need to add \let\Bbbk\relax
in between them to disable the preceding definition. Say you want to keep the definition in newtxmath
, then the following should do.
\usepackage{amssymb}
\let\Bbbk\relax
\usepackage{newtxmath}
It not work. Hereis mine:
In 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}
...
In ccnuthesis.cls
...
\RequirePackage{amsmath}
\RequirePackage[defaultsups]{newtxtext}
\RequirePackage{newtxmath}
...
In ccnuthesis.sty
\ProvidesPackage{ccnuthesis}[2017/12/28 4.1 put any packages you would like to use here]
\RequirePackage{amssymb}
...
\usepackage{ccnuthesis}
after \usepackage{amssymb}
. Error appear!%%\let\Bbbk\relax
in the front ling of \usepackage{amssymb}
. Error appear!
MWE
of your code, i.e., from\documentclass
to\end{document}
in a workable format...