1

In the answer to the post Modify the last-name first-name separator in biblatex's authortitle it was shown how to customize formattting author's name.

I need a somewhat different formatting, namely "Fox P., R. Rabbit" instead of "Fox P, R. Rabbit" (with the dot before comma as required by national standards of my country). How to modifiy the following script borrowed from the above cited post in order to add a dot after "Fox P" before "," and to keep it working with any number of authors? I meean that "Fox P." sould not transform to "Fox P.." in case of single author.

\RequirePackage{filecontents}
\begin{filecontents}{sample.bib}
@ARTICLE{liu:11,
  author = {Peter Fox and Richard Rabbit and Franc Bird},
  title = {Animals are the better humans},
  journal = {Horse and Hound},
  year = {2011},
  volume = {10},
  pages = {11--15}
}
\end{filecontents}

\documentclass[a4paper,ngerman]{scrartcl}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[style=authortitle,firstinits=true]{biblatex}
% =================================
% biblatex modification
\makeatletter
\def\MKbibnamefirst#1{\expandafter\mkbibnamefirst@i#1..\@nil}
\def\mkbibnamefirst@i#1.#2.#3\@nil{#1}
\renewbibmacro*{name:last-first}[4]{%
  \ifuseprefix
    {\usebibmacro{name:delim}{#3#1}%
     \usebibmacro{name:hook}{#3#1}%
     \ifblank{#3}{}{%
       \ifcapital
         {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
     {\mkbibnameprefix{#3}}%
       \ifpunctmark{'}{}{\addhighpenspace}}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\addlowpenspace\mkbibnameaffix{#4}\isdot}%
     \ifblank{#2}{}{\addlowpenspace\mkbibnamefirst{#2}}}
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\addlowpenspace\mkbibnameaffix{#4}\isdot}%
%     \ifblank{#2#3}{}{\addcomma}%
     \ifblank{#2}{}{\addlowpenspace\MKbibnamefirst{#2}}%
%     \ifblank{#3}{}{\addlowpenspace\mkbibnameprefix{#3}\isdot}
}}
\makeatother
% =================================

\bibliography{sample}
\begin{document}
   Samplecite~\cite{liu:11}.
   \printbibliography
\end{document}
3
  • I'm very confused. Isn't the format you're asking for here exactly the same as the one that the questioner didn't want in the question you refer to? So shouldn't you just comment out all of the extra code above and you will get the format you are asking for? Or am I missing something?
    – Alan Munn
    Mar 4, 2011 at 6:04
  • @Alan Munn: In the post referred to it was asked how to delete first comma in the string "Fox, P., R. Rabbit und F. Bird" after "Fox". Suggested modification deletes also dot after "P" producing "Fox P, R. Rabbit und F. Bird". Perhaps, that is correct for some standars but I need "Fox P., R. Rabbit und F. Bird". Mar 4, 2011 at 12:58
  • 1
    Yes, I understood the original question. But the format you want is the standard format, so you don't need any extra code to do it. I've added this as an answer now; if it doesn't solve your problem, then you need to clarify your question.
    – Alan Munn
    Mar 4, 2011 at 13:21

1 Answer 1

3

The solution is to delete all of the extra code in the example in the question you refer to.

\RequirePackage{filecontents}
\begin{filecontents}{sample.bib}
@ARTICLE{liu:11,
  author = {Peter Fox and Richard Rabbit and Franc Bird},
  title = {Animals are the better humans},
  journal = {Horse and Hound},
  year = {2011},
  volume = {10},
  pages = {11--15}
}
\end{filecontents}

\documentclass[a4paper,ngerman]{scrartcl}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[style=authortitle,firstinits=true]{biblatex}

\bibliography{sample,newmainjournals}
\begin{document}
   Samplecite~\cite{liu:11}.
   \printbibliography
\end{document}

result of code

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .
https://tex.stackexchange.com/questions/12614/biblatex-the-last-name-first-name-separator-authortitle
tex.stackexchange.com
CC-MAIN-2024-22
150658
application/http; msgtype=response
sha1:5S4MU347MVC5TUQIHEGLMN7GFP5OKR46
<urn:uuid:e39750f4-fcd7-4dd0-b862-f14536a187c5>
2024-05-26T18:08:13Z
172.64.144.30
text/html
sha1:UK3IQLVLWXDABAKO3UXR2BV6AUPAZELB
<urn:uuid:cf545138-ba02-4aae-b7e5-3d1b74ac73d2>
https://tex.stackexchange.com/questions/12614/biblatex-the-last-name-first-name-separator-authortitle
response
<urn:uuid:59650e38-eac4-4060-8c80-29a0baacee52>
isPartOf: CC-MAIN-2024-22
publisher: Common Crawl
description: Wide crawl of the web for May 2024
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-33
software: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/