0

I am using BibLaTeX with APA style to typeset my document, and I have the need to cite legal material.
Using the built-in legal support is biblatex-apa does not give desired result, so I have to customize the way the bibliography is printed.
For this purpose I am adding legal material using the misc entry type and adding the name of the legal material to the title field, like so:

@misc{k1,
    title = {Charter of Fundamental Rights of the European Union}
}

And this is the result:

1

Is there a way to prevent (n.d.) for appearing in the bibliography?

And as a bonus, is there a way to cite that reference and printing a custom field, like shorttitle, instead of the title?
For example:

It was said in \cite{k1} that ...  

would output:

It was said in CFREU that ...

EDIT: it appears \citefield{k1}{shorttitle} is the way to go to solve the bonus question.

MWE

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@misc{k1,
    title = {Charter of Fundamental Rights of the European Union}
}
\end{filecontents*}

\documentclass[12pt,a4paper]{report}

\usepackage[T1]{fontenc} % output font encoding \usepackage[utf8]{inputenc} % input font encoding \usepackage[english]{babel} \usepackage{csquotes} \usepackage[style=apa, backend=biber]{biblatex} \addbibresource{\jobname.bib}

\begin{document} Hello, world! \nocite{k1} \printbibliography \end{document}

Oliver
  • 103

2 Answers2

1

You can tell biber to look for a "year" in a different field in an entry type and leave it empty. Here I have told it to look for it in \label in @misc and left it empty so when it looks for the year it finds nothing. Consequently, it prints nothing either because the "n.d." output is not programmed into \label. Note, that this will apply to all @misc entries in your bibliography.

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@misc{k1,
    label = {} % place for biber to look for the "new year"
    title = {Charter of Fundamental Rights of the European Union}
}
\end{filecontents*}

\documentclass[12pt,a4paper]{report}

\usepackage[T1]{fontenc} % output font encoding \usepackage[utf8]{inputenc} % input font encoding \usepackage[english]{babel} \usepackage{csquotes} \usepackage[style=apa, backend=biber]{biblatex} \addbibresource{\jobname.bib}

\DeclareLabeldate[misc]{% \field{label} } % declaration of the "new year type" for biber to look for

\begin{document} Hello, world! \cite{k1} \printbibliography \end{document}

Plergux
  • 874
  • Thank you, your method worked perfectly. I used misc for legal material since all the other entry types were either online, book or article, so no side effects. If and only if it's not too difficult, could you please point me to a guidance on how to define a custom entry type, for example - in my case - legal? – Oliver Oct 23 '20 at 09:54
  • @YanKarin Biblatex recognises all kinds of "custom" types you can use, including "legal" and "legislation". However, I can not get this fix to work with those exact bibliography entry types. I'm afraid that my knowledge of the inner workings of Biblatex is not deep enough to be able to see why it would be so. – Plergux Oct 23 '20 at 10:54
0

For general advice on legal citations see What is best practice re. handling legal sources with Biblatex/Biber for disciplines other than law?.

New versions of biblatex-apa have some support for legal citations, in particular there are the types @legal, @constitution, @jurisdiction, @legmaterial, @legadminmaterial of which you can find examples in biblatex-apa-test-references.bib. Most of these still show the date, however, and @constitution, which doesn't, does not quite work for other reasons.

Even if these entry types don't give much better results than @misc at the moment, you may still want to consider using these types as they allow a finer control over modifications and being more semantic is usually a good thing.


If you need full control over the bibliography and citation output you may be interested in 'freeform' citations. See How to set up BibLaTeX for use with 'freeform' citations.

For biblatex-apa specifically I cooked up something in https://github.com/plk/biblatex/issues/884 a while a back.

With a current biblatex-apa version (v9.14) you could do the following.

@freeform comes with three fields: cite, firstcite and bibliography, which you can use to typeset arbitrary contents in citations (first citations if necessary) and the bibliography.

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\begin{filecontents}{freeform-apa.dbx} \ProvidesFile{freeform-apa.dbx}[2020/10/23 v0.1 freeform for biblatex-apa v9.14 (2020/08/28)] \DeclareDatamodelEntrytypes{ presentation, constitution, legmaterial, legadminmaterial, nameonly, freeform}

