# Writing Bibliography and main file separately. Then include bib in tex

I am writing my thesis in chapter format and I have written each chapter separately. Something like shown in code.

\documentclass[12pt]{report}
\begin{document}
\include{chapter1}
\include{chapter2}
\end{document}


Now I want to write bibliography in same format I do not want to write bibliography entries in my main file.Rather I want to write them in separate bib file then include in my main file. I am not able to do so. I am using TexStudio and bibliography file is also showing extension .tex

Please tell how to write bibliography file and how to include that file in main file.

• you mean something like \bibliography{test.bib}? See possibly this – Moriambar May 10 '17 at 18:20
• Do you really want to write your bibliography yourself? You might have a look at packages like biblatex – Skillmon May 10 '17 at 20:03
• yes @Moriambar I want something like this – Prachi Agarwal May 11 '17 at 3:21
• @Skillmon I want to copy bibTex from google scholar then include. If their is any better way please tell, I don't have any idea. – Prachi Agarwal May 11 '17 at 3:23

There is. The biblatex-package I linked in my comment is one. You might just google for a biblatex-tutorial. It boils down to the following:

• \usepackage[<options>]{biblatex} to use the package in your project.
• Put the information you copy from google scholar and the like into a file <file>.bib.
• Use \addbibresource{<file>.bib} in your project.
• Use the command \cite{<citation-key>} (or others provided by biblatex) to mark something you cited from your <file>.bib.
• Use \printbibliography in your project where the bibliography should be printed

When you compile your project compile it with:

1. Run <latex> <project> (with <latex> the LaTeX-Engine you use)
2. Run biber <project>
3. Run LaTeX again to get the bibliography
4. Run LaTeX again to get everything right

This way you get a bibliography which contains all sources you cited (using \cite or similar commands).

You can customize the bibliography in multiple ways. This is done with the options you pass to biblatex-package. You might also take a look here and perhaps search for a complete tutorial on the web.