0

I am writing a scientific paper with LaTeX and am having some troubles with the bibliography. In previous posts I couldn't find a similar problem. I would like to display my URL as:

Telegram (2018). Telegram FAQ. https : / / telegram . org / faq # q - what - is- telegram- what- do- i- do- here. (14.10.2018)

or

Telegram (2018). Telegram FAQ. https : / / telegram . org / faq # q - what - is- telegram- what- do- i- do- here. (Last accessed: 14.10.2018)

Everything except for the date at the end is done automatically by LaTeX. For the "last accessed" date, I couldn't find a way for it to show except when using the "notes" field. This is an example entry, where the last accessed date is named "Lastchecked". This is done by BibDesk for all of the entries and I would like to keep the name.

@url{telegene,
    Author = {Telegram},
    Lastchecked = {14.10.2018},
    Title = {Telegram FAQ},
    Url = {https://telegram.org/faq#q-what-is-telegram-what-do-i-do-here},
    Year = {2018}}

These are the packages I have installed:

\usepackage[style=authoryear-ibid]{biblatex}%citation style
\DeclareNameAlias{sortname}{family-given}%consistent order of names
\DefineBibliographyStrings{ngerman}{andothers = {{et\,al\adddot}},} %for et al
\DeclareFieldFormat{url}{\url{#1}} %remove "url:"
  • biblatex uses the field urldate instead of Lastchecked. The date must be given in YYYY-MM-DD format (ISO 8601), so you should try urldate = {2018-10-14}, – moewe Nov 6 '18 at 17:18
  • @moewe Is there any way to use Lastchecked instead with the format 14.10.2018? I would have to change around 100 entries I've already created... – Juan Nov 6 '18 at 17:54
2

biblatex does not know the field lastchecked, the access date must be given in the urldate field in the format YYYY-MM-DD (ISO 8601). This should be changed in the data source. Reference managers like BibDesk should have an option for that.

If you can't find that option, there is a way to use Biber's source mapping to use the correct field and reformat the data accordingly.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear-ibid]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@url{telegene,
    Author = {Telegram},
    Lastchecked = {14.10.2018},
    Title = {Telegram FAQ},
    Url = {https://telegram.org/faq#q-what-is-telegram-what-do-i-do-here},
    Year = {2018}}
\end{filecontents}

\addbibresource{\jobname.bib}

\DeclareSourcemap{
  \maps{
    \map{
      \step[fieldsource=lastchecked, final]
      \step[fieldset=urldate, origfieldval]
      \step[fieldsource=urldate, match=\regexp{([0-9]{2}).([0-9]{2}).([0-9]{4})}, replace={$3-$2-$1}]
    }
  }
}

\begin{document}
\cite{telegene}
\printbibliography
\end{document}

Telegram (2018). Telegram FAQ. url: https://telegram.org/faq#q-what-is-telegram-what-do-i-do-here (visited on 14/10/2018).

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.