1

I have the following bibliography

@article{SomeCiteKey,
  title = {SomeTitle},
  author = {SomeLastname, SomeName},
  date = {SomeDate},
  shortjournal = {SomeAbbr},
  volume = {SomeVol},
  pages = {SomePages},
  doi = {SomeDoi},
  number = {SomeNum}
}

As you can see there si no journal or journaltitle entries.

I would like to map the shortjournal entry into journaltitle, such that biber would read the shortjournal field as it is journaltitle. Is this possible? I guess it can be done with \DeclareSourcemap.

2

For almost all other fields this would be incredibly straightforward.

Use

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite]{
      \step[fieldsource=<bib field>, fieldtarget=<internal field>]
    }
  }
}

to map <bib field> to <internal field>. If you pass the overwrite option to \map, Biber will overwrite <internal field> if it exists. If the option is not set, Biber will not do anything if <internal field> is present.

In case you want to use overwrite, this works directly for shortjournal (<bib field>) and journaltitle (<internal field>):

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite]{
      \step[fieldsource=shortjournal, fieldtarget=journaltitle]
    }
  }
}

An alternative, but slightly more verbose version, can be found in Jan-Åke Larsson's answer to Short titles, Journal abbreviations, etc. in biblatex.

If you don't want to override an existing long journal name, however, you need to keep in mind that journal is remapped to journaltitle by a driver-level sourcemap (which is executed after user-level maps). In that case the easiest way out seems to be to perform the mapping from journal to journaltitle ourselves

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldsource=journal, fieldtarget=journaltitle]
    }
    \map{
      \step[fieldsource=shortjournal, fieldtarget=journaltitle]
    }
  }
}

I guess you want the overwrite solution, so here is an MWE demonstrating that

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

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

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite]{
      \step[fieldsource=shortjournal, fieldtarget=journaltitle]
    }
  }
}

\begin{filecontents}{\jobname.bib}
@article{uthor:jt,
  title        = {Some Title},
  author       = {Anne Uthor},
  date         = {1982},
  shortjournal = {Lng Nm.},
  journaltitle = {A Long Journal Name},
  volume       = {12},
  pages        = {45-48},
}
@article{uthor:j,
  title        = {Some Title},
  author       = {Anne Uthor},
  date         = {1984},
  shortjournal = {Anoth. Lng. Nam.},
  journal      = {Another Loooong Journal Name},
  volume       = {9},
  pages        = {103-156},
}
@article{uthor:n,
  title        = {Some Title},
  author       = {Anne Uthor},
  date         = {1983},
  shortjournal = {Shrt. Jour.},
  volume       = {12},
  pages        = {45-48},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}


\begin{document}
\cite{uthor:jt,uthor:j,uthor:n,sigfridsson}
\printbibliography
\end{document}

Uthor, Anne (1982). ‘Some Title’. In: Lng Nm. 12, pp. 45–48.//— (1983). ‘Some Title’. In: Shrt. Jour. 12, pp. 45–48.//— (1984). ‘Some Title’. In: Anoth. Lng. Nam. 9, pp. 103–156.

2
  • This is exactly what I wanted but didn't know how to use \DeclareSourcemap, thank you for this and the alternative solution.
    – Saavestro
    Jun 4 '20 at 15:43
  • 1
    @Saavestro There are some usage examples for \DeclareSourcemap in the manual (pp. 197-203 in v3.14, §4.5.3 Dynamic Modification of Data). They don't cover everything, but together with the explanation of the \DeclareSourcemap options on the previous pages you should probably be able to piece together most basic uses.
    – moewe
    Jun 4 '20 at 15:46

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.