What Is Bibliography?

A Bibliography, sometimes also known as a citation page, provides the information about the reference used to create a paper. At the end of the paper, these reference lists are generally written in alphabetical order. LaTex comes very handily in writing well-structured bibliography.

Generating Bibliography

To generate bibliography in LaTex, we use environment thebibliography and for the various entries we use command \bibitem{}.

Output:

Bibliography in LaTex

It is mandatory to pass an argument along with command \begin{thebiblio.graphy}; otherwise, the above code will never compile. This argument tells the width of the widest label used in the bibliography. Instead of numbers, we can also use long- name in the argument. The numbering of entries is done automatically in a bibliography.

A key can also be passed along with \bibitem{} command to identify an entry. This key can be used with \cite{} command to give reference to the particular entry mentioned in the bibliography. Additional information such as chapter number, section number can also be used with \cite{} command, however, it is not mandatory. The following code explains the same.

Output:

Bibliography in LaTex

In the highlighted portion of the output, observe numbers 1 and 2. Where does that come from? The key shachris05 is for the first entry, and morjen99 is for the second entry. These entry numbers generate 1 and 2 in the output. We can also use multiple keys in the \cite{} command. If we use any key in \cite{} command that is not present in the bibliography will produce a question mark (?) in the output. Remove any of the keys that are present in the bibliography and observe the outcome.

Note 1: A key can never contain a comma (,). A key can be any combination of digits, letters, and punctuation characters. A maximum of 256 characters is allowed in a key.

Note 2: It is advisable to use a combination of the author’s name and year in the formation of a key, i.e., morjen99 (authors name – K. P. Morris and Jennifer L.   Year – 1999).

Note 3: The compilation of the above code is done in two stages. At the first stage, marking of citation or bibcite is done. In the second stage, \cite{} command is replaced by numeric values or codes, etc.

Customizing A Bibliography

A renowned package, bibletex, is used to customize a bibliography with very little effort. Its interface is quite flexible for various styles of a bibliography. Check the following code.

The output will come on three pages. Snapshots of the output are mentioned below.

On the first page:

Bibliography in LaTex

On the second page:

Bibliography in LaTex

On the third page.

Bibliography in LaTex

For using the package biblatex, we use \usepackage{biblatex}.

To include a file example.bib\addbibresource{example.bib} is used. This file contains all the details of the bibliography. Its content is mentioned below.

@book{…..} gives information about the book. knuth-acp is the label used in the cite command to identify the reference. author = “D. E. Knuth” is the key-value pair where the key is author and value is D. E. Knuth. Keywords are used to categorize the entries.

\tableofcontents is used to create a table of contents.

\printbibliography[heading=bibintoc, title={Complete bibliography}]

It displays the entire bibliography beneath the title “Complete bibliography”. heading=bibintoc is responsible for the display of the Complete bibliography in the table of contents.

In the second case, heading=subbibintoc provides second-level entry and displays the title “Related with Articles”.

  \printbibliography[heading=subbibintoc, type=article, title={Related with Articles}]

This line of code does filter based on type “article” and puts the title “Related with Articles”

\printbibliography[keyword={latex},title={Related with \LaTeX }]

The above line is responsible for displaying entries whose keyword contains the word “latex”. This section will be beneath the tile “Related with \LaTex”.

\clearpage is used to push the content to the new page. Observe the output, the second page contains only one entry. Because of the page break, other contents shift to the next page. Remove this command and observe the changes in output yourselves.

Note: We need to create two files, one for the code and one for the bibliographic contents (example.bib). This can be easily done on the online editor provided by overleaf.com.

Pin It on Pinterest

Share This