下列的http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/biblatex-chicago
我制作了以下最小示例,在使用authordate 样式时,首次将完整引用放在边注中:
\documentclass{article}
\usepackage[citetracker=true,ibidtracker=false,authordate]{biblatex-chicago}
\bibliography{biblatex-examples}
\makeatletter
\DeclareCiteCommand{\parencite}[\mkbibparens]
{\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{notefullcite}%
\usebibmacro{cite}}
{}%\setunit{\multicitedelim}
{\usebibmacro{postnote}}
\newbibmacro*{notefullcite}{%
\ifciteseen
{}
{\nopunct\unspace\marginpar{%
\usedriver{}{%
\thefield{entrytype}}.}}}
\makeatother
\begin{document}
Text \parencite{hammond}.
Text \parencite{cotton,hammond}.
Some filler text \parencite{cotton}.
Some text\parencite{cotton}.
Text \parencite{cotton,hammond}.
\end{document}
但是使用此代码,在第一次使用 parencite 进行引用之前,biblatex 会在“(”后添加一个额外的空格。
我试图找到这个空格的来源,但是失败了。我希望删除\unspace
它,但是没有成功。我认为这个空格是由宏生成的\printnames
,cmsbracketname
但是我不知道该怎么做=[。
我在用着:
- % $Id: biblatex-chicago.sty,v 0.1.1.31 2011/02/15 11:56:42 dfussner Exp $
- % $Id: chicago-authordate15.bbx,v 0.8.1.2 2011/09/21 10:53:07 dfussner Exp $
- % $Id: chicago-authordate15.cbx,v 0.8.1.4 2011/09/21 10:53:18 dfussner Exp $
- % $Id: biblatex.sty,v 1.6 2011/07/29 19:21:28 lehman stable $
答案1
使用以下定义:
\newbibmacro*{notefullcite}{%
\ifciteseen%
{}%
{\marginpar{%
\usedriver{}{%
\thefield{entrytype}}\finentry}}}
以下是完整示例及其结果:
\documentclass{article}
\usepackage[citetracker=true,ibidtracker=false,authordate]{biblatex-chicago}
\bibliography{biblatex-examples}
\DeclareCiteCommand{\parencite}[\mkbibparens]
{\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{notefullcite}%
\usebibmacro{cite}}
{}%\setunit{\multicitedelim}
{\usebibmacro{postnote}}
\newbibmacro*{notefullcite}{%
\ifciteseen%
{}%
{\marginpar{%
\usedriver{}{%
\thefield{entrytype}}\finentry}}}
\begin{document}
Text \parencite{hammond}.
Text \parencite{cotton,hammond}.
Some filler text \parencite{cotton}.
Some text\parencite{cotton}.
Text \parencite{cotton,hammond}.
\end{document}