\DeclareDatamodelFields[type=list, datatype=name]{ groupauthor, narrator, execproducer, execdirector, with}

\DeclareDatamodelFields[type=list, datatype=literal]{ citation}

\DeclareDatamodelFields[type=field, datatype=literal]{ bibliography, cite, firstcite, source, article, section, amendment, appentry}

\DeclareDatamodelEntryfields{ with, groupauthor, narrator, execproducer, execdirector}

% APA Court cases \DeclareDatamodelEntryfields[jurisdiction]{ organization citation}

% Legislative material \DeclareDatamodelEntryfields[legmaterial]{ source}

% Admin and Executive material \DeclareDatamodelEntryfields[legadminmaterial]{ citation, source}

% Constitution/charters \DeclareDatamodelEntryfields[constitution]{ article, section, amendment}

\DeclareDatamodelEntryfields[software]{ appentry}

\DeclareDatamodelEntryfields[report]{ addendum, author, authortype, chapter, doi, eprint, eprintclass, eprinttype, institution, isrn, language, location, note, number, pages, pagetotal, pubstate, subtitle, title, titleaddon, type, version}

\DeclareDatamodelEntryfields[presentation]{ addendum, author, booksubtitle, booktitle, booktitleaddon, chapter, doi, editor, editortype, eprint, eprintclass, eprinttype, eventday, eventendday, eventendhour, eventendminute, eventendmonth, eventendseason, eventendsecond, eventendtimezone, eventendyear, eventhour, eventminute, eventmonth, eventseason, eventsecond, eventtimezone, eventyear, eventtitle, eventtitleaddon, isbn, language, location, mainsubtitle, maintitle, maintitleaddon, note, number, organization, pages, part, publisher, pubstate, series, subtitle, title, titleaddon, venue, volume, volumes}

\DeclareDatamodelEntryfields[freeform]{ bibliography, cite, firstcite, sortkey}

\DeclareDatamodelConstraints[book,inbook,article,report]{ \constraint[type=mandatory]{ \constraintfieldsor{ \constraintfield{author} \constraintfield{groupauthor} } \constraintfield{title} } } \end{filecontents}

\usepackage[backend=biber, style=apa, datamodel=freeform-apa]{biblatex}

\DeclareBibliographyDriver{freeform}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \printfield{bibliography}% \setunit{\addspace}\newblock \iftoggle{bbx:related} {\usebibmacro{related:init}% \usebibmacro{related}} {}% \usebibmacro{pageref}% \usebibmacro{annotation}% \usebibmacro{finentry}}

\letbibmacro{cite:standard}{cite} \letbibmacro{textcite:standard}{textcite}

\renewbibmacro*{cite}{% \ifentrytype{freeform} {\ifboolexpr{ not test {\ifciteseen} and not test {\iffieldundef{firstcite}}} {\printfield{firstcite}} {\printfield{cite}}% \setunit{\multicitedelim}} {\usebibmacro{cite:standard}}}

\renewbibmacro*{textcite}{% \ifentrytype{freeform} {\ifboolexpr{ not test {\ifciteseen} and not test {\iffieldundef{firstcite}}} {\printfield{firstcite}} {\printfield{cite}}} {\usebibmacro{textcite:standard}}}

\DeclareSourcemap{ \maps[datatype=bibtex,overwrite=false]{ \map{ \pertype{freeform} \step[fieldsource=bibliography, final] \step[fieldset=sortkey, origfieldval] \step[fieldset=cite, origfieldval] } } }

\begin{filecontents}{\jobname.bib} @freeform{cfr, bibliography = {Charter of Fundamental Rights of the European Union}, } @freeform{foo, cite = {Foo}, bibliography = {Foobar}, } @freeform{goo, firstcite = {Gfoo}, cite = {Goo}, bibliography = {Goobar}, } \end{filecontents} \addbibresource{\jobname.bib} \addbibresource{biblatex-examples.bib}

\begin{document} \autocite{sigfridsson,cfr,foo}

\autocite{goo}

\autocite{goo} \printbibliography \end{document}

Charter of Fundamental Rights of the European Union.

moewe
  • 175,683