! LaTeX 错误:命令 \c@author 已定义

! LaTeX 错误:命令 \c@author 已定义

我快要失去我的自制力了:我的序言:

    \documentclass[twocolumn]{bmcart}% uncomment this for twocolumn layout and comment line below
    %%\documentclass{bmcart}

    %%% Load packages
    \usepackage{amsthm,amsmath}
    \usepackage{graphicx}
    %\usepackage[bmc]{bmc-mathphys}
    \usepackage{caption}
    \usepackage{float}
    \usepackage[latin, german, english]{babel}
    \RequirePackage{hyperref}
    \usepackage[utf8]{inputenc} %unicode support
    %\usepackage[applemac]{inputenc} %applemac support if unicode package fails
    %\usepackage[latin1]{inputenc} %UNIX support if unicode package fails
    \usepackage{dcolumn} %important for tables in the paper!!!)
    \usepackage{url}
    \usepackage{ifthen}
    \usepackage{multicol}
    \usepackage{etoolbox}
     \usepackage{logreq}
    \usepackage{dcolumn} %for package mtable gotoLatex
    \usepackage{booktabs} %for package mtable
    \usepackage{csquotes}
    \bibliographystyle{bmc-mathphys}    % Style BST file
    \usepackage[
    backend=biber,
    %style=authoryear,
    %style=numeric,
    citestyle=numeric,
    bibstyle=numeric,
    url=false,
    doi=false,
    isbn=false, 
    eprint=false, 
    firstinits=true, %adds only initials in bibliography
    terseinits=true, % Removes period after first name intial 
    %dashed=false,
    block=none, %space
    backref=false,
    backrefstyle=three+,
    maxbibnames=99,
    maxcitenames=2,
    hyperref=true,
    sorting=none,
    natbib=true
    ]{biblatex}

    \DeclareNameAlias{sortname}{last-first} % Lists all authors with last name first
    %\setlength{\bibitemsep}{1em}
    %\setlength{\bibhang}{2em}

        %\AtEveryBibitem{\clearfield{note}} %clears note 

    %   or use Biber settings to eliminate notes and language fildes
    \DeclareSourcemap{
      \maps[datatype=bibtex, overwrite]{
       \map{
        \step[fieldset=language, null]
         \step[fieldset=notes, null]
          }
        }
      }

        \addbibresource{Rad.bib}        

    \usepackage[hyphenbreaks, anythingbreaks]{breakurl}

    \usepackage{bm} %for bold math added 10.07.2015
    \graphicspath{{Images/}}

\begin{document}
One of the precariously researched areas for example answers to how temporal aspects can influence the economic or clinical result dimension \citep{de_groot_admission_2012}. There is some evidence on how admission days influence outcome (e.g. mortality) or also other dimensions (\citep{concha_variations_2014} \citep{dismuke_has_1999} )

\clearpage
\printbibliography[heading=bibintoc]
\end{document}

@article{dismuke_has_1999,
    Author = {Dismuke, Clara E. and Sena, Vania},
    Date = {1999-06-01},
    Date-Modified = {2015-12-14 15:55:00 +0000},
    Doi = {10.1023/A:1019027509833},
    File = {},
    Issn = {1386-9620, 1572-9389},
    Journaltitle = {Health Care Management Science},
    Keywords = {},
    Langid = {english},
    Note = {00072},
    Number = {2},
    Pages = {107--116},
    Shortjournal = {Health Care Management Science},
    Shorttitle = {TEST2},
    Url = {http://link.springer.com.ezproxy.unilu.ch/article/10.1023/A%3A1019027509833},
    Urldate = {2014-05-04},
    Volume = {2},
    Bdsk-Url-1 = {http://link.springer.com.ezproxy.unilu.ch/article/10.1023/A%3A1019027509833},
    Bdsk-Url-2 = {http://dx.doi.org/10.1023/A:1019027509833}}

@article{concha_variations_2014,
    Abstract = {},
    Author = {Concha, Oscar Perez and Gallego, Blanca and Hillman, Ken and Delaney, Geoff P. and Coiera, Enrico},
    Date = {2014-03-01},
    Doi = {10.1136/bmjqs-2013-002218},
    File = {},
    Issn = {, 2044-5423},
    Journaltitle = {{BMJ} Quality \& Safety},
    Keywords = {Health services research, Patient Safety, Quality Measurement},
    Langid = {english},
    Note = {00005 {PMID}: 24163392},
    Number = {3},
    Pages = {215--222},
    Shortjournal = {{BMJ} Qual Saf},
    Shorttitle = {TEST},
    Url = {http://qualitysafety.bmj.com/content/23/3/215},
    Urldate = {2014-07-09},
    Volume = {23},
    Bdsk-Url-1 = {http://qualitysafety.bmj.com/content/23/3/215},
    Bdsk-Url-2 = {http://dx.doi.org/10.1136/bmjqs-2013-002218}}

Texstudio 生成:

!LaTeX 错误:命令 \c@author 已定义。或名称 \end... 非法,请参阅手册第 192 页。

请参阅 LaTeX 手册或 LaTeX Companion 了解解释。输入 H 可立即获得帮助。...

TexShop:尽管出现错误,仍生成文档

我怎样才能避免两次生成作者或找出要避免的包。 TXS 很多!

答案1

班上bmcart 在 github 上找到似乎并不完全兼容(也biblatex有一些抱怨)。etoolbox

具体来说,它定义了一个计数器,\c@author而这个计数器后来也被 定义biblatex。这两个计数器的用途完全不同,因此,让一个包使用另一个包的定义并不是一个问题。

然而,我们可以简单地覆盖类定义(希望这不会在以后引起问题)并让它biblatex发挥作用。

\makeatletter
\let\c@author\relax
\makeatother

以下 MWE 可以顺利编译biblatex

\documentclass[british]{bmcart}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\makeatletter
\let\c@author\relax
\makeatother
\usepackage[backend=biber, style=numeric]{biblatex}

\addbibresource{biblatex-examples.bib}        

\begin{document}
\cite{sigfridsson}
\printbibliography
\end{document}

由于该类似乎有自己的参考书目包(github 链接)和 BibTeX 样式文件(github 链接)这可能是你在向期刊投稿时应该使用的,而不是biblatex(知道尝试这样做时可能出现的问题)。

相关内容