Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
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 '11 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". –  Igor Kotelnikov Mar 4 '11 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 '11 at 13:21
add comment

1 Answer 1

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.