1

I am using LaTeX and bibtex for my curriculum, having cite commands for each one of my publications. But, instead of having the bibliographic entries at the end, I want that they get expanded exactly where they are cited.

For that, I was using a Perl scripts, mangling the .bbl file into a .tex file, and then replacing each citation by the .bbl LaTeX code. But this is not just messy, but also difficult to adapt (I just changed the citation type, and now I need to adapt all the code, as the .bbl file is generated differently -- I want to use apacite, now.).

Is there any module allowing me to do this without using an external tool?

Alberto
  • 464
  • 1
    There is the bibentry package (see for example https://tex.stackexchange.com/q/142985/35864). biblatex has the \fullcite command for those sort of things. – moewe May 15 '20 at 14:37
  • bibentry does not work with apacite, it seems. – Alberto May 15 '20 at 14:45
  • 1
    Possible. I would have a look if you can post an MWE. bibentry is part of the natbib family, so maybe it needs a more natbib-ish .bbl file. Maybe it works if you have apacite load natbib with the natbibapa option. – moewe May 15 '20 at 14:48
  • MWE with bibtex, bibentry and apacite. https://www.overleaf.com/read/hshxqrpvcxrt – Alberto May 15 '20 at 15:12
  • Any chance you can post a truly minimal example directly in the question? Overleaf links can't replace MWEs (the links might go stale). – moewe May 15 '20 at 15:15
  • 1
    https://gist.github.com/moewew/12657f4181c8558788c678399d9ffa7c is an MWE using apacite and bibentry. – moewe May 15 '20 at 15:18
  • Mhh, as it turns out it works only if you don't use natbibapa... – moewe May 15 '20 at 15:20
  • And it seems hyperref doesn't like it, too. – Alberto May 15 '20 at 15:28
  • 2
    Yes, just noticed that as well with your MWE. Both bibentry and hyperref need to manipulate \bibentry quite a bit, so clashes like that are not completely surprising. Things would be a lot easier with biblatex and its \fullcite. biblatex-apa6 implements 6th edition APA style (which is what apacite does as well) and current versions of biblatex-apa give you 7th edition APA style. – moewe May 15 '20 at 15:31
  • Attempting to migrate to biber. Thanks – Alberto May 15 '20 at 15:41
  • Please post the working solution as an answer. That way you can accept it to show the question is resolved and it is easier for people to follow what is question and what is answer. – moewe May 15 '20 at 16:01
  • 1
    Thank you for turning the edit into an answer. Upvoted. – moewe May 15 '20 at 16:53

1 Answers1

1

Working version with biber/biblatex

Thanks, @moewe, for pushing me into this. It is lame, because I am the maintainer of Text::BibTex, the Perl module biber uses.

But nevertheless, this was my first attempt with biber/biblatex, so it took some time to workout how things glue together.

Therefore, I share here a MWE of biber/biblatex if someone finds that useful:

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{thing,
  author  = {Someone},
  title   = {Something},
  journal = {Some Journal},
  year    = {2018},
}
\end{filecontents}

\usepackage[portuguese]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[backend=biber,style=apa]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{hyperref}
\begin{document}
\begin{itemize}
\item \fullcite{thing}
\end{itemize}
\end{document}

% pdflatex biblatex-apa
% biber biblatex-apa
% pdflatex biblatex-apa
% pdflatex biblatex-apa
Alberto
  • 464