3

I am trying to use the bibliography style from this link.

Using this style, articles in references appear as:

  1. Authors, Journal Volume, pagenumbers (year)

and need to change it to

  1. Authors, Journal Volume, (year) pagenumbers

This should apply only to articles. There is a related issue in link.

Thank you in advance for any advice.

  • 1
    Should this change of position of the year field apply to all entries, or just to entries of type @article? Please advise. – Mico May 30 '18 at 13:23
  • Please edit your query to provide a minimum working example )MWE) that generates a formatted bibliography whose appearance you wish to change. – Mico May 30 '18 at 13:31
  • ... if you don't know what a mwe is this following link could be helpful: minimal working example with bibliography (MWEB) – Bobyandbob May 30 '18 at 14:42
  • The changes should only apply to the @article entries. Thanks – Coco Cayao May 30 '18 at 17:56
1

Replace in the epj.bst file the code :

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  crossref missing$
    {
     ""
      journal
      duplicate$ empty$
      { pop$ pop$ } {
        "" bibinfo.check    
        * "journal" output.check
      add.blank
      } if$
      format.vol.num.pages output
      format.date "year" output.check
    }
    { format.article.crossref output.nonnull
      format.pages output
    }
  if$
  %format.issn output  %%e-press: 03/11/2011
  format.note output
  format.eprint output
  %format.url output   %%e-press: 03/11/2011
  fin.entry
}

by

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  crossref missing$
    {
     ""
      journal
      duplicate$ empty$
      { pop$ pop$ } {
        "" bibinfo.check    
        * "journal" output.check
      add.blank
      } if$
      format.vol.num output
      ", " *  
      format.date "year" output.check
      add.blank
      format.pages.num output
    }
    { format.article.crossref output.nonnull
      format.pages.num output
    }
  if$
  %format.issn output  %%e-press: 03/11/2011
  format.note output
  format.eprint output
  %format.url output   %%e-press: 03/11/2011
  fin.entry
}

and also replace the code

FUNCTION {format.vol.num.pages}
{ volume field.or.null
  bolden
%%EDP Sciences: 19/04/2012
  number empty$
    'skip$
    { %"(" number * ")" * *
      volume empty$
    { "there's a number but no volume in " cite$ * warning$ }
    'skip$
      if$
    }
  if$ 
%%
  eid empty$
    { format.journal.pages }
    { format.journal.eid }
  if$
}

by

FUNCTION {format.vol.num}
{ volume field.or.null
  bolden
%%EDP Sciences: 19/04/2012
  number empty$
    'skip$
    { %"(" number * ")" * *
      volume empty$
    { "there's a number but no volume in " cite$ * warning$ }
    'skip$ 
      if$
    }
  if$
%%
}

FUNCTION {format.pages.num}
{ pages field.or.null
eid empty$
    {} % format.journal.pages 
    { format.journal.eid }
  if$
}

PS: after these changes rename the "epj.bst" file.

A MWE (I renamed the modified epj.bst by epj_mod.bst):

    \documentclass{article}
   \begin{filecontents*}{MWE.bib}
     @article{article1,
    title = {Title},
    volume = {12},
    journal = {Journal name},
    author = {Author},
    year = {2000},
    pages = {109}}
@article{article2,
    title = {Title},
    volume = {13},
    journal = {Journal name},
    author = {One, Author and Two, Author},
    year = {2000},
    pages = {109}}
@article{article3,
    title = {Title},
    volume = {14},
    journal = {Journal name},
    author = {One, Author and Two, Author and Three, Author},
    year = {2000},
    pages = {109}}
  \end{filecontents*}
  \begin{document}

   \cite{article1,article2,article3}

 %Bibleography

 \bibliographystyle{epj_mod}%_mod
 \bibliography{MWE}
 \end{document} 

which produces

enter image description here

  • Excellent advice. That really works. – Coco Cayao Jun 5 '18 at 10: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.