19

I want to cite articles as full reference, but only in the text. So far, everything works in the MWE below, but there is still the title of the article which I want to suppress.

One way I found to do this was by adding \DeclareFieldFormat[article]{title}{}; but that cancels the title and leaves two commas (,,) where the title has been.

Another suggestion was to use \AtEveryBibitem{\clearlist{title}}, but that doesn't seem to work at all.

Does anyone know how to get rid of the title? Such that the citations become

I want to cite Author et al. (2050), Journal A, 50, 63–90 as well as Author (2013), Journal B, 50, 63–90

Here is a minimum working example:

\documentclass{scrartcl}

%%%%%%%%%%%%%%%%%%%%%%% THE REFERENCES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{entry1,
  author =   {Author, A. and Buthor, B. and Cusor, C.},
  title =    {Title A},   
  journal =      {Journal A},   
  volume =       {50},
  year =       {2050},
  pages =    {63--90},
}
@article{entry2,
  author =   {Author, A.},
  title =    {Title of Article B},
  journal =      {Journal B},   
  volume =       {50},
  year =       {2013},
  pages =    {63--90},
}
\end{filecontents}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BIBLIOGRAPHY STYLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[style=authoryear,maxnames=1,backend=bibtex,doi=false,isbn=false,url=false]{biblatex}
\addbibresource{\jobname.bib}

\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\DeclareFieldFormat{journaltitle}{\mkbibemph{#1},} % italic journal title 
\DeclareFieldFormat{pages}{#1}
%\DeclareFieldFormat[article]{title}{} % remove title
\renewbibmacro{in:}{} % remove "in"
\renewcommand{\mkbibnamefirst}[1]{} % remove first name
\renewcommand{\newunitpunct}{, }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BEGIN THE DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
I want to cite
\fullcite{entry1}
as well as
\fullcite{entry2}


\end{document}
Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • 1
    Try \AtEveryBibitem{\clearfield{title}}. title is a field not a list. But it is not a good idea to not display the title, I think (see the comments to this question). \DeclareFieldFormat[article]{title}{} is not really something one should do, as biblatex still thinks it prints the title even though it did in fact not do that. – moewe Nov 01 '13 at 19:38
  • @moewe No, that doesn't work, but I just found a solution. It seems one needs to redefine the "Driver", i.e. `\DeclareBibliographyDriver{article}{\printnames{author} \newunit

    \printfield{year}

    \newunit

    \printfield{journaltitle}

    \newunit

    \printfield{volume}

    \newunit

    \printfield{pages}

    \finentry}`

    – John Smith Nov 01 '13 at 19:42
  • Weird it works for me... Just to reiterate: You want to use \fullcite with title and \printbibliography without? If you want \fullcite to ignore the title, go with \AtEveryCitekey{\clearfield{title}}. Please do not redefine the driver in such a minimal way. – moewe Nov 01 '13 at 19:46
  • @moewe hm strange, now it seems to work as you wrote. Not sure what I did wrong before. And I want to only cite the articles in the text, but with full reference and not have \printbibliography at all – John Smith Nov 01 '13 at 19:48
  • @moewe: there seems to be some extra space before the citations, particularly visible if I do (\fullcite{entry1}). Do you know how to get rid of that? – John Smith Nov 01 '13 at 19:56
  • That's due to the way you suppress the first name: \renewcommand{\mkbibnamefirst}[1]{} is really not a good idea for (just as I explained about \DeclareFieldFormat[article]{title}{} above). You could try \DeclareNameFormat{first-last}{\iffirstinits{\usebibmacro{name:last-first}{#1}{}{#5}{#7}}{\usebibmacro{name:last-first}{#1}{}{#5}{#7}}\usebibmacro{name:andothers}} instead (probably not the best solution, but the best I could come up with). – moewe Nov 01 '13 at 20:19
  • not quite sure how that works, but it does the trick! Thank you so much! I have spend most of today fighting with this. – John Smith Nov 01 '13 at 20:47
  • On second thoughts, \DeclareNameFormat{first-last}{\usebibmacro{name:last}{#1}{#3}{#5}{#7}\usebibmacro{name:andother‌​s}} might even be better. – moewe Nov 03 '13 at 14:48

1 Answers1

25

One should not suppress fields with \DeclareFieldFormat{title}{}, since biblatex could still think it printed the title, even though it really did not do that. This can result in superfluous and spurious spaces and punctuation - although there are measures to prevent this. Indeed the tactics of using \DeclareFieldFormat{<field>}{} to suppress a field seems to work without issues in many circumstances, but only because biblatex works frantically in the background cleaning up unwanted double punctuation. In the MWE this was not really possible because of \renewcommand{\newunitpunct}{, } (\renewcommand{\newunitpunct}{\addcomma\space} would have worked).

If you want to get rid of the title information in a citation, go with

\AtEveryCitekey{\clearfield{title}}

to delete the information in the bibliography, it is

\AtEveryBibitem{\clearfield{title}}

There are more radical solutions to remove the title in a way that it gets never passed to biblatex in the first place with

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldset=title, null]
    }
  }
}

or in a way that suppresses the title when it is read from the .bbl with

\DeclareFieldInputHandler{title}{\def\NewValue{}}

If you don't want to use the title in your document at all, the radical solutions are slightly more elegant.

Similarly, \renewcommand{\mkbibnamefirst}[1]{} is not the best idea to suppress first names, you might try

\DeclareNameFormat{first-last}{%
  \usebibmacro{name:last}{#1}{#3}{#5}{#7}%
  \usebibma‌​cro{name:andother‌​s}}

here (see also Biblatex: Last name only in \footcite for other solutions).

moewe
  • 175,683
  • How can I remove the title for only one type of entry, like articles? \DeclareFieldFormat[article]{title}{} works fine for that end, but is not the elegant choice as you write. But the other options you list all work globally. – And Feb 15 '23 at 13:22
  • 1
    @And In \AtEveryCitekey and \AtEveryBibitem you can use \ifentrytype{article}{<true>}{<false>} (see https://tex.stackexchange.com/q/52601/35864, https://tex.stackexchange.com/q/40097/35864). In \DeclareSourcemap you can use \pertype (https://tex.stackexchange.com/q/229428/35864). For \DeclareFieldInputHandler you need some more work (https://tex.stackexchange.com/q/410384/35864). – moewe Feb 15 '23 at 16:25