\printbibliography 如何工作?

\printbibliography 如何工作?

我必须在我的文档中插入参考书目,为此我使用以下代码,该代码指的是指南。不幸的是,它不起作用:更准确地说,我的文档中除了参考书目之外的所有内容都正确显示。我指出,我在计算机上安装了 TeXlive 发行版,我使用 XelaTeX 进行编译,我使用 TeXstudio 进行编译,但实际上我也尝试使用 TeXwork、TeXmaker 和 overleaf,但没有成功,所以我想在这里提出一个具体的问题,我问 \printbibliography 如何工作:更准确地说,我必须以特定的方式设置我的编译器?我必须上传比 biblatex 包更具体的包?我必须插入比 \printbibliography 更具体的命令?所以有人能帮帮我吗?

遵循我的代码。

\documentclass[10pt]{report}
\usepackage[backend=bibtex]{biblatex} 
\usepackage{etoolbox} 
\usepackage{filecontents}

\begin{filecontents*}{bibliography_contents.bib}
    @book{1,
        title={Lógica Matemática},
        author={José Ferrater Mora, Hughes Leblanc},
        year={1962},
        publisher={Fondo de Cultura Económica}
    }
    @book{2,
        title={Set theory for the mathematician},
        author={Jean E. Rubin},
        publisher={Holden-Day},
        year={1967}
    }
    @article{3
        title={An introduction to algebraic structures},
        author={Azriel Rosenfeld},
        publisher={Holden-Day},
        year={1968}
    }
    @book{4,
        title={Set theory and logic},
        author={Robert R. Stoll},
        year={1979},
        publisher={Dover Publication}
    }
    @book{5,
        title={Teoría de conjuntos},
        author={Fernando Hernández Hernández},
        year={1998},
        publisher={Sociedad Matemática Mexicana}
    }
    @book{6,
        title={Introduction to set theory, revised and expanded},
        author={Karel Hrbacek, Jech Thomas},
        year={1999},
        publisher={Marcel Dekker}
    }
    @book{7,
        title={Teoría de los Conjuntos, Curso intermedio},
        author={José Alfredo, Amor Montaño, Gabriela Campero Arena, Favio Ezequiel Miranda Perea},
        publisher={Las prensas de Ciencias},
        year={2010}
    }
\end{filecontents*}

\addbibresource{bibliography_contents.bib}

\begin{document}
    \tableofcontents
    
    \chapter{Chapter}
    This is a chapter.
    
    \printbibliography[title={Indice bibliografico}, heading=bibintoc]
\end{document}

答案1

我指出了来源中的错误。

\documentclass{report}
\usepackage{biblatex}
\usepackage{csquotes} % this is used by biblatex

\begin{filecontents*}{bibliography_contents.bib}
    @book{1,
        title={Lógica Matemática},
        author={José Ferrater Mora and Hughes Leblanc}, % 'and' instead of comma
        year={1962},
        publisher={Fondo de Cultura Económica}
    }
    @book{2,
        title={Set theory for the mathematician},
        author={Jean E. Rubin},
        publisher={Holden-Day},
        year={1967}
    }
    @article{3, % the comma was missing
        title={An introduction to algebraic structures},
        author={Azriel Rosenfeld},
        publisher={Holden-Day},
        year={1968}
    }
    @book{4,
        title={Set theory and logic},
        author={Robert R. Stoll},
        year={1979},
        publisher={Dover Publication}
    }
    @book{5,
        title={Teoría de conjuntos},
        author={Fernando Hernández Hernández},
        year={1998},
        publisher={Sociedad Matemática Mexicana}
    }
    @book{6,
        title={Introduction to set theory, revised and expanded},
        author={Karel Hrbacek and Jech Thomas},  % 'and' instead of comma
        year={1999},
        publisher={Marcel Dekker}
    }
    @book{7,
        title={Teoría de los Conjuntos, Curso intermedio},
        author={José Alfredo and Amor Montaño and Gabriela Campero Arena and Favio Ezequiel Miranda Perea},  % 'and' instead of comma
        publisher={Las prensas de Ciencias},
        year={2010}
    }
\end{filecontents*}

\addbibresource{bibliography_contents.bib}

\begin{document}
\tableofcontents

\chapter{Chapter}
This is a chapter.

\nocite{*} % This will display all elements even without \cite
\printbibliography[title={Indice bibliografico}, heading=bibintoc]
\end{document}

相关内容