2

I would like to cite the authour + abbreviated journal + year on the fly (in text body or in a tikz node) in a presentation. Here is an mwe which does what it is supposed to for a very limited set of cases. I think that achieving the following would prove useful:

  1. Instead of \clearfield (e.g. specifying info not required), I'd like to specify just the few bits of info that we need.

  2. Abbreviated journal would be best.

Any suggestions on how to get to this functionality are appreciated.

\documentclass[9pt,t,unknownkeysallowed]{beamer}%
\usetheme{Montpellier}%
\usepackage[style=numeric, 
            backend=biber,
            firstinits=true]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{Doe2016,
  author  = {Doe, Jhon and Doe2, Jhon2},
  title   = {Some journal article},
  journal = {Fancy Journal},
  year    = {2016},
  volume  = {56},
  number  = {3},
  pages   = {1-99},
}
\end{filecontents}
\addbibresource{\jobname.bib}
% adjust style on the fly
\renewbibmacro{in:}{,}
\AtEveryCitekey{\clearfield{url}}
\AtEveryCitekey{\clearfield{note}}
\AtEveryCitekey{\clearfield{title}}
\AtEveryCitekey{\clearfield{doi}}
\AtEveryCitekey{\clearfield{eprint}}
\AtEveryCitekey{\clearfield{journal}}
\AtEveryCitekey{\clearfield{pages}}
\AtEveryCitekey{\clearfield{number}}
\AtEveryCitekey{\clearfield{volume}}

\begin{document}

\begin{frame}[c]
\fullcite{Doe2016}
\end{frame}

\end{document}
2

I'd probably go the opposite way and would define a citation command that only prints the three bits of info you want from the start instead of starting with \fullcite and deleting most of its output.

\documentclass{beamer}
\usepackage[style=numeric, 
            backend=biber,
            giveninits=true]{biblatex}
\addbibresource{biblatex-examples.bib}


\DeclareFieldFormat{beamercolorauthor}{%
  \usebeamercolor[fg]{bibliography entry author}%
  #1}
\DeclareFieldFormat{beamercolortitle}{%
  \usebeamercolor[fg]{bibliography entry title}%
  #1}
\DeclareFieldFormat{beamercolornote}{%
  \usebeamercolor[fg]{bibliography entry note}%
  #1}

\DeclareCiteCommand{\ajycite}
  {\usebibmacro{prenote}}
  {\printtext[beamercolorauthor]{%
     \printnames[given-family]{labelname}%
     \setunit{\addcomma\space}}%
   \printtext[beamercolornote]{%
     \printfield{journaltitle}%
     \setunit{\addspace}%
     \printtext[parens]{%
       \printdate}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\begin{document}

\begin{frame}[c]
\ajycite{sigfridsson}
\end{frame}

\end{document}

E. Sigfridsson and U. Ryde, Journal of Computational Chemistry (1998)


This does not abbreviate journal names. I am not aware of an automatic biblatex/Biber-based solution to abbreviating journal names that works universally. Show journal abbreviation in reference list with biblatex/biber presents a solution where you have to give the abbreviation for each relevant journal manually. See also https://github.com/plk/biblatex/issues/795.

External tools like JabRef have extensive support for journal abbreviations and so I would suggest to use those instead.

| improve this answer | |
  • Thanks for the suggestion! Regarding the JabRef-based abbreviation solution, this would work well for my particular case. Seems like one would run a conversion on the database and then a new field is populated with the abbreviation. Your code above would then be modified to pull data from the field holding the journal abbreviation rather than the field holding the long form article name. Do I have this straight? – John Chris May 10 '19 at 12:11
  • 1
    @JohnChris Pretty much, I guess (I'm not an avid JabRef user). If you don't need the full journal name, you could tell JabRef to just write the abbreviation into the normal journal field and would avoid the detour via a new field. – moewe May 10 '19 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.