
Gostaria de colocar parênteses em torno de todas as informações do editor em uma referência de coleção usando o biblatex. Minha referência atual aparece como a seguir:
Gotelli, NJ e Colwell, RK (2010). Estimando a riqueza de espécies. Em:Diversidade biológica: fronteiras na medição e avaliação. (eds) Magurran, AE & McGill, BJ Oxford University Press, Oxford, Reino Unido, 39–54.
No entanto, gostaria que esta referência aparecesse com todas as informações do editor entre parênteses, seguida de um ponto final:
Gotelli, NJ e Colwell, RK (2010). Estimando a riqueza de espécies. Em:Diversidade biológica: fronteiras na medição e avaliação. (eds Magurran, AE & McGill, BJ). Oxford University Press, Oxford, Reino Unido, 39–54.
Minha solução atual é usar \xpatchbibmacro{byeditor+othersstrg}{\printtext}{\printtext[parens]}{}{}, mas esta solução apenas coloca a abreviatura de editor entre parênteses.
Meu MWE é o seguinte:
\documentclass[12pt,Bold]{report}
\usepackage[backend=bibtex,url=false, isbn=false, doi=false, style=authoryear,citestyle=authoryear, sorting=nyt,dashed=FALSE, maxcitenames=2, maxbibnames=100]{biblatex}
\usepackage{xpatch}
\usepackage{filecontents}
%Last names first in bibliography
\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}
%italics for book titles
\DeclareFieldFormat[incollection]{title}{#1}
\DeclareFieldFormat[incollection]{booktitle}{\textit{#1}}
\DeclareFieldFormat[article,incollection]{pages}{#1}
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
%\setunit*{\adddot}% DELETED
% \setunit*{\addcolon}% ADDED
% \printfield{number}%
%\setunit{\space}%
\printfield{eid}}
\renewbibmacro*{name:andothers}{% Based on name:andothers from biblatex.def
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
}
{\ifnumgreater{\value{liststop}}{1}
{\finalandcomma}
{}%
\andothersdelim\bibstring[\emph]{andothers}}
{}}
\renewcommand*{\finalnamedelim}{%
\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
\addspace\&\space}
%change order and punctuation between publisher and location
\renewbibmacro*{publisher+location+date}{%
\printlist{publisher}%
\iflistundef{location}
{\setunit*{\addcomma\space}}
{\setunit*{\addcomma\space}}%
\printlist{location}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
%change editor abbrevation
\DefineBibliographyStrings{english}{%
byeditor = {\lowercase{ed}},%
byeditor = {\lowercase{eds}},%
}
\xpatchbibmacro{byeditor+othersstrg}{\printtext}{\printtext[parens]}{}{}
\begin{filecontents*}{editor.mwe.bib}
@incollection{magurran_estimating_2010,
address = {Oxford, United Kingdom},
title = {Estimating species richness},
shorttitle = {Estimating species richness},
booktitle = {Biological diversity: frontiers in measurement and assessment},
publisher = {Oxford University Press},
author = {Gotelli, N.J. and Colwell, R.K.},
editor = {Magurran, A.E. and McGill, B.J.},
year = {2010},
pages = {39--54},
}
\end{filecontents*}
\addbibresource{editor.mwe.bib}
\begin{document}
\parencite{magurran_estimating_2010}
\printbibliography
\end{document}
Qualquer ajuda seria muito apreciada, pois estou procurando uma solução há algumas semanas.
Responder1
Eu sugeriria uma redefinição nos moldes de
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{\printtext[parens]{\usebibmacro{byeditor+othersstrg}%
\setunit{\addspace}%
\printnames[byeditor]{editor}}%
\clearname{editor}%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}}
Onde adicionamos uma \printtext[parens]
impressão completa dos editores. Pode haver algumas desvantagens se você também tiver editora
s ou translators
, etc.
MWE
\documentclass{article}
\usepackage[backend=bibtex,url=false, isbn=false, doi=false, style=authoryear,citestyle=authoryear, sorting=nyt,dashed=FALSE, maxcitenames=2, maxbibnames=100]{biblatex}
\usepackage{xpatch}
\usepackage{filecontents}
%Last names first in bibliography
\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}
%italics for book titles
\DeclareFieldFormat[incollection]{title}{#1}
\DeclareFieldFormat[incollection]{booktitle}{\textit{#1}}
\DeclareFieldFormat[article,incollection]{pages}{#1}
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
%\setunit*{\adddot}% DELETED
% \setunit*{\addcolon}% ADDED
% \printfield{number}%
%\setunit{\space}%
\printfield{eid}}
\renewbibmacro*{name:andothers}{% Based on name:andothers from biblatex.def
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
}
{\ifnumgreater{\value{liststop}}{1}
{\finalandcomma}
{}%
\andothersdelim\bibstring[\emph]{andothers}}
{}}
\renewcommand*{\finalnamedelim}{%
\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
\addspace\&\space}
%change order and punctuation between publisher and location
\renewbibmacro*{publisher+location+date}{%
\printlist{publisher}%
\iflistundef{location}
{\setunit*{\addcomma\space}}
{\setunit*{\addcomma\space}}%
\printlist{location}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
%change editor abbrevation
\DefineBibliographyStrings{english}{%
byeditor = {\lowercase{ed}},%
byeditor = {\lowercase{eds}},%
}
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{\printtext[parens]{\usebibmacro{byeditor+othersstrg}%
\setunit{\addspace}%
\printnames[byeditor]{editor}}%
\clearname{editor}%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}}
\begin{filecontents*}{\jobname.bib}
@incollection{magurran_estimating_2010,
address = {Oxford, United Kingdom},
title = {Estimating species richness},
shorttitle = {Estimating species richness},
booktitle = {Biological diversity: frontiers in measurement and assessment},
publisher = {Oxford University Press},
author = {Gotelli, N.J. and Colwell, R.K.},
editor = {Magurran, A.E. and McGill, B.J.},
year = {2010},
pages = {39--54},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\parencite{magurran_estimating_2010}
\printbibliography
\end{document}