# Map shortjournal into journaltitle

I have the following bibliography

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


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.

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}

• @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. Jun 4 '20 at 15:46