From 0012d7f27887b2587620bf0239ac2a6d3603d029 Mon Sep 17 00:00:00 2001 From: cgreysongaito Date: Thu, 7 Jun 2018 13:56:11 -0400 Subject: [PATCH 1/6] updated ele.bbx and ele.cbx for most recent requirements of Ecology Letters (except did not check whether same author, same year is correct for Ecology Letters). --- ELE/ele.bbx | 51 ++++++++++++++++++++++++++++++++++++++++++++++----- ELE/ele.cbx | 6 ++++++ 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/ELE/ele.bbx b/ELE/ele.bbx index a4c5150..bf0d433 100644 --- a/ELE/ele.bbx +++ b/ELE/ele.bbx @@ -7,16 +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 , + giveninits = true , sorting = nyt } @@ -26,10 +28,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} @@ -40,9 +63,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}% diff --git a/ELE/ele.cbx b/ELE/ele.cbx index cfb5d91..ce45c3b 100644 --- a/ELE/ele.cbx +++ b/ELE/ele.cbx @@ -2,4 +2,10 @@ \RequireCitationStyle{authoryear-comp} +\ExecuteBibliographyOptions{ +sortcites=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 \ No newline at end of file From 6d6215c7904be3ed1a880fdd5863b46520c0365e Mon Sep 17 00:00:00 2001 From: cgreysongaito Date: Thu, 7 Jun 2018 14:13:23 -0400 Subject: [PATCH 2/6] added Readme file for ele citation style --- ELE/ELE_README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 ELE/ELE_README.md diff --git a/ELE/ELE_README.md b/ELE/ELE_README.md new file mode 100644 index 0000000..bb35095 --- /dev/null +++ b/ELE/ELE_README.md @@ -0,0 +1,29 @@ +[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} + +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 \ No newline at end of file From 5310f6db229f8bb3117b975a253d4bd12f917f59 Mon Sep 17 00:00:00 2001 From: cgreysongaito Date: Thu, 7 Jun 2018 14:14:47 -0400 Subject: [PATCH 3/6] changed name of readme --- ELE/{ELE_README.md => README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ELE/{ELE_README.md => README.md} (100%) diff --git a/ELE/ELE_README.md b/ELE/README.md similarity index 100% rename from ELE/ELE_README.md rename to ELE/README.md From cb5628f212acf83c5dbced8c68438101419f5421 Mon Sep 17 00:00:00 2001 From: cgreysongaito Date: Thu, 7 Jun 2018 14:18:18 -0400 Subject: [PATCH 4/6] edited README.md and added note about same authors and same year articles --- ELE/README.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/ELE/README.md b/ELE/README.md index bb35095..3344ee6 100644 --- a/ELE/README.md +++ b/ELE/README.md @@ -4,26 +4,29 @@ 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. +- 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 +- Include in the preamble of your .tex file \usepackage[citestyle=ele, bibstyle=ele, backend=biber, bibencoding=utf8]{biblatex} +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. +- 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 \ No newline at end of file +- 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 \ No newline at end of file From aab0cc0b6382e037bae34c7d50c7dc17f031754c Mon Sep 17 00:00:00 2001 From: cgreysongaito Date: Tue, 3 Jul 2018 10:36:06 -0400 Subject: [PATCH 5/6] changed sortcites=ynt to sorting=ynt in ele.cbx. to ensure setting for chronological order correct --- ELE/ele.cbx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ELE/ele.cbx b/ELE/ele.cbx index ce45c3b..6cce690 100644 --- a/ELE/ele.cbx +++ b/ELE/ele.cbx @@ -3,7 +3,7 @@ \RequireCitationStyle{authoryear-comp} \ExecuteBibliographyOptions{ -sortcites=ynt, +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 From 208910add0316e7bbf67fa45b96d395db4b082d3 Mon Sep 17 00:00:00 2001 From: cgreysongaito Date: Tue, 3 Jul 2018 16:05:06 -0400 Subject: [PATCH 6/6] fixed chronological sorting of citations in in-text citations but alphabetical sorting in bibliography. --- ELE/README.md | 9 ++++++++- ELE/ele.bbx | 1 - ELE/ele.cbx | 5 +++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ELE/README.md b/ELE/README.md index 3344ee6..170041a 100644 --- a/ELE/README.md +++ b/ELE/README.md @@ -1,4 +1,4 @@ -[Ecology Letters](http://bit.ly/IdEIY5) Citation and Bibliography Biblatex README +[Ecology Letters](http://bit.ly/IdEIY5) Citation and Bibliography Biblatex README ============= Style originally coded by Timothée Poisot (GitHub - tpoisot) @@ -13,6 +13,13 @@ 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 diff --git a/ELE/ele.bbx b/ELE/ele.bbx index bf0d433..6927499 100644 --- a/ELE/ele.bbx +++ b/ELE/ele.bbx @@ -19,7 +19,6 @@ url = false , dashed = false , giveninits = true , - sorting = nyt } %% Only the year is important diff --git a/ELE/ele.cbx b/ELE/ele.cbx index 6cce690..41af7b7 100644 --- a/ELE/ele.cbx +++ b/ELE/ele.cbx @@ -3,8 +3,9 @@ \RequireCitationStyle{authoryear-comp} \ExecuteBibliographyOptions{ -sorting=ynt, -uniquename = false, +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