9

This question led to a new package:
biblatex-nejm

The journal New England Journal of Medicine (NEJM) has the following requirement for references. I can't find a standard style file. What is the closest match? How can I customize based on that?

In the citation, it looks like 1–3, 7, 8 (no square parentheses) at the end of a sentence .

For bibliography, list all authors when there are six or fewer; when there are seven or more, list the first three, followed by et al. The following is a sample for article type:

Shapiro AMJ, Lakey JRT, Ryan EA, et al. Islet transplantation in seven patients with type 1 diabetes mellitus using a glucocorticoid-free immunosuppressive regimen. N Engl J Med 2000;343:230-8.

EDIT 1:

Question 1

The bib entry for this article:

@ARTICLE{Shapiro2000, 
   author = { Shapiro, A M J and Lakey, J R T and Ryan, E A and Lisa Schreiber and Jon Smith and Allan Jones and Cathy Smith},
   title = { Islet transplantation in seven patients with type 1 diabetes mellitus using a glucocorticoid-free immunosuppressive regimen},
  journal = { N Engl J Med },
  year = {2000},
  volume = {343},
  pages = {230-8}  }

I have fixed the author initial thing. Now it is the

N Engl J Med 2000;343:230-8.

part I need help. I really appreciate your time and help.

Question 2

In the bibliography, how can I get "1." in stead of "1"?

EDIT 2:

Question 3

The journal name should not be italic. Can we make it right?

Question 4

Suppose there is an entry field number = {2} in the bib item, how can we prevent it from showing up in bibliography?

Solution 5

tips from @lockstep:

please google: biblatex: remove commas between last and first names in bibliography

terseinits=true seems not working with backend=biber

When I removed backend=biber, the terseinits=true started to work.

