1

I am using a bib file that looks something like this (saved as ref.bib):

@article{key1, 
    author = {Joe Smith},
    journal={A journal}, 
    title = {An article}, 
    year = {2017}}

@article{key2, 
    author = {Joe Smith}, 
    title = {A second article}, 
    journal = {},
    year = {2017}, 
    pubstate={Draft}}

With a latex file:

\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\addbibresource{ref.bib}

\begin{document}
\section{ONE}
\begin{refsection}
  \nocite{key1}
  \printbibliography{}
\end{refsection}

\section{TWO}
\begin{refsection}
  \nocite{key2}
  \printbibliography{}
\end{refsection}
\end{document}

But I would like to omit the year from the second bibliography since it is an unpublished draft. How would I go about doing this?

  • Use @unpublished, then year can be omitted. – TeXnician Aug 14 '17 at 16:57
  • key2 is definitely not an @article if it has no journal and has not yet been published. There is @unpublished, but also @online if you got the work from a pre-print server. – moewe Aug 14 '17 at 17:00
  • Is this for a CV/list of your publications? – moewe Aug 14 '17 at 17:00
  • Thanks for the quick responses. Using @unpublished and omitting the year still puts in (n.d.), which I don't want. @moewe - yes, it is for a CV – Alex Aug 14 '17 at 17:02
5

Use @unpublished and the pubstate field. With

\DeclareLabeldate{%
  \field{date}
  \field{year}
  \field{eventdate}
  \field{origdate}
  \field{urldate}
  \field{pubstate}
  \literal{nodate}
}

you get to see the pubstate in the brackets after the author name in the bibliography. To avoid printing the pubstate twice in that case we redefine addendum+pubstate.

This is similar to Andrew's answer in Biblatex: How to get “Author (forthcoming)” when pubstate=forthcoming is set, instead of “Author (n.d.)”?, but ultimately a bit simpler.

MWE

\documentclass{article}
\usepackage[backend=biber,style=authoryear]{biblatex}

\DeclareLabeldate{%
  \field{date}
  \field{year}
  \field{eventdate}
  \field{origdate}
  \field{urldate}
  \field{pubstate}
  \literal{nodate}
}

\renewbibmacro*{addendum+pubstate}{%
  \printfield{addendum}%
  \newunit\newblock
  \iffieldequalstr{labeldatesource}{pubstate}
    {}
    {\printfield{pubstate}}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{key1, 
  author  = {Joe Smith},
  journal = {A journal}, 
  title   = {An article}, 
  year    = {2017},
}

@unpublished{key2, 
  author   = {Joe Smith}, 
  title    = {A second article}, 
  pubstate = {draft},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\cite{key1} and \cite{key2}.

\printbibliography
\end{document}

example

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.