I am writing my thesis using the memoir class.
I have a main which calls all the needed files.
One of these files is the "summary" which calls two different tex files with respective bibliographies (I need to have the summary in two languages, English and Danish).
The problem is that the second bibliography (danish) doesn't show up (the references are placed perfectly but they cross-reference to the bibliography environment of the English summary).
EDIT: it seems that the danish summary keeps looking at the english bib file. The references are placed only if they have been cited in the english summary and they won't show up otherwise. If the reference key differ between the two bib files (e.g. test1 and test1d in the example below), the reference will not be placed properly.
Attached the MWE
\documentclass[b5paper,10pt,authoryear,longnamesfirst]{memoir}
\begin{filecontents}{englishsummary.bib}
@Article{test1,
author = {Test Testesen},
title = {Test},
journal = {Test journal},
year = {2018},
}
@Article{test2,
author = {Test T. Test},
title = {TestB},
journal = {Journal of testing},
year = {2018},
}
\end{filecontents}
\begin{filecontents}{danishsummary.bib}
@Article{test1d,
author = {Test Testesen},
title = {Test},
journal = {Test journal},
year = {2018},
}
@Article{test2d,
author = {Test T. Test},
title = {TestB},
journal = {Journal of testing},
year = {2018},
}
\end{filecontents}
% preamble
\let\newfloat\undefined
\usepackage[capbesideposition={top,center},capposition=top]{floatrow}
\usepackage[scaled=0.75]{beramono}
\usepackage[utf8]{inputenc}
\usepackage[english,danish]{babel}
\usepackage{microtype}
\usepackage{bibunits}
\usepackage[authoryear,sectionbib,longnamesfirst]{natbib}
\setlrmarginsandblock{*}{1.228571in}{0.75}
\setulmarginsandblock{1in}{*}{1.2}
\nouppercaseheads
\makeoddhead{headings}{\small\scshape\rightmark}{}{\small\thepage}
\makeevenhead{headings}{\small\thepage}{}{\small\scshape\leftmark}
\linespread{1.1}
\usepackage{cleveref}
% END PREAMBLE
\begin{document}
\selectlanguage{english}
\frenchspacing
\tableofcontents*
%SUMMARY
\let\oldbibsection\bibsection
\let\oldbibsection\bibsection
\renewcommand\bibsection{\section*{\bibname}}
% English summary
\begin{bibunit}[elsarticle-harv]
\chapter*[Summary]{Summary}
\addcontentsline{toc}{chapter}{Summary}
some english text \citep{test1} and \cite{test2}.
%\clearpage
\putbib[englishsummary.bib]
\end{bibunit}
% END OF English SUMMARY
% Danish summary
\begin{bibunit}[elsarticle-harv_danish]
\chapter*[Danish summary]{Danish summary}
\addcontentsline{toc}{chapter}{Danish summary}
\selectlanguage{Danish}
\frenchspacing
\setcounter{footnote}{0}
%DANISH SUMMARY
some danish text \citep{test1d} and \cite{test2d}.
\clearpage
\putbib[danishsummary.bib]
\end{bibunit}
% END OF DANISH SUMMARY
\selectlanguage{english}
\frenchspacing
\let\bibsection\oldbibsection
\end{document}
\documentclass
through\begin{document}
to\end{document}
) that shows the error so that we can process it and try to help. For instance you use thememoir
class but also thebibunit
environment which is not supplied bymemoir
; where does it come from?