BibTeX, biblatex and biberImport of Bibliography Content into Source File

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
mf14
Posts: 2
Joined: Thu Sep 12, 2013 10:43 am

Import of Bibliography Content into Source File

Post by mf14 »

Hi,

I submitted a paper and it is accepted but it should have some modifications. For example, I used a ".bib" file as my bibliography database. The reviewer said this.
Executable LaTeX files requiring BibTeX and other additional files cannot be processed
So we should move bibliography to ".tex" file. But if we use such codes

Code: Select all

\begin{thebibliography}{widest-label}
  \bibitem[label]{cite_key}
  ...
\end{thebibliography}
I have about 70 references (bibliography items) and it is very time consuming to change all of them form ".bib" format to such format. For example, I should change

Code: Select all

@article{marvel99,
  author = {L.M. Marvel AND  C.G. Boncelet and C.T. Retter },
  title = {Spread spectrum image steganography},
  journal = {IEEE Trans. on Image Processing},
  year = { 1999},
  volume = { 8},
  number = { 8},
  pages = { 1075 - 1083 },
  month = { Aug},
}
to

Code: Select all

\bibitem{marvel99}{author=L.M. Marvel AND  C.G. Boncelet and C.T. Retter}, ...
I want only copy & paste the bibliography and just a bit changes or adding some codes.

Note that I used \begin{filecontents}{bibfile.bib} but I think it may be forbidden since although it is not need to a bib file but it creates a bib file.


Thanks so much.
Last edited by localghost on Thu Sep 12, 2013 1:04 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Import of Bibliography Content into Source File

Post by localghost »

Process your bibliography as usual, open the bibliography file (*.bbl) and copy its complete content to your source file. Lets consider a small example for better explanation.

The source file could look like this. Note that it generates a small bibliography database with the exemplary entry that you presented.

Code: Select all

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{marvel99,
  author = {L.M. Marvel AND  C.G. Boncelet and C.T. Retter},
  title = {Spread spectrum image steganography},
  journal = {IEEE Trans. on Image Processing},
  year = {1999},
  volume = {8},
  number = {8},
  pages = {1075--1083},
  month = {Aug},
}
\end{filecontents*}

\bibliographystyle{plain}

\begin{document}
  \nocite{*}
  \bibliography{\jobname}
\end{document}
If you now process this as usual, you get a bibliography file (*.bbl) with this content.

Code: Select all

\begin{thebibliography}{1}

\bibitem{marvel99}
L.M. Marvel, C.G. Boncelet, and C.T. Retter.
\newblock Spread spectrum image steganography.
\newblock {\em IEEE Trans. on Image Processing}, 8(8):1075 -- 1083, Aug 1999.

\end{thebibliography}
As you can see, this is a complete {thebibliography} environment with its content in form if bibliography items. The final formatting depends on the used bibliography style. But this should also work for your use case.


Best regards and welcome to the board
Thorsten
mf14
Posts: 2
Joined: Thu Sep 12, 2013 10:43 am

Re: Import of Bibliography Content into Source File

Post by mf14 »

Thank you for helping me. I do as you said. It is perfect but just a question is ramain:
Order of references is not same as before I use this technique. My order for numbering references is based on the occur in the text but now it is not so.
How we can set it to appear references based on the appearance on the text?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Import of Bibliography Content into Source File

Post by localghost »

Hard to diagnose from here without seeing a concrete example.
Post Reply