0

I use \footcite command to add my references and style=numeric and citestyle=authoryear in my document. So far everything is fine, besides I need to put the "year" field directly after the "author" field. I have tried different ways mentioned here, but either the style of footnote would be changed, or the style doesn't meet the requirement in references.

well, let the MWE talk:

\documentclass{article}
\usepackage[%
    backend=biber,
    style=numeric,
    citestyle=authoryear,
    doi=true,
    url=true
    ]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{test.bib}
    @book{Foo,
        title={Book title1},
        author={Author1 AB},
        year= {Year1},
    }
    @book{Bar,
        title={Book title2},
        author={Author2 AB},
        year= {Year2},
    }
\end{filecontents}

\addbibresource{test.bib}
\begin{document}

text\footcite{Foo}, and text\footcite{Bar}


%\nocite{*}

\printbibliography

\end{document}

So, how can I reorder the fields and keep the rest styles as they were?

p.s. The reason why I use authoryear style in the footnote is that the readers could have a rough idea about the citation when they are reading the paper in a print version. I have attached a screenshot blow: screenshot of citation in footnote

If there is only a number like 1 or 2, like:

screenshot of numbers in footnote

it wouldn't make much sense for the readers, would it?

Hope this could explain why I am trying to bring a little more info in the footnote about the citation.

Below a new MWE with an enumerate env added in the preamble (sorry, seems I don't have enough reputation to post more than 2 links...):

documentclass{article}

\usepackage[%
        backend=biber,
        style=authoryear,
        %citestyle=authoryear,
        labelnumber=true,
        doi=true,
        url=true
        ]{biblatex}

\defbibenvironment{bibliography}
{\enumerate{}
%{\list{}
{\printfield[labelnumberwidth]{labelnumber}}
{\setlength{\leftmargin}{\bibhang}%
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibitemsep}%
    \setlength{\parsep}{\bibparsep}}}
%\renewcommand*{\makelabel}[1]{\hss##1}}
{\endenumerate}
%{\endlist}
{\item}

\usepackage{filecontents}

\begin{filecontents}{test.bib}
    @book{Foo,
        title={Book title1 whatever whatever whatever and tuff tuff
        and gong gong},
        author={Author1, AB and Author2, CD and Author3, EF},
        year= {Year1},
    }
    @book{Bar,
        title={Book title2},
        author={Author2, AB},
        year= {Year2},
    }
\end{filecontents}

\addbibresource{test.bib}
\begin{document}

text\footcite{Foo}, and text\footcite{Bar}


%\nocite{*}

\printbibliography

\end{document}

Now I have a perfect footnote and numbered entries in references part, but how can I add a pair of square bracket to the numbers which exactly numeric style does?

Qiuyew
  • 105
  • What I don't understand is why you don't just use style=authoryear and be done with it. Have a look at biblatex-biber: How to customize the order in the bibliography? and Biblatex enumerating sorted bibliography (using authoryear-ibid style). Do you even use the labels of the numeric style in your citations? – moewe Aug 12 '15 at 05:42
  • Depends on what you want \footcite to output. What I don't understand is why you want a numeric style in the first place if your desired output in the footnote is not the numeric label but something else entirely. Maybe you can edit your post to make clear what you want to get as output. (Try to produce a mock-up, maybe...) – moewe Aug 12 '15 at 16:13
  • Thanks for the tips. I have actually tried the way mentioned in the first link and turns out that the part of references seems perfect, but there is only numbers left in footnote due to \footcite command. Is there a way to modify the style of footcite? With the way mentioned in second link, citation in footnote seems fine, I only need to add a squre bracket to the number of entries. But how? – Qiuyew Aug 12 '15 at 16:14
  • How about you use the solution in your second link and update your MWE (using the new solution) and then specify what you want (i.e. the numeric labels)? – moewe Aug 12 '15 at 16:16
  • Sorry, don't have enough rep to insert another screenshot, but basically I just need add a pair of square bracket to the number of entries in the reference part like "[1]" and "[2]" instead of "1." and "2." which the numeric style does. – Qiuyew Aug 12 '15 at 16:58
  • Never mind the screen shot: It is perfectly clear from your description what you want. What need then is a mixture of both approaches: Just replace the \defbibenvironment{bibliography} {\enumerate{} %{\list{} {\printfield[labelnumberwidth]{labelnumber}} {\setlength{\leftmargin}{\bibhang}% \setlength{\itemindent}{-\leftmargin}% \setlength{\itemsep}{\bibitemsep}% \setlength{\parsep}{\bibparsep}}} %\renewcommand*{\makelabel}[1]{\hss##1}} {\endenumerate} %{\endlist} {\item} block by \makeatletter \input{numeric.bbx} \makeatother. – moewe Aug 12 '15 at 17:01
  • Wow, it just made it. That's amazing. Thanks for the excellent tips @moewe! – Qiuyew Aug 12 '15 at 17:10
  • Would you mind if we were to close your question as a duplicate of http://tex.stackexchange.com/q/248726/35864, then? Really the only thing different is that you have style=authoryear while there we have citestyle=numeric-comp, bibstyle=authoryear, (and the xpatch). – moewe Aug 12 '15 at 17:13

0 Answers0