我对参考书目有很多疑问。
我阅读了 BibLaTeX 手册,但找不到修复它的方法。
以下是来源:
\documentclass[]{report}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage[italian]{babel}
\usepackage{csquotes}
\usepackage{biblatex}
\addbibresource{biblio.bib}
\begin{document}
\tableofcontents
\noindent\hrulefill
\section{foo}
\cite{1tree} \& \cite{wiki1}
\noindent\hrulefill
\printbibliography
\noindent\hrulefill
\end{document}
这是我的 biblio.bib:
@misc{wiki1,
author = {Wikipedia},
title = {Disuguaglianza Triangolare},
year ={2015},
url ={https://it.wikipedia.org/wiki/Disuguaglianza_triangolare},
}
@online{1tree,
author = {Universit\`a di Torino},
title = {Definizione 1-Tree, TSP Lower Bound},
date = {date},
url = {http://www.di.unito.it/~locatell/didattica/ro2/TSPnewbound-sl.pdf},
}
输出结果如下:
我也可以使用
\defbibfilter{online}{ type=online }
\defbibfilter{offline}{ not type=online }
和
\printbibliography[filter=online]
我究竟做错了什么?
附言:我正在使用 TeXStudio 和 MikTeX
答案1
问题可能出在date
格式上,格式应该是yyyy-mm-dd
。使用这种格式,编译正常,过滤器也能正常工作。别忘了遵循以下循环:pdflatex -> biber -> pdflatex ->pdflatex
:
\documentclass[italian]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{biblatex}
\addbibresource{somebiblio.bib}
\defbibfilter{online}{type=online }
\defbibfilter{offline}{not type=online }
\begin{document}
\tableofcontents
\noindent\hrulefill
\section{foo}
\cite{1tree} \& \cite{wiki1}
\noindent\hrulefill
\printbibliography[filter =online]
\printbibliography[filter =offline]
\noindent\hrulefill
\end{document}