1

I had tried to MWE in enter link description here

How to make

In Kissane, D. W.,Bultz, B. D., Butow, P. N., Bylund, C. L., Noble, S. & Wilkinson, S.

to

In: D. W. Kissane, B. D. Bultz, P. N. Butow, C. L. Bylund, S. Noble and S. Wilkinson,

I had tried \DeclareNameAlias{sortname}{family-given} but that is for the chapter editor name, not the book editor.

Basially, from:

enter image description here

to: enter image description here

My MWE:

\documentclass{article}
\usepackage{xpatch}
% \usepackage[style = authoryear-comp, maxnames = 99]{biblatex}

\usepackage[backend=biber, 
% style=authoryear, 
 style=authoryear-comp,
% citestyle=authoryear, 
dashed=false,
maxcitenames=2,
maxbibnames=99,
giveninits,
uniquename=init]{biblatex}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{csquotes}

\usepackage[unicode,colorlinks,citecolor=blue]{hyperref}

\renewcommand*{\finalnamedelim}{\addspace\&\space}
\renewcommand*{\intitlepunct}{\space}
\DeclareFieldFormat[article, incollection, unpublished]{pages}{#1}
\DeclareFieldFormat[article, incollection, unpublished]{title}{#1}
\renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon}{\addperiod\addspace}}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}

@incollection{lennon1965,
  author    = {John Lennon},
  booktitle = {A book with articles},
  editor    = {Paul McCartney and John Lennon and George Harrison and Richard Starkey},
  title     = {This is my article in this book},
  year      = {1965},
  location  = {Liverpool},
  pages     = {65--87},
  publisher = {Cavern Club},
}

@incollection{deborah123,
  author      = "Deborah Lewis and Marie O'Boyle-Duggan and Susan Poultney",
  title       = "Communication skills education and training in pre-registeration BSc Nursing",
  editor      = "David W. Kissane and Barry D. Bultz and Phyllis N. Butow and Carma L. Bylund and Simon Noble and Susie Wilkinson",
  booktitle   = "Oxford Textbook of Communication in Oncology and Palliative Care",
  publisher   = "Oxford University Press",
  address     = "Oxford",
  year        = 2017,
  pages       = "149-154",
  Edition = "2nd edn"
}

\end{filecontents*}
\addbibresource{\jobname.bib}
\DeclareNameAlias{sortname}{family-given}


\DeclareNameAlias{editorin}{last-first}

\newbibmacro*{byeditor:in}{%
  \ifnameundef{editor}
    {}
    {\printnames[editorin]{editor}%
     \addspace\bibsentence%
     \mkbibparens{\usebibmacro{editorstrg}}%
     \clearname{editor}%
     \printunit{\addcomma\space}}}

\xpatchbibdriver{inbook}
  {\usebibmacro{in:}%
   \usebibmacro{bybookauthor}%
   \newunit\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{bybookauthor}%
   \newunit\newblock
   \usebibmacro{byeditor:in}%
   \newunit\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {}{}

\xpatchbibdriver{incollection}
  {\usebibmacro{in:}%
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{byeditor:in}%
   \setunit{\labelnamepunct}\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor}}
  {}{}

