# Author-year bibliography in bilingual text

I am writing a thesis where the introduction is in French while the chapters are in English. I would like to cite some papers in both the introduction and the chapters, with an appropriate preposition. For example, I would like to cite "paper1" by author1 & author2 published in year1, such that in the in introduction it yields "author1 et author2 (year)" and in the chapter "author1 and author2" (year), with both references corresponding to one entry in the reference page at the end (where it does not matter whether it is "et" or "and"). Is it possible? I am using natbib and econ-aer.bst for the bibliography.

I have tried using:

\newcommand*{\andname}{et }

\newcommand*{\liaisonname}{et }


and replacing "and" by \andname in FUNCTION {bst.and} & FUNCTION {bst.ands}, & "and" by \liaisonname in FUNCTION {bst.cite.and} & FUNCTION {bst.cite.ands} in econ-aer.bst. This enables to choose whether "et" or "and" is used, and to have a different preposition in the text and reference page, but it does not yield what I am looking for.

Here is a link to the bibliography style: http://shirotakeda.org/en/tex/econ-bst.html

And an example (with this example, the citation is "Author1 and Author2 (2003)" in both the introduction and the chapter, while I would like "Author1 et Author2 (2003)" in the introduction):

\documentclass[a4paper,12pt]{report}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{natbib}
\usepackage[frenchb,english]{babel}

\newcommand*{\andname}{et }

\newcommand*{\liaisonname}{et }

\begin{document}

\selectlanguage{french}
\chapter{Introduction générale}

Bla bla bla bla bla bla bla \cite{author12003}.

\selectlanguage{english}
\chapter{A Fancy Title}

Bla bla bla bla bla bla bla \cite{author12003}.

\selectlanguage{english}
\bibliographystyle{econ-aer}
\renewcommand\bibname{References}
\bibliography{biblio}

\end{document}


The entry in the biblio.bib is:

@Article{author12003,
author={Author1 and Author2},
title={{Title}},
journal={Journal},
year=2003,
volume={71},
number={5},
pages={1491--1517},
month={09}}


natbib gets the author-year information by reading the optional argument of \bibitem/\harvarditem in the bibliography. But because the bibliography is usually included at the end of the document, that information comes too late to be useful, so LaTeX saved it in the .aux file, so it can be used from the beginning of the document.

The .bbl (bibliography) contains the line

\harvarditem[Author1 \andname{} Author2]{Author1 \andname{} Author2}{2003}{author12003}


and then that is written to the .aux as

\bibcite{author12003}{{1}{2003}{{Author1 and{} Author2}}{{Author1 and{} Author2}}}


Why does that happen? When LaTeX writes things to the .aux files it expands the text it writes, see On the basics of writing to & reading from auxiliary files (.aux, .toc, etc.). At the point where the .aux is written \andname has the meaning and, so that ends up in the .aux file.

A simple solution is to make \andname robust. That makes sure that it is not expanded when it is written to the .aux file, so that the .aux contains

\bibcite{author12003}{{1}{2003}{{Author1 \andname{} Author2}}{{Author1 \andname{} Author2}}}


Together with the changes you already applied to the .bst file (rename the changed file to econ-aer-ml.bst)

--- econ-aer.bst    2018-07-20 15:27:43.069689500 +0200
+++ econ-aer-ml.bst 2018-07-20 14:53:32.187363500 +0200
@@ -228,7 +228,7 @@
% String replaced with _ in "Mr. A _ Mr. B "
%
FUNCTION {bst.and}
-{ ", and " }
+{ " \andname{} " }
% { " and " }    % (default)

%%% String used to separate author names in references (more than two authors).
@@ -236,21 +236,21 @@
% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
%
FUNCTION {bst.ands}
-{ ", and " }    % (default)
+{ " \andname{} " }    % (default)

%%% String used to separate author names in citation part.
%
% String replaced with _ in "Mr. A _ Mr. B "
%
FUNCTION {bst.cite.and}
-{ " and " }    % (default)
+{ " \andname{} " }    % (default)

%%% String used to separate author names in citation part (more than two authors).
%
% String replaced with _ in "Mr. A, Mr. B _ Mr. C"
%
FUNCTION {bst.cite.ands}
-{ " and " }    % (default)
+{ " \andname{} " }    % (default)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


The MWE

\documentclass[a4paper,12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{natbib}
\usepackage[frenchb,english]{babel}
\usepackage{etoolbox}

\newrobustcmd*{\andname}{et}

\newrobustcmd*{\liaisonname}{et}

%\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{author12003,
author={Author1 and Author2},
title={{Title}},
journal={Journal},
year=2003,
volume={71},
number={5},
pages={1491--1517},
month={09}}
\end{filecontents}

\begin{document}
\selectlanguage{french}
\chapter{Introduction générale}
Bla bla bla bla bla bla bla \cite{author12003}.

\selectlanguage{english}
\chapter{A Fancy Title}
Bla bla bla bla bla bla bla \cite{author12003}.

\selectlanguage{english}
\bibliographystyle{econ-aer-ml}
\renewcommand\bibname{References}
\bibliography{\jobname}
\end{document}


gives

biblatex offers multilingual support out of the box. So if you don't have to use natbib and econ-aer, you may want to consider switching to biblatex. See bibtex vs. biber and biblatex vs. natbib and What to do to switch to biblatex?.

\documentclass[french,british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, backend=biber]{biblatex}