michal-h21 / biblatex-iso690

ISO 690 style for biblatex.
LaTeX Project Public License v1.3c
93 stars 31 forks source link

Urldate functionality generates howpublished={online} [reported issue] #81

Open DavidLuptak opened 4 years ago

DavidLuptak commented 4 years ago
\newbibmacro*{medium-type}{%
  \iffieldundef{howpublished}
    {% Automatic printing of '[online]' type of medium when
     % a) 'urldate' is present AND
     % b) url is enabled (pkg option url=true) OR
     %    entry type is '@online'

It would be better if [online] will be only for @online entry types. Reasoning: 1) url and urldate are optional for every entry type [biblatex doc] 2) it seems quite surprising that including or not including the urldate is so powerful and switch on some unrelated fields (howpublished = {online}, url field format urlaso/urlfrom) 3) for entry types other than @online, howpublished = {online} should be explicitly stated in the bib file 4) resources other than of @online type could be uniquely identified based on the other fields, url and urldate are here only as a supportive information ==> implies also [online]

DavidLuptak commented 4 years ago

Maybe all this implementation is my work based on my own interpretation of the standard ISO 690 and also a minimalistic approach when creating a bib file. I admit it might be surprising how powerful the urldate field is.

Reference https://github.com/michal-h21/biblatex-iso690/commit/eb193e8e0f06af5344918412b080b3dd3ef8be04.

To be honest, when I think again this chunk of code, I would add something more

\newbibmacro*{medium-type}{%
  \iffieldundef{howpublished}
    {% Automatic printing of '[online]' type of medium when
     % a) 'urldate' is present AND
     % b) 'url', 'doi' or 'eprint' is present AND
     % c) url is enabled (pkg option url=true) OR
     %    entry type is '@online'
      \ifboolexpr{
        not test {\iffieldundef{urlyear}}
        and (   not test {\iffieldundef{url}}
             or not test {\iffieldundef{doi}}
             or not test {\iffieldundef{eprint}})
        and (   test {\iftoggle{bbx:url}}
             or test {\ifentrytype{online}})
      }

but this might be really an overkill.

I clarify the behaviour in the documentation at least, since I don't want to make some last-minute changes on my own, better to discuss them. The reporter of this issue (point n.4) and @moewew in https://github.com/michal-h21/biblatex-iso690/issues/80#issuecomment-602223588 agreed actually on one thing, and so that the printing of [online] is somehow redundant. So maybe it is really worth to switch from this automatic machinery (creators of a bib file could save a line with howpublished = {online} in their entries; intuitive for some and surprising for the others at the same time) to the explicit recording the howpublished fields.