定義參考書目有兩種主要方法:
嵌入式
\begin{thebibliography}
在文件末尾聲明並使用 \bibitem 。條目看起來像\bibitem{amin1} S.~P. Beeby, M.~J. Tudor, and N.~White, ``Energy harvesting vibration sources for microsystems applications,'' {\em Measurement science and technology}~{\bf 17}(12), p.~R175, 2006.
使用 BibTeX - 條目儲存在 .bib 檔案中。這些條目看起來像:-
@article{amin1, title={Energy harvesting vibration sources for microsystems applications}, author={Beeby, S Pꎬ and Tudor, M Jꎬ and White, NM}, journal={Measurement science and technology}, volume={17}, number={12}, pages={R175}, year={2006}, publisher={IOP Publishing} }
有沒有一種簡單、自動化的方法可以將條目從 2 轉換為 1。
我一直使用格式2,即使用bib 檔案。但我想切換到格式 1,而不需要手動更改所有條目。這可能嗎?
答案1
.bib
從 BibTeX檔案到嵌入式環境的轉換thebibliography
取決於參考書目風格你在追趕。樣式定義特定@type
參考的佈局和格式。
建議是:
使用 BibTeX 根據您感興趣的特定樣式編譯您的檔案。
\documentclass{article} \usepackage{filecontents} \begin{filecontents*}{references.bib} @article{greenwade93, author = {George D. Greenwade}, title = {The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})}, year = {1993}, journal = {TUGBoat}, volume = {14}, number = {3}, pages = {342--351} } \end{filecontents*} \begin{document} \nocite{*} \bibliographystyle{plain} \bibliography{references} \end{document}
當使用 LaTeX > BibTeX > LaTeX > LaTeX 編譯時,上面的最小範例(稱為
filename.tex
)建立filename.bbl
:\begin{thebibliography}{1} \bibitem{greenwade93} George~D. Greenwade. \newblock The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN}). \newblock {\em TUGBoat}, 14(3):342--351, 1993. \end{thebibliography}
BibTeX 已經處理了格式和佈局,以及排序順序(如果已以某種方式指定,甚至使用不同的套件)。
交換
\bibliographystyle{plain} \bibliography{references}
為了
\input{filename.bbl}
在你的程式碼中。