Skip to Main Content
It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.
Hong Kong Baptist University Hong Kong Baptist University Library

Research Preparation for BSc in Math Final Year Project: LaTeX and BibTeX

Support final year Math student in the progress of completing their Honours Project

HKBU Math Final Year Project Thesis Template

HKBU Math Final Year Project Thesis LaTeX Template




What is LaTeX?

LaTeX (pronounced /lay-tech/) is document preparation system that allows markup to describe the structure of a document so that the user do not need to worry about the presentation of the document. By using document classes and add-on packages, the same document can be produced in a variety of different layouts.

What are the advantages of using LaTeX?

Commonly used by scientists, engineers, mathematicians and other professionals, LaTeX is the de facto standard for the communication and publication of scientific documents. Unlike a traditional “what you see is what you get” (WYSIWYG) word processor (e.g. MS Word processor), LaTeX uses a plain text markup language which is compiled into a PDF document using optimal typographical rules. 

In particular, it includes features designed for the production of technical and scientific documentation. This results in professional-looking documents that are of a different class to the output from a word processor. The numerous customization options in LaTeX allow for the creation of a diversity of documents with precise control over layout and formatting.

Is it difficult to learn LaTeX from scratch?

The answer is no, and you don't need to start from zero either. There are many readily available templates which do not require your advanced knowledge of LaTeX to use. You can use the templates available to create beautiful documents and learn to customize/create your own LaTeX file as you learn more about it. 

What is TeX?

TeX is a file extension for a LaTeX file format. 

What is BibTeX?

BibTeX is a program that works with LaTeX for including in-text citations and reference list in your LaTex document. Many reference managers offer some level of support for working with LaTeX and BibTex. For example, Mendeley can automatically generate LaTex Citation Command and BibTeX entry for the reference that you select.

LaTeX pacakages

Major LaTeX packages


LaTex is available as free software, you can get LaTeX for Linux, Mac OS X, Windows. In addition, there are also a number of online platforms that allow you to create LaTeX files directly online without installation. 

Links to the major LaTeX software and online platforms can also be found in the LaTeX Official Website

There is also a TeX document preparation package created in the Chinese language environment called CTeX which you can install. 

Online formula/equation generator

Online formula/equation generator

LaTeX is a powerful tool to typeset math formula and equations. It is possible to typeset integrals, name it!

For example, the LaTeX code:

  f(x) &= x^2\\  
  g(x) &= \frac{1}{x}\\  
  F(x) &= \int^a_b \frac{1}{3}x^3 \end{align*}

And the output is:

You can generate equations/formulas into LaTeX codes using a number of online available tools. To list a few:

Self-teaching materials

Self-teaching materials

Writing a paper in LaTeX format is a fun troubleshooting process. You will encounter lots of technical challenges (almost guaranteed!), but in the meanwhile, you pick up the tricks gradually and you will be able to learn faster and faster. Therefore, do not feel frustrated at the beginning of using LaTeX!

Many LaTeX experts, discussion forums, and communities usually have readily available references and answers to your questions. When in doubt, type in your questions in Google and normally you can find something useful.

Here are some sites that can be useful for your self-teaching as a beginner:

In addition, the library also has a number of books on LaTeX:


What is BibTeX?

As briefly introduced above, BibTeX works with LaTeX to allow you include citations into your document. The word BibTeX stands for a tool and a file format which is used to describe and process lists of references, mostly in conjunction with LaTeX documents.

What is the format of BibTeX?

A BibTeX entry consists of the type (the word after @), a citation-key and a number of tags which define various characteristics of the specific BibTeX entry. For example, here we have a book "The Image Processing Handbook, Seventh Edition" by John Russ. The BibTeX record is:

author = {Russ, John C.},
isbn = {1498740286},
pages = {1035},
publisher = {CRC Press},
title = {{The Image Processing Handbook, Seventh Edition}},
url = {{\&}lr={\&}id=ROSYCgAAQBAJ{\&}pgis=1},
year = {2016}

@book indicates that this reference is a book. The citation key (aka citation command) is Russ2016 (you can also come up with other expressions/strings as the citation key). And there are a number of tags, such as author, isbn, pages, title, describing different aspects of this reference.

How does BibTeX work in LaTeX?

In short, you need to have two files ready: .bib file (which is essentially a plain text file) and your LaTeX file (.tex format).

In you BibTeX file, there should be a list of BibTeX entries, for example:

author = {Russ, John C.},
isbn = {1498740286},
pages = {1035},
publisher = {CRC Press},
title = {{The Image Processing Handbook, Seventh Edition}},
url = {{\&}lr={\&}id=ROSYCgAAQBAJ{\&}pgis=1},
year = {2016}
author = {Pavlidis, T.},
isbn = {3642932088},
pages = {448},
publisher = {Springer Science {\&} Business Media},
title = {{Algorithms for Graphics and Image Processing}},
url = {{\&}lr={\&}id=xeWpCAAAQBAJ{\&}pgis=1},
year = {2012}
author = {Weinberger, M J and Seroussi, G and Sapiro, G},
doi = {10.1109/83.855427},
issn = {1057-7149},
journal = {IEEE transactions on image processing : a publication of the IEEE Signal Processing Society},
month = {jan},
number = {8},
pages = {1309--24},
pmid = {18262969},
shorttitle = {IEEE Transactions on Image Processing},
title = {{The LOCO-I lossless image compression algorithm: principles and standardization into JPEG-LS.}},
url = {},
volume = {9},
year = {2000}

Then, in your LaTeX file, you need to indicate that you are using the cite package, and insert necessary citation commands, and then indicate the bibliography file name, bibliography style.

\title{A review of image processing algorithms}
\author{Jennifer Gu}
\date{March 8, 2017}
According to the handbook written by Russ\cite{Russ2016}, ...
Digital image processing methods have gone through more than fifty years of development\cite{Pavlidis2012}.
\section{Literature Review}
This is the major body of this review article. Most of the cited references will be mentioned here.
It is noted that the algorithm is proposed by Sapiro has been cited over 1000 times\cite{Weinberger2000}. In this article, the authors described that.... Other theories include 
Here I summarize my findings as below, and again I use Russ's book \cite{Russ2016to support my conclusions.


How does Mendeley help with generating BibTeX entry? 

Mendeley can generate LaTeX citation command and BibTeX entry for the reference selected. 

Take the record (screenshot) as an example, the automatically generated command is:


And the BibTeX record is:

annote = {doi: 10.1021/ed085p251},
author = {Cacciatore, Kristen L and Amado, Jose and Evans, Jason J and Sevian, Hannah},
doi = {10.1021/ed085p251},
issn = {0021-9584},
journal = {J. Chem. Educ.},
month = {feb},
number = {2},
pages = {251},
publisher = {American Chemical Society},
title = {{Connecting Solubility, Equilibrium, and Periodicity in a Green, Inquiry Experiment for the General Chemistry Laboratory}},
url = {},
volume = {85},
year = {2008}

Quite simple isn't it? With the two components ready, you can insert the LaTeX command into your ".TeX" file and copy-paste the BibTeX entry into the .bib file where contains all the cited reference in your LateX project.

Rather than copying & pasting, you can also export the selected reference to a BibTeX (.bib) file. To do so, first select references that you would like to export to BibTeX, then click "File –> Export"  and in the dropdown list of file types, chose "BibTeX (*.bib)" and save it to your drive.