many thanks to @Marco

  • 3
    Looks like you're requesting code to define a style, which is a lot to ask in a single question. You've also only provided one example entry, and this probably isn't enough information to specify the style. Next time around you might want to consider breaking up your problem into questions and providing as much detail as possible up front. – Audrey Aug 29 '11 at 23:12
  • @Audrey: yes I start to realize I am requesting too much. Definitely next time I will do good homework before posting 'good' and clear questions. Thanks so much! – tlw Aug 30 '11 at 7:39
  • @Marco: It is great idea. Actually you have already finished most part of it. – tlw Aug 30 '11 at 10:25
  • @Marco: It is great idea. Actually you are already almost there. It would be a huge help to the medicine/biology people who use less LaTex. nejm.org/page/author-center/manuscript-submission Here is their link. Their bibliography requirement is in the middle part of the page. another piece: % to remove quotation marks from {title}{\mkbibquote{#1\isdot}} \DeclareFieldFormat [article,inbook,incollection,inproceedings,patent,thesis,unpublished] {title}{#1\isdot} Their citations require '\supercite' – tlw Aug 30 '11 at 10:33
  • 1
    @tlw: see my edited post. – Marco Daniel Aug 31 '11 at 17:13
14

EDIT (31.08.2011 17:00 CET) I build a small package which allow you to use:

\usepackage[style=nejm,backend=biber]{biblatex}

The package consists of the modification of this threat and the examples of NEJM.

The package is now on CTAN.

EDIT (30.08.11 09:00 CET) Now all 5 questions are implemented in the code.

terseinits=true works with biber. You need also the option firstinits=true

Now I use the bib-entry of tlw to modify the style numeric

\documentclass[english]{scrartcl}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@ARTICLE{Shapiro2000, 
   author = { Shapiro, A M J and Lakey, J R T and Ryan, E A and Lisa Schreiber and Jon Smith and Allan Jones and Cathy Smith},
   title = { Islet transplantation in seven patients with type 1 diabetes mellitus using a glucocorticoid-free immunosuppressive regimen},
  journal = { N Engl J Med },
  year = {2000},
  number={2},
  volume = {343},
  pages = {230-8}}

\end{filecontents}
\usepackage{babel} 
\usepackage[T1]{fontenc}    
\usepackage{csquotes}
\usepackage[style=numeric,%
            minnames=3, maxnames=6,%
            terseinits=true,%
            firstinits=true,
            backend=biber]{biblatex}
\renewrobustcmd*{\bibinitperiod}{\addspace}

\renewbibmacro*{name:last-first}[4]{%
  \ifuseprefix
    {\usebibmacro{name:delim}{#3#1}%
     \usebibmacro{name:hook}{#3#1}%
     \ifblank{#3}{}{%
       \ifcapital
         {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
     {\mkbibnameprefix{#3}\isdot}%
       \ifpunctmark{'}{}{\bibnamedelimc}}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}}%remove \addcomma
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
%     \ifblank{#2#3}{}{\addcomma}%%commented
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}%
     \ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}

%Name-scheme in thebibliography
\DeclareNameAlias{default}{last-first}
%cite without brackets
\DeclareCiteCommand{\cite}%[\mkbibbrackets]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
%no bracktes in thebibliography
\DeclareFieldFormat{labelnumberwidth}{#1}
%no pp
\DeclareFieldFormat{pages}{#1}
%no In by journal name:
\newbibmacro*{in:}{}
%Order year;volume:page
\renewbibmacro*{issue+date}{%
  \printtext{%
%  \printtext[parens]{%
    \iffieldundef{issue}
      {\usebibmacro{date}}
      {\printfield{issue}%
       \setunit*{\addspace}%
       \usebibmacro{date}}}%
  \newunit}
\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addspace}%
  \usebibmacro{issue+date}%
  \setunit*{\addsemicolon}
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addspace}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\addspace}%
%  \usebibmacro{issue+date}%
  \setunit{\addcomma\space}%
  \usebibmacro{issue}%
  \newunit}
\renewcommand*{\bibpagespunct}{\addcolon}
%Journalname roman
\DeclareFieldFormat*{journaltitle}{#1}
%no number
\newbibmacro*{volume+number+eid}{%
  \printfield{volume}%
%  \setunit*{\adddot}%
%  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

\addbibresource{\jobname}
\begin{document}
\cite{Shapiro2000}
\printbibliography
\end{document}

enter image description here

  • 2
    with minnames=3, so that if there are 7 or more authors the list is truncated to 3. – rcollyer Aug 29 '11 at 17:25
  • @Marco: Thanks to you and rcollyer. I got the citation format and the number of authors list fixed. How can I get "Journal Name 2000;343:230-8"? Thanks for your patience and help to the newbies. – tlw Aug 29 '11 at 20:45
  • using the bib entry like this: @ARTICLE{Shapiro2000, author = { Shapiro, A M J and Lakey, J R T and Ryan, E A and Lisa Schreiber and Jon Smith and Allan Jones and Cathy Smith}, title = { Islet transplantation in seven patients with type 1 diabetes mellitus using a glucocorticoid-free immunosuppressive regimen}, journal = { N Engl J Med }, year = {2000}, volume = {343}, pages = {230-8} } – tlw Aug 29 '11 at 21:22
  • 1
    @Marco The name format still needs some tweaking. The OP is replacing first names with initials by hand in the bib file, but this is unnecessary. The format in a previous answer by lockstep is probably what you want. – Audrey Aug 29 '11 at 22:21
0

I'm sorry for digging up this question after all this time but I think I have something to contribute.

I've used the package that resulted from this question and found some issues with it. I managed to fix them and I thought that maybe somebody else could use it. I tried adding a comment on the package page but the website doesn't work (the ajax request returns 404).

My changes are related to minnames which I set to 6 (but that might not be what everybody else wants) but more importantly I fixed some issues that arised out of changes in other packages.

If it helps anyone, I'm adding the updated version here. If you need to change the minnames back to 3 that should be simple enough.

%% Copyright (C) 2011 by Marco Daniel 
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008/05/04 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
%% 
%% The Current Maintainer of this work is Marco Daniel.
%% 
%% This work consists of the files nejm.bbx, nejm.cbx, biblatex-nejm.tex
%% and biblatex-nejm.pdf

%%$Id: nejm.bbx 28 2011-09-09 17:17:01Z marco $
%%$Rev: 28 $
%%$Author: marco $
%%$Date: 2011-09-09 19:17:01 +0200 (Fr, 09. Sep 2011) $
\def\biblatexnejmversionbbx{v0.4}
\def\biblatexnejmpackagenamebbx{nejm.bbx}
\def\biblatexnejmsvnbbx$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space }
\ProvidesFile{nejm.bbx}[\biblatexnejmsvnbbx$Id: nejm.bbx 28 2011-09-09 17:17:01Z marco $ \biblatexnejmversionbbx: \biblatexnejmpackagenamebbx]

%use numeric.cbx as base
%Warning if backend isn't biber
\RequireBiber[2]
%need style:
\RequireBibliographyStyle{standard}

%set options to biblatex
\ExecuteBibliographyOptions
{
    isbn         = false ,
    labelnumber  = true ,
    minnames     = 6 , 
    maxnames     = 6 ,
    firstinits   = true ,
    terseinits   = true ,
    sorting      = none ,
%   language     = nejm ,
}


%provide original option
\providebool{bbx:subentry}
\DeclareBibliographyOption{subentry}[true]{%
\setbool{bbx:subentry}{#1}}

\providetoggle{bbx:articledoi}
\DeclareBibliographyOption{articledoi}[false]{%
\settoggle{bbx:articledoi}{#1}}

\providetoggle{bbx:articlein}
\DeclareBibliographyOption{articlein}[false]{%
\settoggle{bbx:articlein}{#1}}

\providetoggle{bbx:printlang}
\DeclareBibliographyOption{printlang}[false]{%
\settoggle{bbx:printlang}{#1}}


%specify language
\DeclareListFormat{language}{%
\iftoggle{bbx:printlang}{%
        \usebibmacro{list:delim}{%
            \ifbibstring{#1}%
                {\bibxstring{#1}}%
                {\ifbibstring{lang#1}%
                    {\bibxstring{lang#1}}%
                    {#1}}}%
            \ifbibstring{#1}%
            {\bibstring{#1}}%
            {\ifbibstring{lang#1}%
                {\bibstring{lang#1}}%
                {#1}}%
        \usebibmacro{list:andothers}%
}{}%
}

%format date -- only year printed
\@ifpackageloaded{babel}{%
\edef\blx@tempa{\bbl@main@language}%
}{%
\edef\blx@tempa{\blx@languagename}%
}
\DefineBibliographyExtras{\blx@tempa}{%
%<year><month><day>
\protected\def\mkbibdatelong#1#2#3{%
    \stripzeros{\thefield{#1}}%
    }%
\protected\def\mkbibdateshort#1#2#3{%
    \mkdatezeros{\thefield{#1}}%
}%  
}

%Set environment
\defbibenvironment{bibliography}
{\list
    {\printtext[labelnumberwidth]{%
    \printfield{prefixnumber}%
    \printfield{labelnumber}}}
    {\setlength{\labelwidth}{\labelnumberwidth}%
    \setlength{\leftmargin}{\labelwidth}%
    \setlength{\labelsep}{\biblabelsep}%
    \addtolength{\leftmargin}{\labelsep}%
    \setlength{\itemsep}{\bibitemsep}%
    \setlength{\parsep}{\bibparsep}}%
    \renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}

\defbibenvironment{shorthands}
{\list
    {\printfield[shorthandwidth]{shorthand}}
    {\setlength{\labelwidth}{\shorthandwidth}%
    \setlength{\leftmargin}{\labelwidth}%
    \setlength{\labelsep}{\biblabelsep}%
    \addtolength{\leftmargin}{\labelsep}%
    \setlength{\itemsep}{\bibitemsep}%
    \setlength{\parsep}{\bibparsep}%
    \renewcommand*{\makelabel}[1]{\hss##1}}}
{\endlist}
{\item}

%%
\DeclareBibliographyDriver{set}{%
\entryset
    {\ifbool{bbx:subentry}
    {\printfield[bibentrysetcount]{entrysetcount}%
    \setunit*{\addnbspace}}
    {}}
    {}%
\newunit\newblock
\usebibmacro{setpageref}%
\finentry}

%remove punctuation and space after initials -- require biber
\renewrobustcmd*{\bibinitperiod}{}
%separator printed before the pages field
\renewcommand*{\bibpagespunct}{\addcolon}
%no bracktes in thebibliography and add dot
\DeclareFieldFormat{labelnumberwidth}{#1\adddot}
%not formating pages
\DeclareFieldFormat*{pages}{#1}
%not formated journaltitle
\DeclareFieldFormat*{journaltitle}{#1}
%not formated title
\DeclareFieldFormat*{title}{#1}


% %Set name format
\DeclareNameAlias{default}{last-first}
\DeclareNameAlias{sortname}{last-first}
% %Not needed??
\DeclareNameAlias{author}{last-first}
\DeclareNameAlias{editor}{last-first}
\DeclareNameAlias{translator}{last-first}

%remove comma between familyname and firstname
\renewbibmacro*{name:family-given}[4]{%
\ifuseprefix
    {\usebibmacro{name:delim}{#3#1}%
    \usebibmacro{name:hook}{#3#1}%
    \ifblank{#3}{}{%
    \ifcapital
        {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
    {\mkbibnameprefix{#3}\isdot}%
    \ifpunctmark{'}{}{\bibnamedelimc}}%
    \mkbibnamelast{#1}\isdot
    \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
    \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}}%remove \addcomma
    {\usebibmacro{name:delim}{#1}%
    \usebibmacro{name:hook}{#1}%
    \mkbibnamelast{#1}\isdot
    \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
%     \ifblank{#2#3}{}{\addcomma}%%commented
    \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}%
    \ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}

%option articledoi -- no doi / eprint / url in article
\newbibmacro*{doi+eprint+url-use}{%
    \iftoggle{bbx:doi}%
        {\printfield{doi}}%
        {}%
    \newunit\newblock
    \iftoggle{bbx:eprint}%
        {\usebibmacro{eprint}}%
        {}%
    \newunit\newblock
    \iftoggle{bbx:url}%
        {\usebibmacro{url+urldate}}%
        {}%
}

\renewbibmacro*{doi+eprint+url}{%
\ifentrytype{article}%
    {%
    \iftoggle{bbx:articledoi}%
    {\usebibmacro{doi+eprint+url-use}}{}%
    }{\usebibmacro{doi+eprint+url-use}
    }%
}

%no bibstring in in article:
\renewbibmacro*{in:}{%
\ifentrytype{article}%
    {\iftoggle{bbx:articlein}{\printtext{\bibstring{in}\intitlepunct}}{}}%
    {\printtext{\bibstring{in}\intitlepunct}}%
}

%no number in ouput of bibliography
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
%  \setunit*{\adddot}%
\iffieldundef{number}{}{(\printfield{number})}%
\setunit{\addcomma\space}%
\printfield{eid}}

\renewbibmacro*{date}{%
    \printfield{year}%
    \iffieldundef{month}{}{\space\printfield{month}}}%

%Order year;volume:page
\renewbibmacro*{issue+date}{%
\printtext{%
    \iffieldundef{issue}
    {\usebibmacro{date}}
    {\printfield{issue}%
    \setunit*{\addspace}%
    \usebibmacro{date}}}%
\newunit}

\renewbibmacro*{journal+issuetitle}{%
% author2: \usebibmacro{author} ;\space
\usebibmacro{journal}%
\setunit*{\addspace}%
\usebibmacro{issue+date}%
\setunit*{\addsemicolon}
\iffieldundef{series}
    {}
    {\newunit
    \printfield{series}%
    \setunit{\addspace}}%
\usebibmacro{volume+number+eid}%
\setunit{\addspace}%
\setunit{\addcomma\space}%
\usebibmacro{issue}%
\newunit}

\endinput

If there is enough need for this updated version, I'm willing to figure out a way to make the changes more thought through (i.e. add the package on some kind of repository that supports versioning and make my changes clearer, possibly with added comments on the reasoning).

There's been some time since I worked on it though so it'll take a while for me to understand again what I did and why.

  • 3
    Welcome to TeX.SX! If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. – Bobyandbob Oct 27 '17 at 9:01
  • After registering an account you can add a comment to the CTAN package page. The first page of the package manual also shows an email address. And asking a question as told by Bobyandbob above is also recommended and IMHO would be a good idea, even if you already know the answer. On the other hand, hijacking a maintained package isn't a good idea. Please read the LPPL for information about what to do. – Schweinebacke Oct 27 '17 at 9:36
  • I did make an account on CTAN and adding a comment didn't work. When I clicked save nothing happened, I looked at what was happening and the ajax request that triggered on click was giving me a 404. I don't think it's hijacking a package since it's a legitimate issue the package has. What I'm bringing is a bugfix basically. Maybe it does work for others, in which case I guess I need more information. I will try adding another question that's related to the issues I was having. – hvm2hvm Oct 27 '17 at 9:51

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.