0

Would like to get rid of the "n.d." in footnotes generated by \footcite to references of types that do not have dates as such.

How can I redefine or tell latex to print references to sources by a certain biblatex type in a way that excludes the date/year? I only want the year to be gone from the type swedish_sou, not from article or any other type.

I cite thousands of sources in my thesis which are required to appear by source category in the bibliography. The sectioning, sorting, and formatting of the bibliography is beyond biblatex (or my skills therein), so I use my own python-script to generate the bibliography. In the manuscript, however, biber is the backend that generates references by \cite{} and \footcite tags. It is thus the formatting of the footnotes in this example that I would like to alter. The custom type swedish_sou refers to documents of the type "State public reports" required to appear in the bibliography under a separate section. In footnotes, the desired format is this:

SOU 1945:42.

A minimal example showing the undesired "n.d" in the ref sou_1945_42 is here:

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

\begin{filecontents}{refs.bib}
@swedish_sou{sou_1945_42,
  author = {SOU~1945:42},
  title = {Utredningar angående ekonomisk efterkrigsplanering XII},
  keyword = {public_print}
}

@article{newman_random_2002,
    title={Random Graphs as Models of Networks},
    date={2002-02-12},
    author={Newman, M. E. J.},
    keyword={main}
}
\end{filecontents}

\addbibresource{refs.bib}

\begin{document}
I make references to articles\footcite{newman_random_2002} and Swedish State public reports that are defined in biblatex as a custom document type.\footcite{sou_1945_42}
\printbibliography
\end{document}
1

Since SOU~1945:42 is not the author anyway, a different field would more more appropriate. Since the question only focusses on the citations, shorthand would be the obvious choice.

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

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@swedish_sou{sou_1945_42,
  shorthand = {SOU~1945:42},
  title     = {Utredningar angående ekonomisk efterkrigsplanering XII},
  keyword   = {public_print}
}
@article{newman_random_2002,
  title   = {Random Graphs as Models of Networks},
  date    = {2002-02-12},
  author  = {Newman, M. E. J.},
  keyword = {main},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
I make references to articles\footcite{newman_random_2002}
and Swedish State public reports that are defined in
biblatex as a custom document type.\footcite{sou_1945_42}
\printbibliography
\end{document}

Footnote 2: "SOU 1945:42".


If you are already defining a new entry type for SOUs and define a new driver for it, then it may be more interesting to try and use a more semantic input

@swedish_sou{sou_1945_42,
  year      = {1945},
  number    = {42},
  title     = {Utredningar angående ekonomisk efterkrigsplanering XII},
  keyword   = {public_print}
}

This would then require changes to the cite bibmacro similar to the second part of custom citation style for custom document, Customize citation with bibulous

  • Sublime answer! shorthand solves this quickly, you're right. Redefining \cite{} to handle my custom type swedish_sou correctly is the the better way though. It makes sense to use the appropriate fields in the biblatex database. year and number, not author. Thanks – nJGL Aug 3 at 22:17

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.