0

I am working on a thesis using MikTex.

I was given a cls file and a bib file.

My question is how do we combine these?

moewe
  • 175,683
  • You don't combine the two files. They do completely different things. A .bib file contains references that you can cite and send to the bibliography (if your document contains the right setup for that). A .cls files is defines the document class, i.e. the overall layout of your document, it is loaded with \documentclass (which is usually the first or at least one of the first lines) in your document. – moewe May 03 '20 at 11:35
  • Did whoever gave you those files also give you a README or some documentation (or some help in person)? Or at least an example .tex file that describes how one should use the .bib and .cls file? Since we don't know what the files you have look like we can't give more specific help and can only explain things in very general terms. – moewe May 03 '20 at 11:36
  • I have previously used LaTex, but I am new to the bib file used for the bibliography.Maybe I did not phrase my issue appropriately. I want to add this bib file to my document. How do I do that? – Asad Mehasi May 03 '20 at 11:39
  • Thank you @moewe – Asad Mehasi May 03 '20 at 11:41
  • 1
    There are broadly two methods to using .bib files: Classical BibTeX or biblatex. (They are explained along with the manual thebibliography approach in https://tex.stackexchange.com/q/134180/35864 and probably also in most good LaTeX tutorials.) With BibTeX you can load additional packages like cite, natbib, ... to extend (the initially very basic) functionality. biblatex is more monolithic and is not used together with additional packages (it can do a lot out of the box). If you have a specific template, chances are it already has code set up for one of the two methods. – moewe May 03 '20 at 11:45

1 Answers1

1

I have managed to fix the problem. Originally I had a set section called thebibliography.

I thought I needed to modify the .cls file to include the .bib file in that particular section, but I was wrong.

What I have done to solve the issue is just comment out that section completely and I added the following

\bibliography{mybib} 
\bibliographystyle{alpha} 

Thank you @moewe for your assistance.

moewe
  • 175,683