Closed Dominik-97 closed 2 years ago
First issue is that you don't have an author in your .bib
file. It is required to include it. If the author is unknown, use author={Anon}
.
There is no period between [online] and citation date because you don't have any publisher information in the bib file. You can test for their missing using the following redefinition of the urldate
macro:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage[headheight=2cm,]{geometry}
\usepackage[most]{tcolorbox}
\usepackage{lipsum}
\usepackage{pgfplots}
\usepackage{xcolor}
\usepackage{multirow}
\usepackage{tikz}
\usepackage[hyphens, spaces, obeyspaces]{url}
\usepackage{hyperref}
% ...
\usepackage[backend=biber,defernumbers=true,style=iso-authoryear,]{biblatex}
\addbibresource{Zdroje/Zdroje.bib}
% ...
\DeclareFieldFormat[misc]{urldate}{[cit. #1].}
\DeclareFieldFormat[misc]{url}{Dostupné z: \url{#1}}
% The url seen date of @online entries is always printed
\renewbibmacro*{urldate}{%
% if there is no publisher specified in the bib file, set unit to period
\ifboolexpr{%
test {\iflistundef{publisher}}%
and test {\iflistundef{location}}%
}{\setunit{\adddot\addspace}}%
{\setunit{\addspace}}%
\ifboolexpr{
test {\iftoggle{bbx:url}}
or test {\ifentrytype{online}}
}
{\printurldate}%
{}%
}
% ...
\begin{document}
% ...
%\include{...}
Some text\footfullcite{example}.
% ...
\printbibliography[omitnumbers=true,type=misc,heading=subbibliography,title={Online zdroje}]
% ...
\end{document}
The macro redefinition works for me, I had to add the following line:
\providetoggle{bbx:url}
I am not exactly sure what it does, however when compiling without this line, the compiler throws the following error:
Package etoolbox Error: Toggle 'bbx:url' undefined.
See the etoolbox package documentation for explanation.
Might be because I am using an older version of MacTex (TeX Live 2019) and biber (2.12).
Could you please confirm, wheter providing the toggle is the correct solution to the problem?
If so, I think we can consider this issue resolved.
Thank you very much
Ah, it is quite old distribution. You may want to add also the following line, to actually print the URL date:
\settoggle{bbx:url}{true}
Works great, thank you.
MWE:
From compiling the MWE I get this:
According to ISO 690, I should get this:
Current workaround is to add
howpublished = {online},
for the entry in a bib file and either using the\DeclareFieldFormat[misc]{howpublished}{[#1].}
or editing the bibmacro.