從網站取得 .bbl 文件,需要產生 pdf

從網站取得 .bbl 文件,需要產生 pdf

如標題所示,我從網站上獲得了一份以文件形式提供的參考列表.bbl,我想從中生成一個 pdf 文件。我已經用谷歌搜尋了一個小時,但也許我遺漏了一些東西。據我了解,您創建一個.tex文件並使用,\bibliography{*name_of_file*}但這不起作用。我也嘗試過將文件的內容貼.bbl到參考書目中,但這也不起作用。

有人可以給我一個關於如何執行此操作的逐步指南嗎?

答案1

您沒有向我們提供您的*.bbl文件,也沒有命名您獲得該文件的網站,所以我必須猜測。請在下一個問題中添加所有相關信息,以便我們更輕鬆地為您提供幫助!

假設*.bbl您得到的是:

\providecommand{\latin}[1]{#1}
\makeatletter
\providecommand{\doi}
  {\begingroup\let\do\@makeother\dospecials
  \catcode`\{=1 \catcode`\}=2 \doi@aux}
\providecommand{\doi@aux}[1]{\endgroup\texttt{#1}}
\makeatother
\providecommand*\mcitethebibliography{\thebibliography}
\csname @ifundefined\endcsname{endmcitethebibliography}
  {\let\endmcitethebibliography\endthebibliography}{}
\begin{mcitethebibliography}{4}
\providecommand*\natexlab[1]{#1}
\providecommand*\mciteSetBstSublistMode[1]{}
\providecommand*\mciteSetBstMaxWidthForm[2]{}
\providecommand*\mciteBstWouldAddEndPuncttrue
  {\def\EndOfBibitem{\unskip.}}
\providecommand*\mciteBstWouldAddEndPunctfalse
  {\let\EndOfBibitem\relax}
\providecommand*\mciteSetBstMidEndSepPunct[3]{}
\providecommand*\mciteSetBstSublistLabelBeginEnd[3]{}
\providecommand*\EndOfBibitem{}
\mciteSetBstSublistMode{f}
\mciteSetBstMaxWidthForm{subitem}{(\alph{mcitesubitemcount})}
\mciteSetBstSublistLabelBeginEnd
  {\mcitemaxwidthsubitemform\space}
  {\relax}
  {\relax}

\bibitem[Goossens \latin{et~al.}(1994)Goossens, Mittelbach, and
  Samarin]{Goossens}
Goossens,~M.; Mittelbach,~F.; Samarin,~A. \emph{The LaTeX Companion}, 1st ed.;
  Addison-Wesley, 1994\relax
\mciteBstWouldAddEndPuncttrue
\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}
{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax
\EndOfBibitem
\bibitem[Adams(1980)]{adams}
Adams,~D. \emph{The Restaurant at the End of the Universe}; The Hitchhiker's
  Guide to the Galaxy; Pan Macmillan, 1980\relax
\mciteBstWouldAddEndPuncttrue
\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}
{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax
\EndOfBibitem
\bibitem[Editor \latin{et~al.}(2015)Editor, Editor2, and Editor3]{test}
Editor,~F., Editor2,~S., Editor3,~T., Eds. \emph{Test to show the effect};
  Publisher, 2015\relax
\mciteBstWouldAddEndPuncttrue
\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}
{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax
\EndOfBibitem
\bibitem[Feynman(1969)]{feynman}
Feynman,~R.~P. Very High-Energy Collisions of Hadrons. \emph{Phys. Rev. Lett.}
  \textbf{1969}, \emph{23}, 1415--1417\relax
\mciteBstWouldAddEndPuncttrue
\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}
{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax
\EndOfBibitem
\end{mcitethebibliography}

為了能夠在你的 tex 程式碼中使用它,你需要知道它是如何產生的。因此,讓我們看一下以下 MWE(由 bib 檔案和生成參考書目的命令完成,結果如上*.bbl所示):

\begin{filecontents*}{testbib.bib}
@Book{Goossens,
  author    = {Goossens, Michel and Mittelbach, Frank and 
               Samarin, Alexander},
  title     = {The LaTeX Companion},
  edition   = {1},
  publisher = {Addison-Wesley},
  location  = {Reading, Mass.},
  year      = {1994},
}
@Book{adams,
  title     = {The Restaurant at the End of the Universe},
  author    = {Douglas Adams},
  series    = {The Hitchhiker's Guide to the Galaxy},
  publisher = {Pan Macmillan},
  year      = {1980},
}
article{einstein,
  author  = {Albert Einstein},
  title   = {{Zur Elektrodynamik bewegter K{\"o}rper}. ({German}) 
             [{On} the electrodynamics of moving bodies]},
  journal = {Annalen der Physik},
  volume  = {322},
  number  = {10},
  pages   = {891--921},
  year    = {1905},
  DOI     = {http://dx.doi.org/10.1002/andp.19053221004},
}
@article{Ross2006,
  title     = {Treating the right patient at the right time: 
               access to heart failure care},
  author    = {Ross, H and Howlett, J and Arnold, J Malcolm O and 
               Liu, P and O’Neill, BJ and Brophy, JM and Simpson, CS and 
               Sholdice, MM and Knudtson, M and Ross, DB and others},
  journal   = {Canadian journal of Cardiology},
  volume    = {22},
  number    = {9},
  pages     = {749--754},
  year      = {2006},
  publisher = {Elsevier},
}
@article{Heidenreich2013,
  title     = {Forecasting the impact of heart failure in the 
               United States a policy statement from the American Heart Association},
  author    = {Heidenreich, Paul A and Albert, Nancy M and 
               Allen, Larry A and Bluemke, David A and Butler, Javed and 
               Fonarow, Gregg C and Ikonomidis, John S and Khavjou, Olga 
               and Konstam, Marvin A and Maddox, Thomas M and others},
  journal   = {Circulation: Heart Failure},
  volume    = {6},
  number    = {3},
  pages     = {606--619},
  year      = {2013},
  publisher = {Am Heart Assoc},
}
@book{mschinLearning,
author    = {Tom M. Mitchell}, 
title     = {Machine learning},
publisher = {Mac Gew Hill},
year      = 1997,
volume    = 4,
series    = 10,
address   = {The address},
edition   = 3,
month     = 7,
note      = {An optional note},
isbn      = {0071154671},
}
@misc{mozart:KV183,
  author  = {Mozart, Wolfgang Amadeus},
  title   = {Sinfonie g-Moll},
  year    = {1773},
  address = {Salzburg},
  note    = {New K{\"o}chelverzeichnis Nr. 183, old version Nr. 25; 
             Erster Satz: Allegro con brio, Zweiter Satz: Andante, 
             Dritter Satz: Menuetto, Vierter Satz: Allegro},
}
\end{filecontents*}


\documentclass[10pt,a4paper]{article}

\usepackage{showframe}  % to visualise the typing area and margins
\usepackage{hyperref}   % better urls


\begin{document}

This is text with \cite{Goossens} and \cite{adams}.

\nocite{*} % to test all bib entrys
\bibliographystyle{unsrt} % <===========================================
\bibliography{testbib}

\end{document}

這裡的套件filecontents僅用於將 tex 程式碼和 bib 檔案一起放在可編譯的 MWE 中,您不需要使用filecontents

為了現在能夠使用該文件,testbib.bbl您需要以下 tex 程式碼(請參閱\cite需要的命令以及用於建立該*.bbl文件的參考文獻樣式):

\documentclass[10pt,a4paper]{article}

\usepackage{showframe}  % to visualise the typing area and margins
\usepackage{hyperref}   % better urls


\begin{document}

This is text with \cite{Goossens} and \cite{adams}.

\nocite{*} % to test all bib entrys
\bibliographystyle{unsrt} % <===========================================
\input{testbib.bbl} % <=================================================

\end{document}

參考書目\input{testbib.bbl}包含在該位置的文檔中,您可以\input{testbib.bbl}

由此產生的參考書目

最後將上面的結果與*.bib文件中程式碼的結果進行比較:

帶有 bib 文件的參考書目

答案2

歡迎來到 TeX.SX!

讓我們將您的檔案命名為「references.bib」。

建立一個文件並將其命名為“main.tex”,其中包含以下內容:

\documentclass{article}
\usepackage{natbib}

\begin{document}
\nocite{*}
\bibliographystyle{apalike}
%unsrt: Style with unsorted citations [1] [2]
%plain: [1] [2] etc but shorted 
%apalike: Author year style
%agsm: Harvard style
\bibliography{references}
\end{document}

然後運行:

pdflatex main
bibtex main
pdflatex main

和 pdflatex 主要

這將產生一個文檔,其中包含以您選擇的樣式列印的參考書目。

請隨意使用,geometry例如:

\usepackege[top=1in,bottom=1.2in,left=1in,right=1.5in]{geometry}

(將此命令與您希望在序言中擁有的邊距一起添加 - 例如在\documentclass命令下方 - )

或刪除頁碼購買使用:

 \pagestyle{empty}

命令後的某處\documentclass

編輯:

抱歉...只是顯示您有一個bbl文件而不是bib...刪除我的答案,但將其保留幾分鐘以便查看它並決定是否要使用您的圍脖(如果有)文件並有權訪問隨時樣式.. .. bib 檔案可以提供多種參考樣式... Abbl只是bib檔案的特定輸出,因此不太有用...所以,如果您有(或可以獲得) a bib,請嘗試這個方法代替。

相關內容