7

I need some help for using the \footcite command together with Biblatex. I’m using the authoryear style.

According to the guidelines for my thesis, the footnote must have the following structure:

Last name of Author (Year), p. X.

I already found the following solution for this problem:

\renewbibmacro*{cite:labelyear+extrayear}{%
\iffieldundef{labelyear}
{}
{
\printtext[bibhyperref]{%
\printtext[parens]{
\printfield{labelyear}%
\printfield{extrayear}}}}}

But when I use this, the following output is generated: Footnote http://dl.dropbox.com/u/1005161/Footnote.JPG

The problem is the space after the bracket. Do you have any idea, why this happens? Also how can I disable the first name in the footnote citation?

Also the perfect solution would be a space between the numberof the footnote and the author. But that is not so important.

  • While the footnote has the requested output, \textcite[88]{A01} leads to "Author ([2001], p. 88)", which is undesirable. See also comment here. – lactea Mar 12 '16 at 13:15
  • Issue posted as a separate question. – lactea Mar 13 '16 at 13:49
6

If the first name is displayed with style=authoryear and \footcite, you're doing something wrong -- my guess is an additional set of braces around the author in your .bib file.

The formatting of the footnote has nothing to do with biblatex. You may use, e.g., the scrextend package (part of KOMA-Script) to get a space between footnote mark and text.

EDIT: Added solution for "semicolon after title of articles".

EDIT 2: It seems you need semicolons after every "unit". Try to remove the redefinition of the in: bibmacro and add instead \renewcommand*{\newunitpunct}{\addsemicolon\space}.

\documentclass{article}

\usepackage{scrextend}
\deffootnote{1.5em}{1em}{\textsuperscript{\thefootnotemark}~}

\usepackage[style=authoryear,autocite=footnote]{biblatex}

\renewbibmacro*{cite:labelyear+extrayear}{%
\iffieldundef{labelyear}
  {}
  {\printtext[bibhyperref]{%
   \printtext[parens]{% <- space
   \printfield{labelyear}%
   \printfield{extrayear}}}}}

\renewbibmacro{in:}{%
  \ifentrytype{article}{%
    \setunit{\addsemicolon\space}%
    \printtext{\bibstring{in}\intitlepunct}%
  }{%
    \printtext{\bibstring{in}\intitlepunct}%
  }%
}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
  journaltitle = {A Journal},
  volume = {1},
  number = {1},
}
@misc{B02,
  author = {{Buthor, B.}},% Too many braces!
  year = {2002},
  title = {Bravo},
  location = {There},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

Some text \autocite{A01}.

Some text \autocite{B02}.

\printbibliography

\end{document}
  • Thanks, you are right. I tried to customize the appearance of my bibliography and it also had an effect on the footnotes. But now everything is working! – Julien Oct 7 '11 at 16:08
  • 1
    @Julien: You're welcome -- and don't forget to upvote (and possibly accept) my answer. :-) – lockstep Oct 7 '11 at 16:10
  • If you answer me one more questions, you get all the votes you need :) In my bibliography I want a semicolon after the titel of the article. I was not able to find a solution for this either. – Julien Oct 7 '11 at 16:11
  • I'm sorry, but I have another question. I tried to rewrite your solution so it will work also for books and incollections in the same way, but my solutions do not work. Also I need semicolons befor and after the editor. Here is an example: Poser, H. (1990): Title; In: Title Book; Ed. by Name, A.; New York: Publisher; pp. 13–27. – Julien Oct 7 '11 at 18:36
  • Ok, everthing works fine, thank you again. Now hopefully the last question. I need the author in bold, but the editor unchanged. Also the the book title in italic without quotation marks. – Julien Oct 9 '11 at 17:16
7

You have spurious spaces in your code:

\renewbibmacro*{cite:labelyear+extrayear}{%
\iffieldundef{labelyear}
  {}
  {\printtext[bibhyperref]{%
   \printtext[parens]{% <- space
   \printfield{labelyear}%
   \printfield{extrayear}}}}}
  • Thank you very much, apperently I still have no clue of biblatex. Do you have any solution for getting the space between the number of the footnote and the author? Also how to suppress the first name? – Julien Oct 7 '11 at 11:01

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.