2

Is there a way to automatically initialize the second name of an author? In my example: not "Peter Eli" but "Peter E.". (Obviously I know I can just initialize in the bibtex file).

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@article{gordon2004,
  title = {Continental divide: {{Ernst Cassirer}} and {{Martin Heidegger}} at {{Davos}}, 1929 -- an allegory of intellectual history},
  author = {Gordon, Peter Eli},
  date = {2004},
  journaltitle = {Modern Intellectual History},
  shortjournal = {Modern Intellectual History},
  volume = {1},
  number = {2},
  pages = {219--248},
  publisher = {{Cambridge University Press}},
  issn = {1479-2451}
}
@article{gordon2005,
  title = {Myth and modernity: {{Cassirer}}'s critique of {{Heidegger}}},
  author = {Gordon, Peter Eli},
  date = {2005},
  journaltitle = {New German Critique},
  number = {94},
  pages = {127--168}
}
\end{filecontents}

\documentclass{book} \usepackage[style=philosophy-verbose, maxbibnames=2, minbibnames=1, maxsortnames=2, scauthorsbib=false, doi=false, isbn=false,url=false,eprint=false, citepages=suppress]{biblatex} \bibliography{Mybib.bib} \begin{document} \cite{gordon2004} e \cite{gordon2005}. \printbibliography \end{document}

Haim
  • 487
  • giveninits=true Will produce "Gordon, P. E." but I am afraid that initialize except the first name need a deep hack. Check if this answer help. – Fran Aug 10 '23 at 07:34
  • Also related: https://tex.stackexchange.com/questions/131869/biblatex-how-to-abbreviate-names-in-citations-only-get-say-first-letters-of – Fran Aug 10 '23 at 07:42
  • Understood. I guess for the time being I will have to abbreviate in the bib file if I want to abbreviate only one name. Thanks! – Haim Aug 10 '23 at 10:25
  • biblatex (like BibTeX) has no concept of a middle name. First and middle names are all treated as given names and can only all be abbreviated or all given in full (as-is). There are tricks like https://tex.stackexchange.com/q/187684/35864, https://tex.stackexchange.com/q/126061/35864 and linked discussions, but they all come with downsides. In theory you could use the extended name format and define a new middle name, but that implies heavy changes to both the input in the .bib file as well as all name formatting macros on the LaTeX side. – moewe Aug 12 '23 at 09:43

1 Answers1

2

biblatex and biber allow you to customise the data model name parts to add whichever name parts you need. So, to implement a real middle name so that you can control its initials properly:

% First add middle name as a real name part in the data model
\begin{filecontents}[force]{\jobname.dbx}
\DeclareDatamodelConstant[type=list]{nameparts}{prefix,family,suffix,given,middle}
\end{filecontents}

% Use the biber extended name format to specify the middle name explicltly \begin{filecontents}[force]{\jobname.bib} @article{gordon2004, title = {Continental divide: {{Ernst Cassirer}} and {{Martin Heidegger}} at {{Davos}}, 1929 -- an allegory of intellectual history}, author = {family=Gordon, given=Peter, middle=Eli}, date = {2004}, journaltitle = {Modern Intellectual History}, shortjournal = {Modern Intellectual History}, volume = {1}, number = {2}, pages = {219--248}, publisher = {{Cambridge University Press}}, issn = {1479-2451} } @article{gordon2005, title = {Myth and modernity: {{Cassirer}}'s critique of {{Heidegger}}}, author = {family=Gordon, given=Peter, middle=Eli}, date = {2005}, journaltitle = {New German Critique}, number = {94}, pages = {127--168} } \end{filecontents}

\documentclass{book} % Adding a namepart to the datamodel automatically creates the relevant % <part>inits package option: \usepackage[style=philosophy-verbose, maxbibnames=2, minbibnames=1, maxsortnames=2, scauthorsbib=false, doi=false, isbn=false,url=false,eprint=false, citepages=suppress,datamodel=\jobname,middleinits=true]{biblatex} \addbibresource{\jobname.bib}

% Expand the name printing macro so that middle name is now a separate argument \newcommand{\mkbibcompletenamegivenmiddlefamily}{\mkbibcompletename} \newbibmacro*{name:given-middle-family}[5]{% \usebibmacro{name:delim}{#2#4#1}% \usebibmacro{name:hook}{#2#4#1}% \mkbibcompletenamegivenmiddlefamily{% \ifdefvoid{#2} {} {\mkbibnamegiven{#2}\isdot\bibnamedelimd}% \ifdefvoid{#3} {} {\mkbibnamemiddle{#3}\isdot\bibnamedelimd}% \ifdefvoid{#4} {} {\mkbibnameprefix{#4}\isdot \ifprefchar {} {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}% \mkbibnamefamily{#1}\isdot \ifdefvoid{#5}{}{\bibnamedelimd\mkbibnamesuffix{#5}\isdot}}}

% Adjust the name format to pass the correct middle name format depending % on package options. \if<namepart>inits is automatically created when % adding a name part to the datamodel. \DeclareNameAlias{author}{given-middle-family} \DeclareNameFormat{given-middle-family}{% \ifgiveninits {\ifmiddleinits {\usebibmacro{name:given-middle-family} {\namepartfamily} {\namepartgiveni} {\namepartmiddlei} {\namepartprefix} {\namepartsuffix}} {\usebibmacro{name:given-middle-family} {\namepartfamily} {\namepartgiveni} {\namepartmiddle} {\namepartprefix} {\namepartsuffix}} } {\ifmiddleinits {\usebibmacro{name:given-middle-family} {\namepartfamily} {\namepartgiven} {\namepartmiddlei} {\namepartprefix} {\namepartsuffix}} {\usebibmacro{name:given-middle-family} {\namepartfamily} {\namepartgiven} {\namepartmiddle} {\namepartprefix} {\namepartsuffix}}}% \usebibmacro{name:andothers}}

\begin{document} \cite{gordon2004}\ \cite{gordon2005} \printbibliography \end{document}

enter image description here

PLK
  • 22,776