0

I am trying to remove the author field in my beamer presentation as I want the references to be as compact as possible. Using the answer by PLK in response to the question "Getting rid of the author field in the bibliography", namely:

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \pertype{misc}
      \step[fieldset=author, null]
   }
 }
}

is removing the author field, however, when using this I am getting a full stop followed by a space before the journal entry:

enter image description here

I have looked at the biblatex GitHub repository before I asked here and could not see where the author field would include a full stop and a space in the \newbibmacro*{author/...} definitions, so I am not sure how to remove it. I added %'s after each line in the \DeclareSourcemap but it had no effect.

Does anyone know how I can get rid of the full stop and space please?

MWE (I included some styles so it somewhat matches my real document in case it is relevant):

% arara: pdflatex: {options: [-halt-on-error]}
% arara: biber
% arara: pdflatex: {options: [-halt-on-error]}

\begin{filecontents}[overwrite]{ref.bib} @Article{Mehandia2020, author = {Mehandia, Seema and Sharma, S. C. and Arya, Shailendra Kumar}, journal = {Biotechnol. Rep. (Amst)}, title = {Isolation and characterization of an alkali and thermostable laccase from a novel Alcaligenes faecalis and its application in decolorization of synthetic dyes.}, year = {2020}, pages = {e00413}, volume = {25}, doi = {10.1016/j.btre.2019.e00413}, } @Article{Murugesan2009, author = {Murugesan, Kumarasamy and Kim, Young-Mo and Jeon, Jong-Rok and Chang, Yoon-Seok}, journal = {J Hazard Mater.}, title = {Effect of metal ions on reactive dye decolorization by laccase from Ganoderma lucidum.}, year = {2009}, pages = {523-9}, volume = {168}, doi = {10.1016/j.jhazmat.2009.02.075}, } \end{filecontents}

\documentclass{beamer}

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

%% --- These are just commands to match my current bib style \renewcommand{\bibfont}{\normalfont} \DeclareFieldFormat{journaltitle}{\mkbibemph{#1},} \DeclareFieldFormat[article]{title}{} \DeclareFieldFormat[article]{volume}{\textbf{#1}} \DeclareFieldFormat[article]{pages}{#1} \DeclareFieldFormat{doi}{#1} \renewbibmacro{in:}{} \renewbibmacro{issue+date}{} \renewbibmacro{volume+number+eid}{% \setunit{\addcomma\space} \usebibmacro{date}% \setunit{\addcomma\space} \printfield{volume}% \setunit*{\addcomma\space} } %% ---- End

% https://tex.stackexchange.com/a/656907/273733 \DeclareSourcemap{% \maps[datatype=bibtex]{% \map{% \step[fieldset=author, null]% }% }% }

\addbibresource{ref.bib}

\begin{document}

\begin{frame} \frametitle{First slide Title} Text \cite{Mehandia2020}\cite{Murugesan2009} \end{frame}

\begin{frame} \frametitle{References} \printbibliography \end{frame}

\end{document}

JamesT
  • 3,169
  • 1
    try with a second map that really clears the title: \map{\pertype{article}\step[fieldset=title, null]} – Ulrike Fischer Oct 11 '22 at 15:00
  • It is embarrassing that I completely forgot about the title and its effect, your code worked when putting it into the \DeclareSourcemap{}, would you like to post that as answer? – JamesT Oct 11 '22 at 15:09
  • 1
    Another great example why \DeclareFieldFormat{<field name>}{} is a bad way to suppress a field. It works OK-ish enough in many cases, because biblatex does some work behind the scenes explicitly to catch this situation, but if styles (or style modifications as in this case) do more complex stuff, it may break down because biblatex knows the field is non-empty, but cannot visibly print it. – moewe Oct 13 '22 at 05:52
  • @moewe yeah, I should have heeded your advice from a previous question of mine and answer of yours on removing the title from \footfullcite. It is difficult to change styles when I am comfortable with this but I really need to. Linked to that answer so if anyone wants to follow your \DeclareSourcemap advice in the comments (as I should have) then they are signposted to it. – JamesT Oct 13 '22 at 10:13

1 Answers1

2

Clear the title also in the sourcemap, and not only by changing its format:

\DeclareSourcemap{%
  \maps[datatype=bibtex]{%
    \map{%
     \step[fieldset=author, null]%
   }%
   \map{\pertype{article}\step[fieldset=title, null]}
 }%
}
Ulrike Fischer
  • 327,261