メインのTexファイルにBibTexファイルを追加できませんでした

メインのTexファイルにBibTexファイルを追加できませんでした

フォーラムには、同封のミニマル コードで、ファイル内の参照をmyref.bibここの tex ファイルに印刷すべきだと示唆するエントリがいくつかあります。私の場合、このファイルの出力では、ページ全体に「お元気ですか」とだけ書かれた PDF ファイルが生成されます。

\documentclass[12pt]{article}
\usepackage{natbib}
\begin{document}

How are you 
\bibliographystyle{acm}
\bibliography{myref.bib}

\end{document}

ファイルはmyref.bib同じディレクトリにあり、次の 3 つのエントリがあります。

@article{diamondprop,
    author = {Kania D R, Landstrass M I and Plano M A},
    title = {Diamond radiation detectors},
    journal = {Diamond and Related Material},
    year = { 1993 },
    volume = {2},
    number = {1012–9}
}

答え1

と書く代わりに、.bib ファイルにもう 1 つ変更を加えるだけで正常に動作しますbibiliography{myref.bib}bibiliography{myref}

\documentclass[12pt]{article}
\usepackage{natbib}

\begin{document}

 How are you \cite{diamondprop}


 \bibliography{myref}
 \bibliographystyle{plain}

 \end{document}

.bib ファイルも変更しました。add第一著者名と第二著者名の間に追加しました。理想的には、すべての著者名の間にこれを実行するはずです。これは私が使用した .bib ファイルです。

@article{diamondprop,
author = {Kania, D. R. and Landstrass, M. I. and Plano, M. A.},
title = {Diamond radiation detectors},
journal = {Diamond and Related Material},
year = { 1993 },
volume = {2},
number = {1012–9}
}

出力

初めての方は、このリンクが役に立つかもしれません:BIBTeX を使用して参考文献を作成する

pdflatex、bibtex、pdflatex、pdflatex の順序で 4 回コンパイルする必要があることを忘れていました。

関連情報