\xpatchbibdriver{inproceedings}
  {\usebibmacro{in:}%
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{event+venue+date}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{byeditor:in}%
   \setunit{\labelnamepunct}\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{event+venue+date}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {}{}



\begin{document}
\nocite{*}


book done \parencite{deborah123}.

\printbibliography

\end{document}
aan
  • 2,663
  • Please note that it is preferred to ask only one question per question. See https://tex.meta.stackexchange.com/q/7425/35864. The three sub-questions have little to do with each other and can easily split into separate questions. Separate questions increase the chance that you get a useful and answer and make the question more useful for people with a similar problem. – moewe Sep 20 '19 at 12:34
  • @moewe. Noted. I will edit my question now. Thanks for informing me. – aan Sep 20 '19 at 12:36

1 Answers1

4

For future readers of this question, please note that biblatex-ext offers an easier solution to moving around names that does not involve having to patch entry drivers. See the already linked Move names of editors followed by (Ed./Eds.) and a comma before title in biblatex.

The name format of the editors after the in is controlled by editorin, you just need

 \DeclareNameAlias{editorin}{given-family}

In total

\documentclass{article}
\usepackage{xpatch}
% \usepackage[style = authoryear-comp, maxnames = 99]{biblatex}

\usepackage[backend=biber, 
% style=authoryear, 
 style=authoryear-comp,
% citestyle=authoryear, 
dashed=false,
maxcitenames=2,
maxbibnames=99,
giveninits,
uniquename=init]{biblatex}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{csquotes}

\usepackage[unicode,colorlinks,citecolor=blue]{hyperref}

\renewcommand*{\finalnamedelim}{\addspace\&\space}
\renewcommand*{\intitlepunct}{\space}
\DeclareFieldFormat[article, incollection, unpublished]{pages}{#1}
\DeclareFieldFormat[article, incollection, unpublished]{title}{#1}
\renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon}{\addperiod\addspace}}


\DeclareNameAlias{sortname}{family-given}


\DeclareNameAlias{editorin}{given-family}

\newbibmacro*{byeditor:in}{%
  \ifnameundef{editor}
    {}
    {\printnames[editorin]{editor}%
     \addspace\bibsentence%
     \mkbibparens{\usebibmacro{editorstrg}}%
     \clearname{editor}%
     \printunit{\addcomma\space}}}

\xpatchbibdriver{inbook}
  {\usebibmacro{in:}%
   \usebibmacro{bybookauthor}%
   \newunit\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{bybookauthor}%
   \newunit\newblock
   \usebibmacro{byeditor:in}%
   \newunit\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {}{}

\xpatchbibdriver{incollection}
  {\usebibmacro{in:}%
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{byeditor:in}%
   \setunit{\labelnamepunct}\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor}}
  {}{}

\xpatchbibdriver{inproceedings}
  {\usebibmacro{in:}%
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{event+venue+date}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{byeditor:in}%
   \setunit{\labelnamepunct}\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{event+venue+date}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {}{}


\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@incollection{lennon1965,
  author    = {John Lennon},
  booktitle = {A book with articles},
  editor    = {Paul McCartney and John Lennon and George Harrison and Richard Starkey},
  title     = {This is my article in this book},
  year      = {1965},
  location  = {Liverpool},
  pages     = {65--87},
  publisher = {Cavern Club},
}
@incollection{deborah123,
  author      = "Deborah Lewis and Marie O'Boyle-Duggan and Susan Poultney",
  title       = "Communication skills education and training in pre-registeration BSc Nursing",
  editor      = "David W. Kissane and Barry D. Bultz and Phyllis N. Butow and Carma L. Bylund and Simon Noble and Susie Wilkinson",
  booktitle   = "Oxford Textbook of Communication in Oncology and Palliative Care",
  publisher   = "Oxford University Press",
  address     = "Oxford",
  year        = 2017,
  pages       = "149-154",
  Edition = "2nd edn"
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}

book done \parencite{deborah123}.

\printbibliography
\end{document}

Lewis, D., O’Boyle-Duggan, M. & Poultney, S. (2017). Communication skills education and training in pre-registeration BSc Nursing. In D. W. Kissane, B. D. Bultz, P. N. Butow, C. L. Bylund, S. Noble & S. Wilkinson (Eds.), Oxford Textbook of Communication in Oncology and Palliative Care. 2nd edn. Oxford: Oxford University Press. 149–154.

The relevant name format for biblatex-ext would be called ineditor and not editorin.

moewe
  • 175,683
  • thanks. I should look at \DeclareNameAlias{editorin}{given-family}. May I know what is the different between given-family and family-given? – aan Sep 20 '19 at 13:21
  • Thanks. I ask the wrong question above. I found the answer. Thanks. – aan Sep 20 '19 at 13:36