0

I have a custom cite command which insert in a footnote the url and the consultation date, and print all tje information in the bibliography. It's works fine with the default style but when I use the IEEE style, I got the following error : Bibliography macro : 'cite' undefined :

My MWE :

\documentclass[11pt, twoside]{article}
\usepackage[french]{babel}
  \FrenchFootnotes % à insérer si on utilise \usepackage[french]{babel}
  \AddThinSpaceBeforeFootnotes % à insérer si on utilise \usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[sorting=none,]{biblatex}
  \addbibresource{biblio.bib} 


    % URL in fn and in bibliography 
    \DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
    \renewbibmacro*{url+urldate}{%
      \usebibmacro{url}%
      \iffieldundef{urlyear}
        {}
        {\setunit*{\addcomma\space}%
         \usebibmacro{urldate}}}

    \DeclareCiteCommand{\fnurlcite}[\mkbibfootnote]
      {\usebibmacro{prenote}}
      {\usebibmacro{citeindex}%
       \usebibmacro{url+urldate}%
       \setunit{\addspace}%
       \printtext[labelnumberwidth]{\usebibmacro{cite}}}
      {\multicitedelim}
      {\usebibmacro{postnote}}

     \begin{document}
        MWE\fnurlcite{wiki_cloudComputing}
        \printbibliography[]
     \end{document}

and the result :

Result without IEEE style

If I change \usepackage[sorting=none,]{biblatex} to \usepackage[sorting=none,style=ieee]{biblatex}, like define in this post : How to use biblatex with IEEE bibtex style?

I got the following error :

enter image description here

Does anyone know how to fix this ?

Thanks in advance!

1 Answer 1

2

The ieee style is based on the standard numeric-comp one. The latter does not use a cite bibliography macro, rather a cite:comp one, so the change needed is simply to change

\usebibmacro{cite}

to

\usebibmacro{cite:comp}

or perhaps for safety

\usebibmacro{cite:init}
\usebibmacro{cite:comp}
\usebibmacro{cite:dump}

as pointed out by moewe.

Note that these macros are basically 'internal' to the styles: none of them are documented formally.

2
  • To be on the safe side I would call all three cite:... macros: \usebibmacro{cite:init}\usebibmacro{cite:comp}\usebibmacro{cite:dump} otherwise we may end up with unwanted effects in multi-cite situations
    – moewe
    Jul 10, 2019 at 15:46
  • @moewe Fair enough. My point in a way was that this is using internals from a style, so really 'check the base style' would be a place to begin.
    – Joseph Wright
    Jul 10, 2019 at 15:53

You must log in to answer this question.

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