5

Question:

I would like to replace the biblatex+biber title when a .bib entry does not contain a title. For example, if I have the entry:

@article{key123,
  author = {Name AA and Name BB},
  title = {Article title name},
  Year = {2016},
  revjournal = {Journal Name},
}

I want to replace the

Name AA and Name BB. “Article Title Name”. In: (2016).

with

Name AA and Name BB. “Article Title Name”. Under review at: Journal Name (2016).

What I have tried:

I have attempted to map revjournal to usera with the following:

\DeclareSourcemap{
    \maps[datatype=bibtex]{
      \map{
        \step[fieldsource=revjournal]
        \step[fieldset=usera,origfieldval]
    }
  }
}

\DeclareFieldFormat{usera}{%
  \iffieldundef{title}{%
    \mkbibacro{Under review at}\addcolon\space#1%
  }{}%
}

But that does nothing. Perhaps there is a better way to replace/overwrite biblatex fields?

MWE:

\documentclass{article}

\usepackage{filecontents}

\usepackage[backend=biber,firstinits=true]{biblatex}
\DeclareSourcemap{
    \maps[datatype=bibtex]{
      \map{
        \step[fieldsource=revjournal]
        \step[fieldset=usera,origfieldval]
    }
  }
}

\DeclareFieldFormat{usera}{%
  \iffieldundef{title}{%
    \mkbibacro{Under review at}\addcolon\space{#1}%
  }{}%
}

\begin{filecontents}{./pubs.bib}
@article{key123,
  author = {Name AA and Name BB},
  title = {Article title name},
  Year = {2016},
  revjournal = {Journal Name},
  }
\end{filecontents}
\bibliography{./pubs.bib}
\begin{document}

\fullcite{key123}
\end{document}

Thank you for your help.

0

2 Answers 2

7

This is an alternative solution to the problem. Biblatex provides the field pubstate to record the publication status of journal articles.

Thus I suggest to keep the standard journaltitle (or the bibtex journal field) and to add the pubstate= {under review} information to the entry.

Thus the bibtex entry looks like

@article{key123,
  author = {Name AA and Name BB},
  title = {Article title name},
  Year = {2016},
  journal = {Journal Name},
  pubstate = {under review},
  }

Then, to process the information and typeset the output in the desired format use:

\def\jmlarson@ur{under review}

\renewbibmacro{in:}{%
  \ifentrytype{article}
    {\iffieldequals{substate}{\jmlarson@ur}{\printtext{Under review at\intitlepunct}}{}\clearfield{pubstate}}
    {\printtext{\bibstring{in}\intitlepunct}}%
}

The trick is to redefine the macro that typeset "In" to put the right text for the appropriate entires, and to clear the information in pubstate (so it is not printed twice).

With the provided MWE, this results in:

enter image description here

3
  • This looks promising. But for some reason, any pubstate seems to catch the "under review" condition in the redefined in: macro. I tried to add pubstate= {to appear} but it still uses the pubstate={under review}. See the modified MWE above. (See commented out alternative that I was trying to build.)
    – jmlarson
    Feb 3, 2016 at 9:11
  • @jmlarson modified the answer to address the problem.
    – Guido
    Feb 3, 2016 at 11:04
  • I see that I should not have changed the question. I have accepted this because it certainly answered the original question.
    – jmlarson
    Feb 3, 2016 at 13:59
0

A more robust result, courtesy of @moewe is to use:

\iffieldequalstr{pubstate}{under review}

and not declare any macros. For more justification, see here:

Biblatex: iffieldequals appears to return true for false conditions

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .