Latex 無法讀取我的圍脖文件

Latex 無法讀取我的圍脖文件

我無法讓 Latex 讀取我的圍脖文件,這裡是程式碼

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

\bibliographystyle{dcu} 
\bibliography{1_ref_bib}

\end{document}

Willis2009在bib檔案中

答案1

下面的程式碼有效。

參考書目風格dcu是包包的一部分harvard。請務必載入序言中的一個harvardnatbib//一對包。har2natfilecontents業務只是代替「真正的」號碼布文件;如果你已經有一個 bib 文件,你可以把這些東西拿出來。

編輯

運行latex(pdflatex、xelatex、lualatex,等等),然後運行bibtex,然後再運行latex 兩次。您的 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 12. December 2011 by tom 3 Comments

今天,一位朋友請我幫他將 bibtex 檔案轉換為 \LaTeX 參考書目 (\bibitem{}),因為他提交論文的期刊不接受 bibtex 檔案 (*.bib)。所以我們想要做的是轉換一組以下形式的 bibtex 引用(來自單元格):@article{bartel2009, Author = {Bartel, David P. }, Date = {2009/01/23},期刊= {Cell },月份= {01},頁數= {2},頁數= {215--233},標題= {Micro{RNA}:目標辨識與調節功能},卷= {136},年份= {2009 }}

為 \LaTeX 可以理解的格式,例如: \bibitem[Bartel(2009)]{bartel2009} David~P。巴特爾。 \newblock Micro{RNA}:目標辨識與調節功能。 \newblock \emph{Cell}, 136\penalty0 (2):\penalty0 215--233, 01 2009。

有一個簡單的方法可以透過使用 bibtex-指令來轉換參考文獻。它正是我們在後台所需要的。對文件進行一次排版(latex)並使用 bibtex 命令產生引用將建立一個名為「document.bbl」的圖元文件,其中包含 \LaTeX 格式中所有引用的 bibitem。

相關內容