2

I'm trying to convert in-text citations to endnotes. In other words, the reference authors/article will not appear in the text but only in the endnotes. I also have other endnotes in the document, but I need to shift the in-text citations to the endnotes as well. I have been searching on StackExchange to no avail. Any ideas?

Thanks!

MWE:

\documentclass[oneside,12pt]{scrbook}
\pagestyle{plain}

\usepackage{endnotes}
\let\footnote=\endnote

\begin{document}

....

\doublespacing
\frontmatter
\mainmatter
\include{jobmarketpaper}
\backmatter

\bibliographystyle{apacite}  
\bibliography{library}

\newpage

\theendnotes

\end{document}
TeXnician
  • 33,589
Zack
  • 45
  • Do you still want a normal bibliography at the end? Do the endnotes contain only short references (author-year) or the full bibliographic entry? If you cite a certain source twice, do you want two endnotes or do you want to re-use a number? What if you cite several sources at once, do they each get a note on their own, or do they share a note? (Note that not all combinations are achieved equally easily, so choose wisely what you want.) – moewe Aug 11 '18 at 15:16
  • No bibliography at end. On first mention to a reference, the endnote contains the full citation. On second mention, the last name (and year and page # if needed) - if multiple articles by the same author (e.g., 6. Bellin, 2012, p. 145.). If I were to cite the same author again later without an intervening reference, it would be (7. Ibid, p. 139). If it came later with intervening references, it would be (11. Bellin, p. 139). If I cite several at once, they all share a note. Some endnotes require a reference plus a sentence of explanation. There are some regular endnotes without a reference. – Zack Aug 11 '18 at 15:42
  • That seems kind of doable with biblatex. Would you be OK with switching from BibTeX to biblatex? See https://tex.stackexchange.com/q/5091/35864. See also https://tex.stackexchange.com/q/25701/35864 for background and https://tex.stackexchange.com/q/154751/35864 for help with Biber. – moewe Aug 11 '18 at 16:23

1 Answers1

2

This seems very doable with biblatex and Biber.

In fact the verbose-ibid style with a few standard options (autocite=footnote for footnote citations that get turned into endnotes with notetype=endonly) gives you almost what you need. The subsequent citations of verbose-ibid are "Author, Title", though, and not "Author, Year", so we need a few tiny tweaks.

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

\usepackage[citestyle=verbose-ibid, bibstyle=authoryear, backend=biber,
            autocite=footnote, notetype=endonly, labeldateparts]{biblatex}

\addbibresource{biblatex-examples.bib}

\DeclareDelimFormat{nameyeardelim}{\addcomma\space}
\renewbibmacro*{cite:short}{%
  \printnames{labelname}%
  \setunit*{\printdelim{nameyeardelim}}%
  \printtext[bibhyperlink]{%
    \printlabeldateextra}}


\begin{document}
Lorem\autocite{sigfridsson} ipsum\autocite{nussbaum} dolor\autocite{nussbaum} sit\autocite{sigfridsson}
amet\autocite{knuth:ct:a,knuth:ct:b}.
Lorem\autocite{sigfridsson} ipsum\autocite{knuth:ct:a} dolor\autocite{knuth:ct:b} sit\autocite{knuth:ct:c}
amet\autocite{geer}.
Lorem\autocite{knuth:ct:c} ipsum\autocite{geer}.
\theendnotes
\end{document}

A short example text with many references in the endnotes.


If you absolutely can't use biblatex, here is an attempt to implement a poor man's version of the above.

\documentclass{article}

\usepackage[authoryear]{natbib}
\usepackage{bibentry}
\usepackage{endnotes}
\usepackage{etoolbox}

\makeatletter
\newcommand*{\pblx@autocite@i}[1]{%
  \@ifnextchar[%]
    {\pblx@autocite@ii{#1}}
    {\pblx@autocite@ii{#1}[]}}

\def\pblx@autocite@ii#1[#2]{%
  \@ifnextchar[%]
    {\pblx@autocite@iii{#1}#2}
    {\pblx@autocite@iii{#1}{}[#2]}}

\def\pblx@autocite@iii#1#2[#3]#4{%
 #1{%
   \ifstrempty{#2}
     {}
     {#2\prenotedelim}%
   \forcsvlist{\pblx@autocite@process}{#4}%
   \ifstrempty{#3}
     {}
     {\postnotedelim #3}}%
}

\def\pblx@autocite@process#1{%
  \ifcsundef{blx@citeseen@#1}
    {{\frenchspacing\bibentry{#1}}%
     \global\cslet{blx@citeseen@#1}\@empty}
    {\cite{#1}}}

\newcommand*{\simplecite}{\pblx@autocite@i{}}
\newcommand*{\enotecite}{\pblx@autocite@i{\endnote}}
\makeatother

\newcommand*{\prenotedelim}{ }
\newcommand*{\postnotedelim}{, }

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{appleby,
  author  = {Humphrey Appleby},
  title   = {On the Importance of the Civil Service},
  year    = {1980},
}
\end{filecontents}

\begin{document}
\nobibliography*

Lorem\enotecite[1][2]{appleby}
ipsum\enotecite[2]{appleby}
dolor\enotecite{appleby}

\bibliographystyle{plainnat}
\nobibliography{\jobname}
\theendnotes
\end{document} 
moewe
  • 175,683
  • Thank you. I wasn't able to get this to run in my file. Is there not an option without shifting to biblatex and biber? I think I have far too many other packages operating --- e.g., ! Package keyval Error: labeldateparts undefined. See the keyval package documentation for explanation. – Zack Aug 14 '18 at 13:09
  • 2
    @Zack The error message suggests your biblatex (and Biber) versions is seriously outdated. Would it be possible to perform an update (keep in mind that an update has a small chance of not going through absolutely smoothly on the first attempt, so if you have a close deadline to meet, you may want to proceed with caution). I would not know of a good way to reproduce a similar result without biblatex. – moewe Aug 14 '18 at 13:14
  • Thank you. I downloaded the biblatex package from CTAN and moved it to my tex directory. This didn't solve the error problem. I think my file is too complicated. I'm also not running article document class. Can I somehow vote or give you credit for your answer? – Zack Aug 17 '18 at 19:32
  • 1
    @Zack Downloading from CTAN and updating manually is usually a bad idea. Normally you would use your TeX distribution to update the installed packages. If you are using the TeX live that comes with your Linux distribution that might not be possible, in which case you would need a vanilla distribution (https://tex.stackexchange.com/q/1092/). As soon as you have more reputation points you can up-vote good or useful answers. If the answer answered your question you can also accept it by clicking the green check mark, but since you couldn't get the solution to work that might not be appropriate – moewe Aug 17 '18 at 19:53