我正在使用 overleaf,我有一个包含我的参考书目的 .bib 文件,称为 refs:
@book{DBLP:books/daglib/0028275,
author = {Donald Sannella and
Andrzej Tarlecki},
title = {Foundations of Algebraic Specification and Formal Software Development},
series = {Monographs in Theoretical Computer Science. An {EATCS} Series},
publisher = {Springer},
year = {2012},
url = {https://doi.org/10.1007/978-3-642-17336-3},
doi = {10.1007/978-3-642-17336-3},
isbn = {978-3-642-17335-6},
timestamp = {Fri, 09 Apr 2021 18:19:01 +0200},
biburl = {https://dblp.org/rec/books/daglib/0028275.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
这是我的代码:
\documentclass[11pt,twoside,a4paper]{report}
\usepackage[DM,newLogo]{uaThesis}
\def\ThesisYear{2023}
% optional packages
\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts,amsthm}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{stmaryrd}
\usepackage{unicode-math}
\usepackage{textcomp}
\usepackage{mathabx}
\usepackage{xcolor}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xspace}% used by \sigla
\allowdisplaybreaks[3]
\usepackage{color}
%\usepackage{pdfpages}
\usepackage{graphicx}
\usepackage{amscd}
\usepackage{enumitem}
\usepackage{listings}
\usepackage{amsthm}
\usepackage{cancel}
\usepackage{tikz}
\usetikzlibrary{automata, positioning, arrows}
\input xy
\xyoption{all}
\input{dinmacros.tex}
\usepackage{mathtools}
\usepackage{float}
\usepackage{bookmark}
\usepackage{booktabs}
\usepackage{hyperref}
\usepackage{subfig}
\usepackage{relsize}
\usepackage{tikz}
\usepackage{tikz-network}
\usetikzlibrary{automata,positioning,calc,shapes.multipart}
\tikzstyle{obj} =[circle, minimum width=0.5cm, minimum height=0.5cm, draw=black]
\overfullrule=0.2mm
\def\justl#1#2{\\
#1 \rule{2em}{0pt} \{
\mbox{\rule[-.7em]{0pt}{1.8em} \footnotesize{#2}} \} \\ }
\def\just#1#2 { \\ #1 \hspace{2pt} \mbox{\{ \footnotesize{#2} \}} \\ }
\def\cat#1{{\sf #1}}
\def\setcat{\cat{Set}}
\def\Mmax{\cat{MAX}}
\def\Mmin{\cat{MIN}}
\def\bmax{\cat{max}}
\def\bmin{\cat{min}}
\newcommand{\fdec}[3]{#1: #2 \longrightarrow #3}
\newcommand{\rfdec}[3]{#1: #2 \rightarrow #3}
\def\setdef#1#2{\{#1\; |\;#2\}} % { f(x) | p(x) }
\def\enset#1{\mathopen{ \{ }#1\mathclose{ \} }} % {a,b,...z}
\newtheorem{definition}{Definition}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}
\newtheorem{lemma}{Lemma}
\newtheorem{example}{Example}
%\newtheorem{proof}{proof.}
\newenvironment{proof}{\noindent \textbf{Proof.}}
% optional (comment to use default)s
% depth of the table of contents
% 1 ... chapther and sections
% 2 ... chapters, sections, and subsections
% 3 ... chapters, sections, subsections, and subsubsections
\setcounter{tocdepth}{3}
% optional (comment to used default)
% horizontal line to separate floats (figures and tables) from text
\def\topfigrule{\kern 7.8pt \hrule width\textwidth\kern -8.2pt\relax}
\def\dblfigrule{\kern 7.8pt \hrule width\textwidth\kern -8.2pt\relax}
\def\botfigrule{\kern -7.8pt \hrule width\textwidth\kern 8.2pt\relax}
% custom macros (could also be defined using \newcommand)
\def\I{\mathtt{i}} % one possible way to represent $\sqrt{-1}$
\def\Exp#1{e^{2\pi\I #1}} % argument inside braces, i.e., "{}"
\def\EXP#1.{e^{2\pi\I #1}} % argument finishes when a full stop is encountered, i.e., "."
\def\sigla{\LaTeX\xspace} % use as "blabla \sigla blabla (no need to do "blabla \sigla\ blabla"
\newcommand\restr[2]{{% we make the whole thing an ordinary symbol
\left.\kern-\nulldelimiterspace % automatically resize the bar with \right
#1 % the function
%\vphantom{\big|} % pretend it's a little taller at normal size
\right|_{#2} % this is the delimiter
}}
\def\AddVMargin#1{\setbox0=\hbox{#1}%
\dimen0=\ht0\advance\dimen0 by 2pt\ht0=\dimen0%
\dimen0=\dp0\advance\dimen0 by 2pt\dp0=\dimen0%
\box0} % add extra vertical space above and below the argument (#1)
\def\Header#1#2{\setbox1=\hbox{#1}\setbox2=\hbox{#2}%
\ifdim\wd1>\wd2\dimen0=\wd1\else\dimen0=\wd2\fi%
\AddVMargin{\parbox{\dimen0}{\centering #1\\#2}}} % put #1 on top #2
\newcommand{\doublef}{f\mspace{-7mu}f}
\newcommand{\doublet}{t\mspace{-3mu}t}
\begin{document}
% The bibliography
\bibliographystyle{plain}
\bibliography{refs}% replace by the name of name of your .bib file
\end{document}
我不知道为什么我的参考书目没有打印,它创建了一个标题,但没有在 bib 文件中添加参考资料