Latex \cite 产生问号?

Latex \cite 产生问号?

我的 Latex 有几个问题。我试图从.bib文件中引用。该\cite命令只生成一个 (?)。

我尝试了 latex、bibtex、latex、latex 顺序,但没用。如果我尝试,\cite{pascal}我只会得到 (?),但如果我尝试\nocite{*},它不会成功,(?)而只是.bib以随机顺序打印我的文件。

\documentclass[a4paper, 11pt]{report}
\usepackage[top=15mm, bottom=15mm, left=35mm, right=20mm]{geometry}
\usepackage{hyperref}

\makeatletter
\def\@biblabel#1{}
\makeatother

\renewcommand\bibname{References}

\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\hypersetup{
        colorlinks=true,
        linkcolor=blue,
        citecolor = blue,
        anchorcolor = blue,
        urlcolor=blue,
        linktoc=page,
}

\begin{document}

\section{Introduction}
The philosophy behind \textbf{\textit{Web 3.0}} (commonly known as \textbf{\textit{"Semantic Web"}}) and its main premise is to make the Web more accessible to computers so that data can be accessed, shared and analysed, so that computers can then search, combine and process the data intelligently 
\linebreak (Hitzler,~et~al.~2010,~p.~11). \cite{pascal}
\\[5mm]
To achieve this philosophy, Web Ontology Language, OWL \footnote[1]{ \url{http://www.w3.org/TR/owl2-overview/}} have been developed as a standard format for the sharing and integration of data and knowledge.
\\[5mm]

\bibliographystyle{plain}

\nocite{*}

\bibliography{cm1201_1515140}

\end{document}

这是我的.bib 文件。

@book{pascal,
    author    = "P. Hitzler\text{,} et al. (2010)",
    title     = "Foundations of Semantic Web Technologies",
    publisher = "Chapman \& Hall/CRC",
}

@incollection{franz,
  author      = "F. Baader\text{,} et al. (2008)",
  title       = "'{D}escription {L}ogics'",
  booktitle   = "\emph{F. van Harmelen, V. Lifschitz, \& B. Porter (eds.),} Handbook of Knowledge Representation",
  note        = "chap. 3, pp. 135-180. Elsevier.",
}

@misc{w3c,
    author    = "W3C OWL Working Group (2009)",
    title     = "'{OWL} 2 {W}eb {O}ntology {L}anguage - {D}ocument {O}verview ({W}orking {D}raft 27 {M}arch 2009)'",
    howpublished       = "\url{http://www.w3.org/TR/owl2-overview/}",
}

这里有一些图片可以展示我所得到的结果。

在此处输入图片描述

在下图中我得到了正确的结果,但我需要将其改为左边的结果。我尝试了 bibel 和其他软件包。有人说 \citename 已经定义,或者其他我不知道如何修复的错误。

在此处输入图片描述

请帮忙,因为我找不到任何答案。提前谢谢您。

答案1

首先,您应该将.bib文件放入标准格式中。Google Scholar 可以在这方面为您提供帮助。因此,这是我.bib使用的格式(您可以添加或删除信息,但请将其保留为标准格式):

@book{van2008handbook,
  title={Handbook of knowledge representation},
  author={Van Harmelen, Frank and Lifschitz, Vladimir and Porter, Bruce},
  volume={1},
  year={2008},
  publisher={Elsevier}
}

@book{pascal,
  title={Foundations of semantic web technologies},
  author={Hitzler, Pascal and Krotzsch, Markus and Rudolph, Sebastian},
  year={2009},
  publisher={CRC Press}
}

@article{world2012owl,
  title={OWL 2 web ontology language document overview},
  author={World Wide Web Consortium and others},
  year={2012},
  publisher={Word Wide Web Consortium}
}

其次,要使参考文献的排序与文本文件中的排序相同,您应该使用命令\bibliographystyle{unsrt}。如果您需要按时间顺序排序,只需使用命令即可\bibliographystyle{plain}

以下是完整文档:

\documentclass[a4paper, 11pt]{report}
\usepackage[top=15mm, bottom=15mm, left=35mm, right=20mm]{geometry}
\usepackage{hyperref}

\makeatletter
\def\@biblabel#1{}
\makeatother

\renewcommand\bibname{References}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\hypersetup{
        colorlinks=true,
        linkcolor=blue,
        citecolor = blue,
        anchorcolor = blue,
        urlcolor=blue,
        linktoc=page,
}

\begin{document}

\section{Introduction}
The philosophy behind \textbf{\textit{Web 3.0}} (commonly known as \textbf{\textit{``Semantic Web"}}) and its main premise is to make the Web more accessible to computers so that data can be accessed, shared and analysed, so that computers can then search, combine and process the data intelligently 
\linebreak (Hitzler,~et~al.~2010,~p.~11). Cite \cite{van2008handbook} then \cite{pascal} then \cite{world2012owl}

\bigskip

To achieve this philosophy, Web Ontology Language, OWL \footnote[1]{ \url{http://www.w3.org/TR/owl2-overview/}} have been developed as a standard format for the sharing and integration of data and knowledge.

\bibliographystyle{unsrt}
\bibliography{cm1201_1515140}

\end{document}

以及所需的输出:

在此处输入图片描述

此外,它们在文本中出现的顺序:

在此处输入图片描述

\\[5mm]除了使用正确的引文外,还要考虑上面其他人给出的关于不使用等的说明``Semantic Web"。最后,运行 pdflatex-->bibtex-->pdflatex-->pdflatex 序列应该可以处理所有引用。

相关内容