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.

For LaTeX citations, I use biblatex/babel. The journal for which I'm writing requires a bibliography with authors formatted as follows:

Guyton AC, Hall JE.

That is, with no "and" before the last author. I did manage this (see example below), however, in \textcite, "and" is also gone now...

Questions

  1. Is it possible to remove "and" in the bibliography, but leave it in \textcite.
  2. Previously, I used \textcite together with the authoryear style. Using a solution also posted on this website, I was able to put multiple sources in one \textcite, and biblatex would place commas and an "and" at the appropriate places. Is it possible to adapt this solution for numeric citation styles?
  3. Is there a way to make all authors (and the commas in between them) bold in the bibliography?
\documentclass[a4paper]{article}
\usepackage[american]{babel}
\usepackage[
  terseinits=true,
  firstinits=true,
  backend=biber,
  style=numeric
]{biblatex}

%Put initials after names...
\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}    

%Remove "and" before last name. However, this also removes "and" in a textcite...
\renewcommand*{\finalnamedelim}{\addcomma\space}

%I also removed the commas between last names and initials (http://tex.stackexchange.com/questions/17583/biblatex-remove-commas-between-last-and-first-names-in-bibliography). This is however not needed for a minimum working example.

%Generate a test bibliography
\usepackage{filecontents}
\begin{filecontents*}{database.bib}
@BOOK{Guyton2006,
  title = {Textbook of Medical Physiology},
  publisher = {W.B. Saunders},
  year = {2006},
  author = {Arthur C. Guyton and John E. Hall},
  address = {Philadelphia, Pennsylvania},
  edition = {11th Edition}
}
\end{filecontents*}

\bibliography{database.bib}

%Some biber compatibility things (from http://tex.stackexchange.com/questions/21711/setting-up-winedt-6-0-and-miktex-to-run-biblatex-and-biber)...
\makeatletter
    \providecommand\bibstyle@faked{}
    \providecommand\bibdata@faked{}
    \AtBeginDocument{%
    \immediate\write\@mainaux{\noexpand\bibstyle@faked}%
    \immediate\write\@mainaux{\noexpand\bibdata@faked}}
\makeatother

\begin{document}
The following sentence contains a textcite example. \textcite{Guyton2006} wrote a comprehensive textbook.
\printbibliography
\end{document}
share|improve this question

3 Answers 3

up vote 3 down vote accepted

Ad question 1: Simply use

\AtBeginBibliography{%
  \renewcommand*{\finalnamedelim}{\addcomma\space}%
}
share|improve this answer

Question 2 can be resolved by upgrading to the latest biblatex release.

Question 1 is resolved in part by new biblatex features, but to ensure use of the and string in \citeauthor you can incorporate the \ifcurrentname test in a redefinition of \finalnamedelim.

For question 3 note that the sort name list in the bibliography corresponds to either author, editor or translator. Bold sort name lists can be obtain by patching the corresponding macros with commands from the xpatch package.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=numeric,terseinits,firstinits]{biblatex}
\usepackage[colorlinks]{hyperref}
\usepackage{xpatch}

% All names reversed
\DeclareNameAlias{default}{last-first}
\DeclareNameAlias{sortname}{last-first}

% Set sort name list in boldface
\AtBeginBibliography{%
  \renewcommand*{\labelnamepunct}{\textbf{\newunitpunct}}%
  \xpretobibmacro{author}{\bgroup\bfseries}{}{}%
  \xapptobibmacro{author}{\egroup}{}{}%
  \xpretobibmacro{editor+others}{\bgroup\bfseries}{}{}%
  \xapptobibmacro{editor+others}{\egroup\clearname{editor}}{}{}%
  \xpretobibmacro{translator+others}{\bgroup\bfseries}{}{}%
  \xapptobibmacro{translator+others}{\egroup\clearname{translator}}{}{}}

% Omit commas in reversed names
\renewcommand*{\revsdnamepunct}{}

% Omit "and" from \finalnamedelim except in name labels
\renewcommand*{\finalnamedelim}{%
  \ifcurrentname{labelname}
    {\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
     \addspace\bibstring{and}\space}
    {\addcomma\space}}

\addbibresource{biblatex-examples.bib}
\begin{document}
\null\vfill\noindent
Filler text.\footfullcite{companion}
\textcite{companion,coleridge,gaonkar} show that...
\textcite{coleridge,aristotle:poetics,aristotle:rhetoric} show that...
\citeauthor{companion} show that...
\printbibliography
\end{document}

enter image description here

share|improve this answer

Add this to your preamble:

% delimiter switching for cite and textcite
\let\olddelim\finalnamedelim
\let\oldtextcite\textcite

\newcommand{\switchdelim}[1]{\renewcommand*{\finalnamedelim}{#1}}

% set up the default
\switchdelim{\addcomma\space}

% wrap the textcite command to reversibly switch the delimiter
\renewcommand{\textcite}[1]{%
{%
\renewcommand{\textbf}{}% suppress bold faced names in the running text
\switchdelim{\olddelim}%
\oldtextcite{#1}%
\switchdelim{\addcomma\space}%
}%
}

% format the author names
\renewcommand{\mkbibnamelast}{\textbf}
\renewcommand{\mkbibnamefirst}{\textbf}
\renewcommand{\mkbibnameprefix}{\textbf}
\renewcommand{\mkbibnameaffix}{\textbf}

% sneak a textbf into the definition of addcomma. This may be
% too much of a low-level hack, I hope there is a cleaner 
% way for doing this, but it seems to work.  
\makeatletter 
\protected\def\blx@imc@addcomma{\textbf{\blx@addpunct{comma}}}
\makeatother

That gives:

enter image description here

share|improve this answer
1  
There are a few issues with this solution. The redefinition of \textcite doesn't support pre- and postnotes or citation lists. The change to \addcomma sets the punctuation in boldface everywhere, not just in the name list. –  Audrey Jan 18 '12 at 19:49
    
@Audrey - I was actually expecting that the \addcomma hack would affect all commas in the bibliography, but at least in this example it actually doesn't. However, I agree that your solution is preferable, since it avoids questionable hacks. –  Michael Palmer Jan 18 '12 at 22:50
    
I think the comma before the year is bold. Bold commas would also appear in citations. In any case I'd rather see the commas left as-is. Given that, your solution to Q3 is preferable. –  Audrey Jan 19 '12 at 3:44

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.