Latex が bib ファイルを読み取れない

Latex が bib ファイルを読み取れない

Latexでbibファイルを読み込めません。ここにコードがあります

\documentclass[10pt]{article}
\begin{document}
Hello
\cite{Willis2009} 

\bibliographystyle{dcu} 
\bibliography{1_ref_bib}

\end{document}

Willis2009はbibファイルにあります

答え1

以下のコードは機能します。

参考dcu文献スタイルはパッケージの一部ですharvard。プリアンブルで、/harvardのどちらかのパッケージまたはペアを必ずロードしてください。これは、単に「実際の」bib ファイルの代わりです。bib ファイルが既にある場合は、その部分を取り除いてもかまいません。 natbibhar2natfilecontents

編集

latex (pdflatex、xelatex、lualatex など) を実行し、次に bibtex を実行し、さらに latex を 2 回実行します。bib ファイルは、latex ファイルと同じフォルダーにある必要があります。

\documentclass{article}

\usepackage{harvard}

\usepackage{filecontents}
\begin{filecontents}{1_ref_bib.bib}
@article{Willis2009,
    author={Willie Willis},
    title={How much wood would a woodchuck chuck if a woodchuck would chuck wood?},
    year={2009}
}
\end{filecontents}

\begin{document}
    Hello
    \cite{Willis2009} 

    \bibliographystyle{dcu} 
    \bibliography{1_ref_bib}

\end{document}

答え2

この回答を参照してください:https://texblog.org/2011/12/12/bib2tex-converting-bibtex-to-bibitems/

bib2tex: bibtex を bibitems に変換する 2011 年 12 月 12 日 tom 3 件のコメント

今日、友人から、論文を投稿するジャーナルが bibtex ファイル (*.bib) を受け付けていないため、bibtex ファイルを \LaTeX 参考文献 (\bibitem{}) に変換するのを手伝ってほしいと頼まれました。そこで、次の形式 (セルから) の bibtex 参照のセットを変換しようとしました。@article{bartel2009、著者 = {Bartel, David P. }、日付 = {2009/01/23}、ジャーナル = {Cell}、月 = {01}、番号 = {2}、ページ = {215--233}、タイトル = {Micro{RNA}s: Target Recognition and Regulatory Functions}、巻 = {136}、年 = {2009}}

\LaTeX が理解できる形式に変換します。例: \bibitem[Bartel(2009)]{bartel2009} David~P. Bartel. \newblock Micro{RNA}s: Target recognize and Regulatory functions. \newblock \emph{Cell}, 136\penalty0 (2):\penalty0 215--233, 01 2009.

bibtex コマンドを使用すると、参照を変換する簡単な方法があります。これは、バックグラウンドでまさに必要なことを実行します。ドキュメントを一度タイプセット (latex) し、bibtex コマンドで参照を生成すると、参照されているすべての bibitems が \LaTeX 形式で含まれる「document.bbl」というメタファイルが作成されます。

関連情報