[Tex/LaTex] Really short citations with bibtex

bibtex

I'm working on a document with an 8 page limit and by no means it's gonna fit a whole list of citations, and I'm looking for a way to have really short citations inline (i.e. no reference list afterwards). Something like

... this has been studied in (Smith et. al., Phys. Rev. Lett. 100, 123456 (2012)) ...

I'm quite flexible about the particular style, although something based of revtex4 would be nice. Most of my references are journal articles, and the few books I have, I can put by hand if that simplifies things.

I'm trying with package bibentry, but still not manage to find a style that fits my needs. Any ideas? For instance, I need "et al" whenever there is more than one author, no first name initials, no publication title. I need journal abbreviations (although I think this is a separate issue).

Any help will be very appreciated…

Thx

Best Answer

Here's a biblatex solution. It doesn't need Biber (though of course it will work with it). It's not intended as a polished solution such as one might put together for a full style: it assumes your requirements apply: just books and articles; no bibliography. It allows you to use \cite and \parencite.

I wasn't sure how to deal with post notes. In the end I've slotted them into the middle of the citations, before the year.

I wasn't sure how to deal with repeated citations; as it is, I've just left them as is, but not repeated the year -- on the basis that you are trying to save space! It's probably simple enough, though, that you can pretty much understand what it's doing and fiddle with the details yourself.

(Don't treat this as an endorsement of this sort of citation system! But needs must, and it's quite a nice demonstration of the flexibility of Biblatex.)

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@ARTICLE{smith,
  author = {Smith and others},
  journaltitle = {Phys. Rev. Lett.},
  volume = {100},
  pages  = {123--456},
  date   = {2012},
}
@BOOK{jones,
  author = {Jones, Arthur},
  title  = {Something about physics},
  date   = {2011},
  publisher = {Dont Print Me},
}
\end{filecontents}
\usepackage[style=authoryear, backend=bibtex, citetracker=true]{biblatex}

% For compression, we just give the *first* page of an article
\DeclareFieldFormat{pages}{%
  \mkfirstpage*{#1}}

\renewbibmacro{postnote}{%
  \ifboolexpr{ test {\iffieldundef{postnote}}
               or test {\iftoggle{postnoteprinted}}}
  {}
  {\setunit{\addcomma\space at\space}%
  \ifboolexpr{ test {\iffieldundef{pagination}}
               or test {\iffieldequalstr{pagination}{page}}}
    {\printfield[default]{postnote}}
    {\printfield{postnote}}
 \global\toggletrue{postnoteprinted}}}


\newtoggle{postnoteprinted}


\renewbibmacro*{cite}{%
  \global\togglefalse{postnoteprinted}%
  \iffieldundef{shorthand}
    {\ifboolexpr{ test {\ifentrytype{article}}
                  or test {\ifentrytype{book}} }
     {\DeclareFieldAlias{journaltitle}{default}%
      \usedriver{}{\thefield{entrytype}:abbrv}}
     {{\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
        {\usebibmacro{cite:label}%
         \setunit{\addspace}}
        {\printnames{labelname}%
         \setunit{\nameyeardelim}}%
      \usebibmacro{cite:labelyear+extrayear}}}}
    {\usebibmacro{cite:shorthand}}}

\DeclareBibliographyDriver{article:abbrv}{%
  \usebibmacro{begentry}%
  \printnames{labelname}
  \setunit{\addcomma\space}%
  \usebibmacro{journal+issuetitle}%
  \setunit{\addcomma\space}%
  \usebibmacro{note+pages}%
  \usebibmacro{postnote}%
  \setunit{\addspace}%
  \usebibmacro{bracketedyear}%
  \usebibmacro{finentry}}

\DeclareBibliographyDriver{book:abbrv}{%
  \usebibmacro{begentry}%
  \printnames{labelname}%
  \setunit{\addcomma\space}%
  \usebibmacro{maintitle+title}%
  \usebibmacro{postnote}%
  \setunit{\addspace}%
  \usebibmacro{bracketedyear}%
  \usebibmacro{finentry}}

% Always uses parentheses, because that was what the
% example showed. \mkbibparens would be better IMO.
\newbibmacro{bracketedyear}{%
 \ifciteseen
    {}
    {\iffieldundef{year}
    {}
    {\printtext{(\printfield{year})}}}}

\addbibresource{\jobname.bib}
\begin{document}

Parenthetical citation: \parencite{smith}. Repeated \parencite[125]{smith}

Citation to a book: \cite[456]{jones}.

\end{document}

enter image description here