我希望在我的文章部分下的参考书目中获得连续的数字,但是由于我@misc
在文章部分中包含了超链接,所以我得到的结果如下:
\documentclass[11pt,fleqn]{book}
\usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,a4paper]{geometry} \usepackage{xcolor}
\definecolor{ocre}{RGB}{243,102,25}
\usepackage{avant}
\usepackage{mathptmx}
\usepackage{microtype}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{calc}
%\usepackage[refsection=chapter,sorting=nyt,backend=biber]{biblatex}
\usepackage[refsection=chapter,defernumbers=true,sorting=nyt,sortcites=true,autopunct=true,babel=hyphen,hyperref=true,abbreviate=false,backref=true,backend=biber]{biblatex}
\defbibheading{bibempty}{}
\addbibresource{5.bib}
\usepackage{empheq}
\usepackage{calc}
\usepackage{makeidx}
\makeindex
\newcommand*{\refname}{Bibliography}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{book1,
address = {New York},
publisher = {John Wiley \& Sons},
author = {Egan, Willian F.},
title = {Phase-Lock Basics},
year = {1998},
%volume = {3},
%series = {2},
edition = {1},
pages = {3--4},
%month = {January}
}
@article{art1,
address = {City},
publisher = {Myself},
author = {Doe, John},
title = {Synthesizer Modulation},
year = {1979},
%volume = {14},
%number = {6},
%pages = {1--8},
month = {June}
}
@book{book2,
address = {New York},
publisher = {John Wiley \& Sons},
author = {Gardner, Floyd M.},
title = {Phaselock Techniques},
year = {2005},
%volume = {14},
%number = {6},
pages = {6--28},
%month = {June}
}
@book{book3,
address = {California},
publisher = {Benjamin/Cummings},
author = {Norman S.},
title = {Control Systems Engineering},
year = {1995},
%volume = {3},
%series = {2},
edition = {2},
pages = {231--232},
%month = {February}
}
@article{art2,
address = {Plantation},
publisher = {Myself},
author = {Me.},
title = {Lock Time Performance},
year = {1990},
%volume = {14},
%number = {6},
%pages = {1--8},
month = {June}
}
@misc{pll_wikipedia,
howpublished = {\url{http://en.wikipedia.org/wiki/Phase-locked loop}},
author = {Wikipedia},
%note = {Last visited on <insert date here>},
title = {Phase-Locked Loop},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\chapter{Chapter 1}
Some text \autocite{book1,art1}.
\section{Second}
Some text \autocite{book2}.
Some text \autocite{book1}.
Some text \autocite{art2}.
Some text \autocite{art1}.
Some text \autocite{pll_wikipedia}.
\chapter*{Bibliography}
\addcontentsline{toc}{chapter}{\textcolor{ocre}{Bibliography}}
\section*{Books}
\addcontentsline{toc}{section}{Books}
\printbibliography[heading=bibempty,type=book,prefixnumbers={B}]
\section*{Articles}
\addcontentsline{toc}{section}{Articles}
\printbibliography[heading=bibempty,type=article,prefixnumbers={A}]
\printbibliography[heading=bibempty,type=misc,prefixnumbers={A}]
\chapter{Chapter 2}
Some text \autocite{book2}
\chapter*{Bibliography}
\addcontentsline{toc}{chapter}{\textcolor{ocre}{Bibliography}}
\section*{Books}
\addcontentsline{toc}{section}{Books}
\printbibliography[heading=bibempty,type=book,prefixnumbers={B}]
\section*{Articles}
\addcontentsline{toc}{section}{Articles}
\printbibliography[heading=bibempty,type=article,prefixnumbers={A}]
\printbibliography[heading=bibempty,type=misc,prefixnumbers={A}]
\end{document}
尽管我有一个超链接引用,但我希望文章编号能够继续在章节内。
答案1
您有不同的选择。请注意,我已更改Wikipedia
为ikipedia
只是为了展示排序机制的工作原理。
如果你想要一个单独的条目书目
@misc
,你可以添加类似\section*{Online} \addcontentsline{toc}{section}{Online} \printbibliography[heading=bibempty,type=misc,prefixnumbers={O}]
其结果将是:
如果您不想为条目设置单独的参考书目,并且除了 之外
@misc
您只有@misc
和条目,则可以使用henrique 建议的选项@article
@book
nottype=book
\printbibliography[heading=bibempty,nottype=book,prefixnumbers={A}]
其结果将是:
正如您所见
@misc
,@article
条目是混合的。如果您不喜欢以前的行为(混合
@misc
和@article
条目),并且希望所有@misc
条目都在条目之后列出@article
,则可以采用以下技巧:将字段添加presort = {zz}
到所有@misc
条目,例如@misc{pll_wikipedia, howpublished = {\url{http://en.wikipedia.org/wiki/Phase-locked loop}}, author = {ikipedia}, %note = {Last visited on <insert date here>}, title = {Phase-Locked Loop}, presort = {zz} }
该字段
presort
是第一个用于排序的字段,如果未指定,则其值为mm
。其结果将是:
如果您的条目类型不同于
@misc
和,并且您想要一个仅列出和条目@article
的参考书目,您可以按照以下步骤操作:在序言中添加一个新的“过滤器”:@misc
@article
\defbibfilter{extarticle}{% type=article or type=misc }
然后替换行
\printbibliography[heading=bibempty,nottype=book,prefixnumbers={A}]
和
\printbibliography[heading=bibempty,filter=extarticle,prefixnumbers={A}]
警告
如果编译后没有得到上述结果,则必须在重新编译之前删除所有辅助文件(至少是.aux
和.bbl
)。