Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to Ecology Letters biblatex style #7

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions ELE/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[Ecology Letters](http://bit.ly/IdEIY5) Citation and Bibliography Biblatex README
=============

Style originally coded by Timothée Poisot (GitHub - tpoisot)

To use:
- Ensure the ele.cbx and the ele.bbx files are in the folder of your .tex file.

- Include in the preamble of your .tex file

\usepackage[citestyle=ele,
bibstyle=ele,
backend=biber,
bibencoding=utf8]{biblatex}

Include where you want to place your bibliography:

\begin{refcontext}[sorting=nyt]
\printbibliography
\end{refcontext}


Notes:
- As of 2018-06-07 Have not checked the case when same authors and same year - ELE requirements is James et al. 1986a, b

Changes made
-------------

2018-06-07 by Christopher J. Greyson-Gaito (GitHub - cgreysongaito)

ele.bbx:
- Article titles in sentence case.
- Use of shortjournal for journal abbreviations.
- Ensured journal number is not included in reference.
- Removed space between initials.

ele.cbx
- Sorts citations in chronological order
- Prevents either initials of first author being included or second author being included when two articles with same first author
52 changes: 46 additions & 6 deletions ELE/ele.bbx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@
%% General options to match the ELE requirements
\ExecuteBibliographyOptions
{
date = year ,
doi = false ,
eprint = false ,
firstinits = true ,
isbn = false ,
maxcitenames = 2 ,
mincitenames = 1 ,
maxbibnames = 7 ,
maxbibnames = 6 ,
minbibnames = 6 ,
url = false ,
dashed = false ,
sorting = nyt
giveninits = true ,
}

%% Only the year is important
Expand All @@ -26,10 +27,31 @@
\clearfield{month}%
\clearfield{endday}%
\clearfield{endmonth}%
\clearfield{number}%
}

%% Make article titles sentence case (prevents journal titles, shortjournal and other titles from being sentence case).
\DeclareFieldFormat{titlecase}{\MakeTitleCase{#1}}

\newrobustcmd{\MakeTitleCase}[1]{%
\ifthenelse{\ifcurrentfield{booktitle}\OR\ifcurrentfield{booksubtitle}%
\OR\ifcurrentfield{maintitle}\OR\ifcurrentfield{mainsubtitle}%
\OR\ifcurrentfield{journaltitle}\OR\ifcurrentfield{journalsubtitle}%
\OR\ifcurrentfield{shortjournal}%
\OR\ifcurrentfield{issuetitle}\OR\ifcurrentfield{issuesubtitle}%
\OR\ifentrytype{book}\OR\ifentrytype{mvbook}\OR\ifentrytype{bookinbook}%
\OR\ifentrytype{booklet}\OR\ifentrytype{suppbook}%
\OR\ifentrytype{collection}\OR\ifentrytype{mvcollection}%
\OR\ifentrytype{suppcollection}\OR\ifentrytype{manual}%
\OR\ifentrytype{periodical}\OR\ifentrytype{suppperiodical}%
\OR\ifentrytype{proceedings}\OR\ifentrytype{mvproceedings}%
\OR\ifentrytype{reference}\OR\ifentrytype{mvreference}%
\OR\ifentrytype{report}\OR\ifentrytype{thesis}}
{#1}
{\MakeSentenceCase{#1}}}

%% Titles are in upright, no quotes
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1\isdot}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished,online]{title}{#1\isdot}

%% Articles have no page number indication
\DeclareFieldFormat[article]{pages}{#1}
Expand All @@ -40,9 +62,27 @@
%% Authors are Name, F.S.
\DeclareNameAlias{sortname}{last-first}

%% The initials are separated by a thin space, as per Bringhurst
\renewcommand*{\mkbibnamefirst}[1]{{\let~\,#1}}

%% No space between the initials
\renewcommand*{\mkbibnamegiven}[1]{{#1}}
\renewrobustcmd*{\bibinitdelim}{}

%% Use the shortjournal (Journal Abbreviation field if using Zotero) instead of the full journal name
\renewbibmacro*{journal}{%
\iffieldundef{shortjournal}
{%
\iffieldundef{journaltitle}
{}
{%
\printtext[journaltitle]
{%
\printfield[titlecase]{journaltitle}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{journalsubtitle}%
}%
}%
}
{\printtext[journaltitle]{\printfield[titlecase]{shortjournal}}}%
}

\DeclareNameFormat{default}{%
\renewcommand*{\multinamedelim}{\addsemicolon\addspace}%
Expand Down
7 changes: 7 additions & 0 deletions ELE/ele.cbx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@

\RequireCitationStyle{authoryear-comp}

\ExecuteBibliographyOptions{
sortcites = true,
sorting = ynt,
uniquename = false,
uniquelist = false}% sorts multiple citations in chronological order. When different articles but same first author - uniquename=false and uniquelist=false prevent either initials of first author being included or second author being included.
%%NOTE As of 2018-06-07 Have not checked the case when same authors and same year - ELE requirements is James et al. 1986a, b

\endinput