在 BiBTeX 中按条目类型(杂项、书籍等)对文献进行排序的问题

在 BiBTeX 中按条目类型(杂项、书籍等)对文献进行排序的问题

编辑:我编辑了一个“主要”文件并添加了一个.bib文件。

我对 BibTeX 有疑问 - 具体来说就是按条目类型对文献进行排序。文件.cls这里并且.bst文件是这里

错误:

! LaTeX Error: Command \bibhang already defined.
Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...                                              

l.402 \newlength{\bibhang}

?

文档:

\documentclass[thesis=B,czech]{FITthesis}[2012/06/26]

\usepackage[utf8]{inputenc}

\usepackage{graphicx}
\usepackage{dirtree}
\usepackage[square,sort,comma,numbers]{natbib}
\usepackage[defernumbers=true]{biblatex}


\department{text}
\title{text}
\authorGN{text}
\authorFN{text}
\authorWithDegrees{text}
\supervisor{text}
\acknowledgements{text}
\abstractCS{text}
\abstractEN{text}
\placeForDeclarationOfAuthenticity{text}
\declarationOfAuthenticityOption{1}
\keywordsCS{text}
\keywordsEN{text}

\begin{document}

\begin{introduction}
    %
\end{introduction}

\chapter First

    \cite{alfa}
    \cite{beta}
    \cite{gama}
    \cite{delta}

\begin{conclusion}
    %
\end{conclusion}

\bibliographystyle{csn690}
\bibliography{mybibliographyfile}

\appendix

\end{document}

.bib文件:

@BOOK{gama,
 author = {Gama},
 title = {1.},
 subtitle = {Gama},
 address = {Gama},
 publisher = {Gama},
 year = {Gama},
}

@MISC{delta,
  Author = {2.},
  Institution = {Delta},
  note = {Delta},
  Year = {2000},
  Title = {Delta}
}

@MASTERTHESIS{beta,
  author = {Beta},
  title = {3.},
  year = {2000},
  school = {Beta},
  type = {Beta},
  url = {http://www.beta.com},
}

@MANUAL{alfa,
    title = "4.",
    url = "http://www.alfa.com",
}

谢谢你!

答案1

要解决宏注释错误,\bibhang请调用biblatex(并natbib定义biblatex一个宏\bibhang):

\usepackage[square,sort,comma,numbers]{natbib}
%\usepackage[defernumbers=true]{biblatex}

要使用包,biblatex您必须更改 MWE 中的某些行:

  • 改成\bibliography{mybibliographyfile}\printbibliography
  • biblatex调用包宏后添加\addbibresource{mybibliographyfile.bib}
  • 评论%\usepackage[square,sort,comma,numbers]{natbib}
  • 要使用 BibTeX,请biblatex添加biblatex选项,backend=bibtex
  • 不要将 bibliographystylecsn690与 BibLaTeX 一起使用。

由于您没有指定排序时出现哪些错误,因此我无法帮助您。我建议您可以针对此问题提出后续问题。

因此这应该可以编译:

\documentclass[thesis=B,czech]{FITthesis}[2012/06/26]

\usepackage[utf8]{inputenc}

\usepackage{graphicx}
%\usepackage{dirtree}
%\usepackage[square,sort,comma,numbers]{natbib}
\usepackage[%
  defernumbers=true
 ,natbib
 ,backend=bibtex
]{biblatex}
\addbibresource{mybibliographyfile.bib}

\department{text}
\title{text}
\authorGN{text}
\authorFN{text}
\authorWithDegrees{text}
\supervisor{text}
\acknowledgements{text}
\abstractCS{text}
\abstractEN{text}
\placeForDeclarationOfAuthenticity{text}
\declarationOfAuthenticityOption{1}
\keywordsCS{text}
\keywordsEN{text}

\begin{document}

\begin{introduction}
    %
\end{introduction}

\chapter First

    \cite{alfa}
    \cite{beta}
    \cite{gama}
    \cite{delta}

\begin{conclusion}
    %
\end{conclusion}

%\bibliographystyle{csn690}
\printbibliography

\appendix

\end{document}

相关内容