0

I am using Overleaf and I am trying to fix a problem with the Bibliography.

The problem I am having is I am not able to force biblatex to show the organization field in the bibliography.

First of all, I am using biblatex for the bibliography. I am also using the APA6 style.

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

I will provide an example of what needs to be achieved using Microsoft Word. And I will also show the current state in which the bibliography is printed in Overleaf.

Let's start with the desired result. The following snippet shows the bibliography field in the desired form, which was created in Microsoft Word:

Usability. (n.d.). Retrieved May 4, 2021, from Interaction Design Foundation: https://www.interaction-design.org/literature/topics/usability

The key thing to look for on the snippet above is the part that goes after "Retrieved May 4, 2021" and before the URL.

Whereas in Overleaf I am only able to achieve the following format:

Usability. (n.d.). Retrieved May 4, 2021, from https://www.interaction-design.org/literature/topics/usability

The problem with the snippet above, is that it's lacking the "from Interaction Design Foundation" part, which is crucial in referencing when using APA style.

The following snippet shows the reference in the .bib file:

@online{usability_definition_designfoundation,
    title = {Usability},
    urldate = {2021-05-04},
    organization = {Interaction Design Foundation},
    url = {https://www.interaction-design.org/literature/topics/usability},
    keywords = {usability, definition},
}

I did my best to explain the situation, please let me know if something is not clear, I will try to clarify.

2 Answers 2

1

The url format is defined in the file apa6.bbx. You can copy this definition and add the organization there. Of course it should also work if there is no organization, so you can add a check if the organization is present, if yes print it and the surrounding spaces and punctuation, if no don't print anything. The check is for example as follows:

\iflistundef{organization}{}{\addspace\printlist{organization}\addcolon}

You can use \xpatchbibmacro from the xpatch package to modify bibliography macros. The macro used for printing urls is called url+urldate. This macro contains a line that prints from (in the current language). After this line the modification that prints organizations can be added.

The syntax of \xpatchbibmacro is:

\xpatchbibmacro{macroname}{search string}{replace string}
{code to execute on succesful patch}{code to execute on failed patch}

The final two arguments can be left empty as in the MWE below.

MWE:

\documentclass{article}
\usepackage{xpatch}
\begin{filecontents}{\jobname.bib}
@online{usability_definition_designfoundation,
    title = {Usability},
    urldate = {2021-05-04},
    organization = {Interaction Design Foundation},
    url = {https://www.interaction-design.org/literature/topics/usability},
    keywords = {usability, definition},
}
@online{noorg,
    title = {Checkability},
    urldate = {2021-05-04},
    url = {https://www.example.com},
}

\end{filecontents}

\usepackage[style=apa6]{biblatex}
\addbibresource{\jobname.bib}

\xpatchbibmacro{url+urldate}{\printtext{\bibstring{from}}}{%
\printtext{\bibstring{from}}%
\iflistundef{organization}{}{\addspace\printlist{organization}\addcolon}}{}{}

\begin{document}
See \cite{usability_definition_designfoundation}.

Without organization: \cite{noorg}.

\printbibliography
\end{document}

Result:

enter image description here


For completeness the same without xpatch, by copying the full macro definition and adding the modification:

\documentclass{article}
\begin{filecontents}{\jobname.bib}
@online{usability_definition_designfoundation,
    title = {Usability},
    urldate = {2021-05-04},
    organization = {Interaction Design Foundation},
    url = {https://www.interaction-design.org/literature/topics/usability},
    keywords = {usability, definition},
}
@online{noorg,
    title = {Checkability},
    urldate = {2021-05-04},
    url = {https://www.example.com},
}

\end{filecontents}

\usepackage[style=apa6]{biblatex}
\addbibresource{\jobname.bib}
% copied from apa6.bbx
\renewbibmacro*{url+urldate}{%
     \ifthenelse{\(\iffieldundef{url}\AND\iffieldundef{abstracturl}\AND\iffieldundef{abstractloc}\)\OR\NOT\iffieldundef{doi}}
       {}
       {\ifthenelse{\iffieldundef{abstracturl}\AND\iffieldundef{abstractloc}}
         {}
         {\printtext{\bibcpstring{abstract}}\addspace}%
         \iffieldequalstr{entrysubtype}{{DVD}}
           {\printtext{\bibstring{available}}}
           {\printtext{\bibstring{retrieved}}}%
          \setunit{\addspace}%
          \iffieldundef{urlyear}
            {}
            {\printtext{\printurldate}%
             \setunit*{\urldatecomma}}%
          \printtext{\bibstring{from}}%
          \iflistundef{organization}{}{\addspace\printlist{organization}\addcolon}
          \setunit*{\addspace}%
          \printfield{urldescription}%
          \setunit*{\addcolon\addspace}%
          \iffieldundef{url}{}{\printfield{url}\renewcommand*{\finentrypunct}{\relax}}%
          \iffieldundef{abstractloc}{}{\printfield{abstractloc}\renewcommand*{\finentrypunct}{\relax}}%
          \iffieldundef{abstracturl}{}{\printfield{abstracturl}\renewcommand*{\finentrypunct}{\relax}}}}



\begin{document}
See \cite{usability_definition_designfoundation}.

Without organization: \cite{noorg}.


\printbibliography
\end{document}
1
  • Thank you so much for your reply!
    – AArtlone
    Commented May 8, 2021 at 12:49
1

biblatex-apa6 has a special field called urldescription to insert some organization (or other) details before the URL

\documentclass{article}
\usepackage[style=apa6]{biblatex}

\begin{filecontents}{\jobname.bib}
@online{usability_definition_designfoundation,
  title          = {Usability},
  urldate        = {2021-05-04},
  urldescription = {Interaction Design Foundation},
  url            = {https://www.interaction-design.org/literature/topics/usability},
  keywords       = {usability, definition},
}
@online{noorg,
  title   = {Checkability},
  urldate = {2021-05-04},
  url     = {https://www.example.com},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
See \autocite{usability_definition_designfoundation}.

Without organization: \autocite{noorg}.

\printbibliography
\end{document}

Checkability. (n.d.). Retrieved May 4, 2021, from https://www.example.com//Usability. (n.d.). Retrieved May 4, 2021, from Interaction Design Foundation: https://www.interaction-design.org/literature/topics/usability

Such a field is not available with biblatex-apa (which implements 7th edition APA style).

3
  • This is exactly what I needed, thanks a lot! Where did you find this "urldescription" field? I have spent quite some time searching the internet and I have never seen this field. Even the Biblatex Cheat Sheet does not have it: tug.ctan.org/info/biblatex-cheatsheet/biblatex-cheatsheet.pdf
    – AArtlone
    Commented May 8, 2021 at 12:52
  • @AArtlone I found it by looking at the code, but it can also be found in the extensive .bib entry example file that ships with biblatex-apa6: github.com/plk/biblatex-apa/blob/…. The field is not a biblatex standard field, it is specific to biblatex-apa6.
    – moewe
    Commented May 8, 2021 at 12:54
  • Damn, I was not able to find that myself, thanks a lot.
    – AArtlone
    Commented May 11, 2021 at 11:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .