重新编号参考文献中的参考书目

重新编号参考文献中的参考书目

我希望在我的文章部分下的参考书目中获得连续的数字,但是由于我@misc在文章部分中包含了超链接,所以我得到的结果如下:

enter image description here

    \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

您有不同的选择。请注意,我已更改Wikipediaikipedia只是为了展示排序机制的工作原理。

  1. 如果你想要一个单独的条目书目@misc,你可以添加类似

    \section*{Online}
    \addcontentsline{toc}{section}{Online}
    \printbibliography[heading=bibempty,type=misc,prefixnumbers={O}]
    

    其结果将是:

    enter image description here

  2. 如果您不想为条目设置单独的参考书目,并且除了 之外@misc您只有@misc和条目,则可以使用henrique 建议的选项@article@booknottype=book

    \printbibliography[heading=bibempty,nottype=book,prefixnumbers={A}]
    

    其结果将是:

    enter image description here

    正如您所见@misc@article条目是混合的。

  3. 如果您不喜欢以前的行为(混合@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

    其结果将是:

    enter image description here

  4. 如果您的条目类型不同于@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)。

相关内容