4

I am close to loose my contenance: my preamble:

    \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 generates:

! LaTeX Error: Command \c@author already defined. Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...

TexShop: generates document despite the error

How can I avoid the generation of author twice or figure out which package to avoid. TXS a lot!

  • It is a bit fishy that you also load \bibliographystyle{bmc-mathphys} despite the fact that you are using biblatex, that could cause other problems further down the road. The real problem seems to be that bmcart (at least this one at github, where did yours come from?) defines \c@author itself, so biblatex can't use it. – moewe Dec 15 '15 at 7:29
  • I was thinking about this too but was not able to figure out how to avoid it. The journal requires the package. Would it not possible to tell [biblatex] to use the [bmcart] definition? – chrischi Dec 15 '15 at 7:59
  • No, biblatex's \c@author is totally different from what bmcart does with c@author. If you, however, plan to submit to a journal, biblatex might not be your best bet after all (see biblatex: submitting to a journal), especially if they have their house .bst file. Have you checked they can accept biblatex submissions? – moewe Dec 15 '15 at 8:10
  • good point - bmc-mathphys.bst - is what they wish for. it produces a .bbl. i still would wonder whether i can not for trick the system the way i have set i up. – chrischi Dec 15 '15 at 12:22
3

The class bmcart as found on github doesn't seem to be perfectly compatible with biblatex (there are some etoolbox complaints as well).

In particular, it defines a counter \c@author which is later also defined by biblatex. Those two counters have completely different purposes, so it is not a matter of letting one package use the definition of the other.

We can however simply overwrite the class definition (hoping that this doesn't cause problems down the road) and let biblatex do its thing.

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

The following MWE will happily compile with 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}

Since the class seems to have its own bibliography package (github link) and a BibTeX styles file (github link) that is probably what you should use when submitting to the journal and not biblatex (knowing the issues that might arise when trying to do so).

  • txs... will have a go tonight! i am aware that the \let function might be perilous... will let you know! – chrischi Dec 15 '15 at 17:21
  • @chrischi If you plan to submit to a journal you should really not do that, you will incapacitate features of the class and not use the bibliography styles they want. (They might not be able to handle biblatex.) – moewe Dec 15 '15 at 17:24
  • yes you are probably right - i will aim at having a "print" version and a "published" version - probably have to adapt the bbl file too- really appreciate your advice! – chrischi Dec 16 '15 at 5:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.