BibTeX, biblatex and biberfancyref / bibtex: "&" instead of "and"

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
eisegal
Posts: 10
Joined: Fri Nov 02, 2012 12:40 pm

fancyref / bibtex: "&" instead of "and"

Post by eisegal »

Hello all,

I'm having a problem concerning the referencing with bibtex. using the bibliographystyle i get the desired output if there is one author Name (year) or three or more authors Name et al. (year)

but for two authors i have the problem, that here is a & between the two authors instead of a simple "and". could someone tell me how to change this?

i've been looking for a solution for hours now...

greetings

Code: Select all

\documentclass[12pt,oneside,a4paper,english]{article}

%packages
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{framed}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[english]{fancyref}
\usepackage{fancyhdr}
\usepackage{enumerate}
\usepackage{amsmath}
\usepackage{geometry}
\usepackage{hyperref}
\usepackage{cite}
\usepackage{natbib}

\begin{document}

\pagestyle{fancy}

\subsection{Model}
Hier wird später ein Text verfasst gemäss \cite{JT:05}. Wir warten noch auf eine definitive Antwort \cite{Dia:83}, welche wir aus blabla \cite{Bry:80}.

\bibliographystyle{authordate1}
\bibliography{myBib.bib}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

fancyref / bibtex: "&" instead of "and"

Post by cgnieder »

Hi eisegal,

Welcome to the LaTeX community!

Next time please consider giving us a complete Infominimal working example (MWE)! We don't have your bib file for example. So in order to help you (when we don't know the answer right away) we now need to build an MWE for ourselves. This is tedious, boring and (not in this case but in others) may not reveal the source of the problem. The probability of getting an answer is much higher with a proper MWE.

To your problem: this has nothing todo with fancyref. The ampersand is hardwired into the authordate1 style. The easiest way to change the appearence is to redefine \&:

Code: Select all

\documentclass{article}

%packages
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{natbib}

% save ampersand for other uses:
\let\ampersand\&
% let \& to give ``und''
\renewcommand*\&{und}

% the bib file for the MWE:
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{author12,
  author  = {A. Author and B. Buthor},
  title   = {Alpha},
  journal = {A journal},
  year    = {2012}
}
@article{buthor12,
  author  = {B. Buthor},
  title   = {Beta},
  journal = {B journal},
  year    = {2012}
}
@article{cuthor12,
  author  = {C. Cuthor and A. Author},
  title   = {Gamma},
  journal = {C journal},
  year    = {2012}
}
\end{filecontents}

\begin{document}

Hier wird später ein Text verfasst gemäss \cite{author12}. Wir warten noch auf
eine definitive Antwort \cite{buthor12}, welche wir aus blabla \cite{cuthor12}.

\bibliographystyle{authordate1}
\bibliography{\jobname.bib}

\end{document}
Regards
site moderator & package author
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

fancyref / bibtex: "&" instead of "and"

Post by CrazyHorse »

eisegal wrote: I'm having a problem concerning the referencing with bibtex. using the bibliographystyle i get the desired output if there is one author Name (year) or three or more authors Name et al. (year)

but for two authors i have the problem, that here is a & between the two authors instead of a simple "and". could someone tell me how to change this?

Code: Select all

...
\subsection{Model}
Hier wird später ein Text verfasst gemäss \cite{JT:05}. Wir warten noch auf eine definitive Antwort \cite{Dia:83}, welche wir aus blabla \cite{Bry:80}.

\bibliographystyle{authordate1}
\bibliography{myBib.bib}

\end{document}
use:

Code: Select all

\begingroup
\renewcommand*\&{und}
\bibliographystyle{authordate1}
\bibliography{\jobname.bib}
\endgroup
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Re: fancyref / bibtex: "&" instead of "and"

Post by cgnieder »

Won't this change the ampersand only in the bibliography but not in the citations as well?
site moderator & package author
eisegal
Posts: 10
Joined: Fri Nov 02, 2012 12:40 pm

fancyref / bibtex: "&" instead of "and"

Post by eisegal »

I know the thing about MWE but i thought it would be too long also adding the bib-file.

with your solution it works well but then every \& is redefined... is there a solution without \bibliographystyle{authordate1} using fancyref?
Last edited by cgnieder on Sat Nov 03, 2012 1:02 pm, edited 2 times in total.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

fancyref / bibtex: "&" instead of "and"

Post by cgnieder »

eisegal wrote:with your solution it works well but then every \& is redefined... is there a solution without \bibliographystyle{authordate1} using fancyref?
I'm going to repeat myself: fancyref has nothing to do with this. you can use it or not. It won't affect the bibliography.

Regards
site moderator & package author
eisegal
Posts: 10
Joined: Fri Nov 02, 2012 12:40 pm

fancyref / bibtex: "&" instead of "and"

Post by eisegal »

cgnieder wrote:
eisegal wrote:with your solution it works well but then every \& is redefined... is there a solution without \bibliographystyle{authordate1} using fancyref?
I'm going to repeat myself: fancyref has nothing to do with this. you can use it or not. It won't affect the bibliography.

Regards
as you've already said, it has nothing to do with fancyref. this solution is ok but i hope that there is one, where you have another bibliographystyle and don't have to redefine the ampersand.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

fancyref / bibtex: "&" instead of "and"

Post by cgnieder »

There are lots of other styles. The solution (and if a definition is necessary or not) depends on your needs for the style. Have you read the natbib manual for available styles with natbib?

Regards
site moderator & package author
eisegal
Posts: 10
Joined: Fri Nov 02, 2012 12:40 pm

Re: fancyref / bibtex: "&" instead of "and"

Post by eisegal »

yes i did. we'll, thank you for your help ;)
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

fancyref / bibtex: "&" instead of "and"

Post by cgnieder »

And none of the other styles fit your needs? Would switching to biblatex be a choice?

Regards
site moderator & package author
Post Reply