这是使用 \footcite 和 \cite 与 \printbibliography
我的文档中必须包含两种参考文献。引用网络资源的脚注和文档末尾的标准参考文献。
目标是,脚注引用不会出现在参考书目中。因此,我使用了引用这种方法效果很好。唯一的问题是,参考书目中的参考文献跳过了数字。有什么办法可以解决这个问题吗?
\documentclass{article}
\usepackage[backend=biber, style=numeric]{biblatex}
\addbibresource{references.bib}
\DeclareBibliographyCategory{skipbib}
\DeclareCiteCommand{\myfootcite}[\mkbibfootnote]
{\usebibmacro{prenote}}
{\addtocategory{skipbib}{\thefield{entrykey}}%
\usedriver
{\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\begin{document}
Lorem ipsum \cite{handa_nepomuk_2013} test\myfootcite{colomb_ontology_2007} dolor\myfootcite{adams1995hitchhiker} sit amet.
\printbibliography[notcategory=skipbib]
\end{document}
参考文献.bib:
@book{adams1995hitchhiker,
title={The Hitchhiker's Guide to the Galaxy},
author={Adams, D.},
isbn={9781417642595},
url={http://books.google.com/books?id=W-xMPgAACAAJ},
year={1995},
publisher={San Val}
}
@book{colomb_ontology_2007,
title = {Ontology and the semantic web},
isbn = {9781586037291},
pagetotal = {258},
publisher = {{IOS} Press},
author = {Colomb, Robert M.},
date = {2007}
}
@letter{handa_nepomuk_2013,
title = {Nepomuk in 4.13 and beyond},
url = {https://mail.kde.org/pipermail/nepomuk/2013-December/004858.html},
type = {E-mail},
author = {Handa, Vishesh},
urldate = {2014-12-01},
date = {2013-12-12},
}
结果:
答案1
biblatex
使用选项加载defernumbers
。这确实是我原来的答案的问题。我也已经解决了这个问题。
MWE(filecontents
将覆盖现有的.bib
同名文件而不发出警告)
\documentclass{article}
\usepackage[backend=biber, style=numeric, defernumbers]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{adams1995hitchhiker,
title={The Hitchhiker's Guide to the Galaxy},
author={Adams, D.},
isbn={9781417642595},
url={http://books.google.com/books?id=W-xMPgAACAAJ},
year={1995},
publisher={San Val}
}
@book{colomb_ontology_2007,
title = {Ontology and the semantic web},
isbn = {9781586037291},
pagetotal = {258},
publisher = {{IOS} Press},
author = {Colomb, Robert M.},
date = {2007}
}
@letter{handa_nepomuk_2013,
title = {Nepomuk in 4.13 and beyond},
url = {https://mail.kde.org/pipermail/nepomuk/2013-December/004858.html},
type = {E-mail},
author = {Handa, Vishesh},
urldate = {2014-12-01},
date = {2013-12-12},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\DeclareBibliographyCategory{skipbibliography}
\DeclareCiteCommand{\myfootcite}[\mkbibfootnote]
{\usebibmacro{prenote}}
{\addtocategory{skipbibliography}{\thefield{entrykey}}%
\usedriver
{\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\begin{document}
Lorem ipsum \cite{handa_nepomuk_2013} test\myfootcite{colomb_ontology_2007} dolor\myfootcite{adams1995hitchhiker} sit amet.
\printbibliography[notcategory=skipbibliography]
\end{document}