• Show All Code
  • Hide All Code

Latex for hypothesis testing

Jeffrey liang.

R Code can be found in here

Distribution

\[ P(\mathcal{X}=k)\ = {n \choose k}p^k(1-p)^{n-k} \]

Normal Distribution

\(P(\mathcal{X}=k)\ = \frac{1}{\sqrt{2\pi}\sigma}*e^{-\frac{(x-\mu)^2}{2\sigma^2}}\)

One Group t-test

Left tailed.

\(H_0\) : there’s no difference betwee sample mean and the true mean

\(H_1\) : the sample mean is lower than the true mean

\(\bar{x} = \frac{\sum_{i=1}^n{x_i}}{n}\)

\(s_d = \sqrt{\sum_{i=1}^n{(x_i - \bar{x})^2}/(n-1)}\)

\(t = \frac{\bar{x} - 0}{s_d/\sqrt{n}}\)

\(Reject ~ H_0 ~ if ~ t<t_{n-1,\alpha}\)

\(Fail ~ reject ~ H_0 ~ if ~ t>t_{n-1,\alpha}\)

\(CI : (-\infty,\bar{x} - t_{df,\alpha}*sd/\sqrt{n})\)

right tailed

\(H_1\) : the sample mean is greater than the true mean

\(Reject ~ H_0 ~ if ~ t>t_{n-1,1-\alpha}\)

\(Fail ~ reject ~ H_0 ~ if ~ t<t_{n-1,1-\alpha}\)

\(CI : (\bar{x} + t_{df,1-\alpha}*sd/\sqrt{n},\infty)\)

\(H_1\) : the sample mean is different from the true mean

\(Reject ~ H_0 ~ if ~ |t|<t_{n-1,1-\alpha/2}\)

\(Fail ~ reject ~ H_0 ~ if ~ |t|<t_{n-1,1 - \alpha/2}\)

\(CI : (\bar{x} - t_{df,1-\alpha/2}*sd/\sqrt{n} ,\bar{x} + t_{df,1-\alpha/2}*sd/\sqrt{n})\)

\(H_0\) : there’s no difference betwee difference

\(H_1\) : the difference is different

\(\bar{d} = \frac{\sum_{i=1}^n{d_i}}{n}\)

\(s_d = \sqrt{\sum_{i=1}^n{(d_i - \bar{d})^2}/(n-1)}\)

\(t = \frac{\bar{d} - 0}{s_d/\sqrt{n}}\)

\(CI : (\bar{d} - t_{df,1-\alpha/2}*sd/\sqrt{n} ,\bar{d} + t_{df,1-\alpha/2}*sd/\sqrt{n})\)

Two Group testing

Variance test.

\(H_0\) : the variances between group are equal(no difference)

\(H_1\) : the variances between group are not equal(there’s difference)

\(s_{x_1} = \sqrt{\sum_{i=1}^{n_1}(x_i - \bar{x_1})^2/(n_1-1)}\)

\(s_{x_2} = \sqrt{\sum_{j=1}^{n_2}(x_i - \bar{x_2})^2/(n_2-1)}\)

\(F = s_1^2/s_2^2 \sim F_{n_1-1,n_2-1}\)

\(Reject ~ H_0 ~ if ~ F>F_{n_1-1,n_2-1,1-\alpha/2} ~ OR ~ F<F_{n_1-1,n_2-1,\alpha/2}\)

\(Fail ~ reject ~ H_0 ~ if ~ F_{n_1-1,n_2-1,\alpha/2}<F<F_{n_1-1,n_2-1,1-\alpha/2}\)

t-test with equal variance

\(H_0\) : the means between group are equal(no difference)

\(H_1\) : the means between group are not equal(there’s difference)

\(s_{pool} = \frac{(n_1-1)s_1 + (n_2 -1)s_2}{n_1+n_2-2}\)

\(t = \frac{\bar{X_1} - \bar{X_2}}{s_{pool}\times\sqrt{\frac{1}{n_1}+\frac{1}{n_2}}}\)

\(Reject ~ H_0 ~ if ~ |t|>t_{df,1-\alpha/2}\)

\(Fail ~ reject ~ H_0 ~ if ~ |t|<t_{df,1-\alpha/2}\)

\(CI = (\bar{X_1}-\bar{X_2} ~ - ~ t_{df,1-\alpha/2}s_{pool}/\sqrt{1/n_1+1/n_2},\bar{X_1}-\bar{X_2} ~ + ~ t_{df,1-\alpha/2}s_{pool}/\sqrt{1/n_1+1/n_2} )\)

t-test with unequal variance

\(\bar{X_1} - \bar{X_2} \sim N(\mu_1-\mu_2,\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2})\) if we know the population variance

\(t = \frac{\bar{X_1} - \bar{X_2}}{\sqrt{\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}}}~\sim t_{d''}\)

\(d' = round(d'') = \frac{(\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2})^2}{\frac{s_1^2}{n_1}^2/(n_1-1)+\frac{s_2^2}{n_2}^2/(n_2-1)}\)

\(CI = (\bar{X_1}-\bar{X_2} ~ - ~ t_{df,1-\alpha/2}\sqrt{\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}},\bar{X_1}-\bar{X_2} ~ + ~ t_{df,1-\alpha/2}\sqrt{\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}})\)

Multigroup Camparison

\(H_0\) : there’s no difference between groups

\(H_1\) : at least one group is different from the other groups

\(Between~Sum~of~Square = \sum_{i=1}^k\sum_{j=1}^{n_i}(\bar{y_i} - \bar{\bar{y}})^2=\sum_i^kn_i\bar{y_i}^2-\frac{y_{..}^2}{n}\)

\(Within~Sum~of~Square = \sum_{i=1}^k\sum_{j=1}^{n_i}(y_{ij}-\bar{y_i})^2=\sum_i^k(n_i-1)s_i^2\)

\(Between~Mean~Square = \frac{\sum_{i=1}^k\sum_{j=1}^{n_i}(\bar{y_i} - \bar{\bar{y}})^2}{k-1}\)

\(Within~Mean~Square = \frac{\sum_{i=1}^k\sum_{j=1}^{n_i}(y_{ij}-\bar{y_i})^2}{n-k}\)

\(F_{statistics} = \frac{Between~Mean~Square}{Within~Mean~Square} \sim F(k-1,n-k)\)

\(Reject ~ H_0 ~ if ~ F>F_{k-1,n-k,1-\alpha}\)

\(Fail ~ reject ~ H_0 ~ if ~F<F_{k-1,n-k,1-\alpha}\)

Proportion testing

Normal approximation, homogeneity chi-sq test.

\(H_0 :p_{1j} =p_{2j}=...=p_{ij}\) the proportion among \(group_i\) are equal …

\(H_1\) : For at least one column there’re two row i and i’ where the proability are not the same.

\(\mathcal{X}^2 = \sum_i^{row}\sum_j^{col}\frac{(n_{ij}-E_{ij})^2}{E_{ij}} \sim \mathcal{X}^2_{df = (row-1)\times(col-1)}\)

\(Reject ~ H_0 ~ if ~ \mathcal{X}^2>\mathcal{X}^2_{(r-1))*(c-1),1-\alpha}\)

\(Fail ~ reject ~ H_0 ~ if ~\mathcal{X}^2<\mathcal{X}^2_{(r-1))*(c-1),1-\alpha}\)

Independent test

\(H_0\) : Group A and Group B are independet

\(H_1\) : Group A and Group B are dependet/associate

Fisher Exact

Mcnemar test.

Custom Theorem, Assumption, and Lemma Numbering in Latex

Examples of customized theorem names.

I saw this kind of alternative assumption definition in other papers, such as:

  • Assumption 1: …
  • Assumption 2: …
  • Assumption 2’: …

Here we define two alternative assumptions. How to do it in Latex with `\newtheorem’ command. For example, if we define an assumption in the following way:

Latex Assumptions

I now define the following assumptionp :

For alternative assumption, we define assumptionalt as a new theorem. It uses assumption as parent counter ([assumption]). Then we define a new environment assumptionp . It takes one argument, which will allow us to customize the section name. Examples:

It looks like this:

Custome Assumption Alternatives Latex

I derived all these from StackOverflow. It took me a while to understand it. You can easily replace assumption with theorem, lemma, etc.

  • ← Previous Post
  • Next Post →

GitHub Repo stars

LaTeX cheatsheet

This cheat sheet summarizes a reference list of LaTeX commonly used display math notation and some application examples of KaTeX .

# Getting Started

# introduction.

LaTeX A TEX-based typesetting system suitable for producing scientific, mathematical, and physical documents of high print quality.

  • LaTeX official website (latex-project.org)
  • KaTeX official website (katex.org)

And KaTeX handles only a smaller subset of LaTeX's mathematical notation for display on the web

Example based on KaTeX showing on one line: KaTeX:\int_0^\infty x^2 dx

# Supported Functions

# emphasis in \text, # delimiter sizing, # greek and hebrew letters, # other letters, # alphabets and unicode, # annotation.

\tag{hi} x+y^{2x}

\tag*{hi} x+y^{2x}

# Vertical layout

# overlap and spacing.

\sum_{\mathclap{1\le i\le j\le n}} x_{ij}

# KaTeX:\LaTeX math constructs

# delimiters.

The pair of expressions \left KaTeX:s_1 and \right KaTeX:s_2 can be used to match the height of the separators KaTeX:s_1 and KaTeX:s_2 to the height of their content, e.g. :

# Variable Size Symbols

# standard function name, # function names should be in roman font, not italics, for example:, # logic and set theory, # special symbols, # mathematical operator, # big operator, # fractions and binomials, # binary operator, # negative relationship, # symbols and punctuation, # environments, # environments 1, # environments 2, # environments 3, # environments 4, # environments 5, # environments 6, # environments 7, # environments 8, # environments 9, # environments 10, # environments 11, # environments 12, # environments 13, # environments 14, # environments 15, # environments 16, # environments 17, # style, color, size and font.

  • symbols.pdf (cmor-faculty.rice.edu)
  • Uncategorized

Introducing Math

By jakehartnell | 26 January, 2015

We are creating an annotation technology that can be used to enrich human knowledge. Today we take another step forward: Hypothes.is now supports math typesetting. You can now place beautifully formatted equations and mathematical symbols into annotations.

To use math in your annotations, simply enclose supported LaTeX commands within enclosing \( .... \) for inline math, or $$ … $$ for display style math. We’ve also added a handy button to the editor to insert the symbols for you:

MathSupport

Math typesetting is provided by a combination of the new KaTeX library and MathJax . KaTeX has the benefits of being lightweight, working for a large portion of math, and rendering extremely fast. The drawback is that it lacks many of the LaTeX commands supported by MathJax. Our implementation loads MathJax if a command is present that KaTeX doesn’t support, and uses that for rendering that particular equation. The combination results in math typesetting that is both very fast and supports a wide variety of math!

finalresult

We’re excited to see how the addition of math will increase the richness of online commentary and discussion on the annotated Web. We’d like to give a special thank you to Peter Krautzberger at Mathjax, who’s excellent software library and thoughtful advice have been an essential part of this effort.

Share this article

Citations and references

This lesson show the basics of reference databases. Learn how to build your own databases and how to use them in documents using the two major workflows available.

For bibliographic citations, while you can include reference sources directly in your document, usually you will get that information from one or more external files. Such a file is a database of references, containing the information in a processing-friendly format. Using one or more reference databases lets you re-use information and avoid manual formatting.

Reference databases

Reference databases are normally referred to as ‘BibTeX files’ and have the extension .bib . They contain one or more entries, one for each reference, and within each entry there are a series of fields. Let us look at an example.

This is an entry for an article and another for a book; these are by far the most common types. Each database entry type starts with @ , as shown, and all of the information then sits within a brace pair.

The various fields we need are given in key-value format, apart from what is known as the ‘key’: the ‘name’ of the citation. You can use whatever you like, as it’s just a label, but above we’ve chosen to use the name of an author plus the year: this is a common approach.

Exactly which fields you need to give depends on the type of entry, but most of these are quite obvious. You might notice that in the author field, each entry is separated by and . This is essential : the format of the output needs to know which author is which. You might also notice that in the article title, some entries are in an extra set of braces; these are there to prevent any case-changing being applied.

Editing .bib files by hand is rather tedious, so most people use a dedicated editor. JabRef is widely used and cross-platform, but there are several other interfaces available. If the reference contains a DOI (Digital Object Identifier), you may want to try doi2bib to easily get the BibTeX entry. But make sure to check if the entry is correct!

Here, we will use the short example database above for our demonstrations: we have ‘saved’ it as learnlatex.bib .

Transferring information from the database

To get the information into your document there are three steps. First, use LaTeX to compile your document, which creates a file with a list of the references that your document cites. Second, run a program that takes information from the database of references, picks out the ones that you use, and puts them in order. Finally, compile your document again so that LaTeX can use that information to resolve your citations. Usually it will require at least two compilations to resolve all the references.

For the second step, there are two systems in wide use: BibTeX and Biber. Biber is only ever used with a LaTeX package called biblatex , whereas BibTeX is used with either no packages at all or with natbib .

Running a second tool as well as LaTeX is handled in different ways by different editors. For our online examples, there are some ‘behind the scenes’ scripts that do everything in one go. Your editor might have a single ‘do stuff’ button or you might have to choose to run BibTeX or Biber manually between LaTeX runs.

The format of citations and references is independent of your BibTeX database, and is set by what is known as a ‘style’. We will see that these work slightly differently in the BibTeX workflow and biblatex , but the general idea remains: we can choose how citations appear.

The BibTeX workflow with natbib

Whilst it is possible to insert citations into a LaTeX document without any packages loaded, this is rather limited. Instead, we will use the natbib package, which allows us to create different types of citation and has a lot of styles available.

The basic structure of our input is as shown in this example.

You can see that we can cite different entries in the database by giving their key. The natbib package offers both textual and parenthetical citation styles, \citet and \citep , respectively. The reference style is selected by the \bibliographystyle line; here we’ve used the plainnat style. The bibliography is actually inserted by the \bibliography line, which also picks the database(s) to use; this is a comma-separated list of names.

Page references can be added to the citation with an optional argument. If two optional arguments are given, the first goes in front of the citation label for a short note and the second after the label for a page reference.

The setup above uses author-year style, but we can make use of numeric citations. That is done by adding the numbers option to the natbib line.

The biblatex workflow

The biblatex package works slightly differently to natbib , as we select the databases in the preamble but print it in the document body. There are some new commands for this.

Notice that \addbibresource requires the full database filename, whereas we omitted the .bib for \bibliography with natbib . Also notice that biblatex uses rather longer names for its citation commands, but these are all quite easy to guess.

Again, short text before and after the citation can be inserted with the optional arguments. Note that the page numbers need not be prefixed with p.~ or pp.~ here, biblatex can automatically add the appropriate prefix.

In biblatex , the reference style is picked when we load the package. Here, we’ve used authoryear , but there is a numeric style and many others are also available.

Choosing between the BibTeX workflow and biblatex

Even though both the BibTeX workflow and biblatex get their input via BibTeX files and can produce structurally similar output in the document, they use completely different ways to produce this result. That means that there are some differences between the two approaches that may help you choose which one works best for you.

In the BibTeX workflow the bibliography style is ultimately decided by a .bst file which you select with the \bibliographystyle command. biblatex does not use .bst files and uses a different system. If you are using a template that comes with a .bst file or are given a .bst file for your project, you must use the BibTeX workflow and cannot use biblatex .

The different approach biblatex takes implies that you can modify the output of the bibliography and citation commands directly from your document preamble using LaTeX-based commands. Modifications of BibTeX .bst styles on the other hand usually require working with these external files and need knowledge of the BibTeX programming language. Generally speaking, biblatex is said to be easier to customize than the BibTeX workflow.

In biblatex it is generally easier to implement more elaborate citation styles with a wider array of different citation commands. It also offers more context-dependent features. Roughly speaking this is less interesting for the styles common in many STEM subjects, but becomes relevant for some more complex styles in some areas of the humanities.

BibTeX can only sort US-ASCII characters correctly and relies on workarounds to provide US-ASCII-based sorting for non-US-ASCII characters. With Biber biblatex offers full Unicode sorting capabilities. Thus biblatex is usually a better choice if you want to sort your bibliography in a non-ASCII/non-English order.

Having been around for much longer than biblatex , the BibTeX workflow is more established than biblatex , meaning that many publishers and journals expect bibliographies generated via the BibTeX workflow. Those publishers cannot or generally do not accept submissions using biblatex .

The bottom line is: Check the author/submission guidelines if you are submitting to a journal or publisher. If you are given a .bst file, you must use the BibTeX workflow. If you want a relatively simple bibliography and citation style and only need English US-ASCII-based sorting, the BibTeX workflow should suffice. If you need a more complex citation style, non-English sorting or want easier access to citation and bibliography style customisation features, you will want to look into using biblatex .

Try out both the natbib and biblatex examples. For natbib , you’ll need to run LaTeX, BibTeX, LaTeX, LaTeX; for biblatex , it’s LaTeX, Biber, LaTeX. Find out how to do that in your editor, or try the Overleaf and TeXLive.net automation.

See what happens when you create new database entries and new citations. Add a citation that’s not in the database and see how it appears. Experiment with natbib ’s numeric and biblatex ’s style=numeric option.

Banner

Referencing, Citing, and Structuring Bibliographies

  • Referencing Styles
  • EndNote Basic
  • Using Zotero with LaTeX
  • Using Mendeley with LaTeX

What is Natbib?

The natbib package allows more flexibility in terms of citing and referencing styles, including Harvard style. Please see this video for more information:

My references are not appearing right - why?

Much time and effort can be saved by automatically generating BibTeX files through bulk export of multiple references either direct from databases or from reference management software. This automatic process may cause some issues and require you to tidy up the BibTeX files.

Here are some suggestions to help with this:

  • LaTeX special characters (e.g. $, %, &, \,) present in a BibTeX file can create problems during typesetting. To avoid this, all these characters should be prefixed with the ‘\’ character. Use a text editor such as Notepad or TeXworks to Find and Replace e.g. replace $ with \$
  • The BibTeX file is likely to contain extra fields of information not required for the actual reference. This information may pull through into the reference e.g. Notes field. It is recommended to remove this information from the BibTeX file
  • Retaining capitalization. Some bibliography styles strip out capitalization in fields such as the title field; this can be a problem if you want to preserve e.g. acronyms. To preserve capitalization, edit the BibTeX file and enclose the specific text (whole not partial words) in curly brackets:

e.g. title={Study of incompressible {MHD} flow in a circular pipe with transverse magnetic field using a spectral/finite element solver},

Thanks to Imperial College's guide for this information.

Citing and referencing in LaTex - using BibTeX

You can manage your references and bibliography in LaTex using the BibTex system. BibTex allows you to automatically generate and format a bibliography in a LaTeX document. You can do this by storing them in separate BibTeX database files (.bib extension). Advantages to doing this include:

  • Once stored in a BibTeX file, a reference can be re-used in future documents (you may choose to maintain one master or a series of BibTeX files)
  • Many databases and reference management software allows automatic export of reference details as BibTeX files

You can then use the following commands in your LaTeX document:

  • To insert a citation where  label  is the label of a bibliographic entry in a  .bib  file.
  • To insert a bibliography where  bibfilename  is the name of a  .bib  file.
  • To choose a BibTeX bibliographic style file with the extension  .bst .

There is a wealth of guides on how to do this available on the web, including LaTeX's own guide on bibliography management here .

This is also a really helpful guide on how BibTex works:  https://www.latex-tutorial.com/tutorials/bibtex/  

  • LaTeX/Bibliography Management Wiki Book
  • Share LaTeX YouTube Channel

  • << Previous: Zotero
  • Next: Using Zotero with LaTeX >>
  • Last Updated: Nov 22, 2023 10:38 AM
  • URL: https://libguides.rhul.ac.uk/referencing

Creative Commons License

Citing and Using References on Overleaf: A Guide for Researchers

When writing a research paper, it’s important to use references to support your claims. Citing your sources correctly is key to creating a solid argument and avoiding plagiarism. This guide will show you how to cite references on Overleaf using CiteDrive. We’ll also give you tips for finding reliable sources online. Let’s get started!

Need a simple solution for managing your BibTeX entries? Explore CiteDrive!

  • Web-based, modern reference management
  • Collaborate and share with fellow researchers
  • Integration with Overleaf
  • Comprehensive BibTeX/BibLaTeX support
  • Save articles and websites directly from your browser
  • Search for new articles from a database of tens of millions of references

Step 1: Connecting CiteDrive with Overleaf

If you’re not already signed in to Overleaf , you’ll need to do so now. Then, go to CiteDrive , create an Overleaf project, and add references to your new project. Your project could look like this:

CiteDrive - Example

After that, click on “bib” on the top left of your project. This will open a new tab to the dynamic BibTeX file that you can use for your Overleaf, which will auto-update whenever you or your teammates add, update, or deletes references from your project.

Finally, go to Overleaf, create a new file, select “From External URL”, and paste the URL from the dynamic BibTeX to “URL to fetch the file from” name it here references.bib . Your CiteDrive project is now connected to Overleaf! Remember that you need to click on refresh when you make changes in our CiteDrive project so that Overleaf gets the latest state.

Add files to Overleaf

Step 2: Create a TeX document in Overleaf

Now let’s create a new tex-file for Overleaf, which we could call “document.tex” we can define the bibliography, the BibTeX file from CiteDrive with \bibliography{references} . But what bibliography tools should we use? For Bibliography management in LaTeX/Overleaf, there are many options: most likely, natbib, bibtex, and biblatex. For the management of bibliographies in LaTeX, BibTeX is the mainstay that forms the basis for the format. With natbib, BibTeX is provided with an extension that offers more design freedom for in-text citations, and biblatex is a complete revision of BibTeX that offers more reference types, sorting, and filtering options for bibliographies and localization options. While BibteX is the best-known program, BibLaTex is not only just as robust but also the most recommended program for newcomers. The citation and bibliographical data for references and listings are kept in the so-called .bib-file, just as you see in the BibTeX file from CiteDrive. It’s always in the same format:

Here @article is the source type, title , author , year and journal , the attributes used to display in your references lists and citations and lastly, smith201X , a unique identifier you can use to reference in your document, mainly with cite(key). CiteDrive is not picky about the format; any field and entry type making it work for the bibliographic package of your choice is acceptable. Because CiteDrive’s fundamental goal is to separate bibliographic data from the document and citation styles, all alternatives are supported by CiteDrive.

As a result, we provide three templates below to get you started.

Getting started with BibTeX:

If you want to start with BibTeX, use the following template or open directly to Overleaf. For more information on BibTeX, see the documentation.

Getting started with natbib:

For more on natbib, please click here.

Getting started with BibLaTeX:​

For more on BibLaTeX, please click here.

Step 3: In-Text citations

If you have the browser extension installed, you can create citations by selecting the text and clicking on the CiteDrive icon in your toolbar.

You can also cite references manually using the cite command. For example, if you wanted to cite Smith (201X), you would use \cite{smith201X} . Or use the reference search in overleaf.

Bibliography styles are preinstalled on Overleaf and depending which package you used references on the following pages:

That’s it! You should now have everything you need to start using references in Overleaf. Please let us know by e-mail at [email protected] if you have any questions or feedback.

Happy TeXing!

No Search Results

  • Bibliography management with bibtex
  • 1 Advisory note
  • 2 Introduction
  • 3.1 A note on compilation times
  • 4.1 Some notes on using \(\mathrm{Bib\TeX}\) and .bib files
  • 5.1 Multiple authors in \(\mathrm{Bib\TeX}\)
  • 5.2 Multiple-word last names
  • 5.3 I tried to use % to comment out some lines or entries in my .bib file, but I got lots of error messages instead?
  • 6.1 Edit the .bib file as plain text
  • 6.2 Help from GUI-based .bib editors
  • 6.3 Export from reference library services
  • 6.4 I’ve already got a reference list in a Microsoft Word/HTML/PDF file; can I somehow reuse the data without re-typing everything?
  • 7.1 Further reading

Advisory note

If you are starting from scratch we recommend using biblatex because that package provides localization in several languages, it’s actively developed and makes bibliography management easier and more flexible.

Introduction

Many tutorials have been written about what \(\mathrm{Bib\TeX}\) is and how to use it . However, based on our experience of providing support to Overleaf’s users, it’s still one of the topics that many newcomers to \(\mathrm{\LaTeX}\) find complicated—especially when things don’t go quite right; for example: citations aren’t appearing; problems with authors’ names; not sorted to a required order; URLs not displayed in the references list, and so forth.

In this article we’ll pull together all the threads relating to citations, references and bibliographies, as well as how Overleaf and related tools can help users manage these.

We’ll start with a quick recap of how \(\mathrm{Bib\TeX}\) and bibliography database ( .bib ) files work and look at some ways to prepare .bib files. This is, of course, running the risk of repeating some of the material contained in many online tutorials, but future articles will expand our coverage to include bibliography styles and biblatex —the alternative package and bibliography processor.

Bibliography: just a list of \bibitems

Let’s first take a quick look “under the hood” to see what a \(\mathrm{\LaTeX}\) reference list is comprised of—please don’t start coding your reference list like this because later in this article we’ll look at other, more convenient, ways to do this.

A reference list really just a thebibliography list of \bibitems :

By default, this thebibliography environment is a numbered list with labels [1] , [2] and so forth. If the document class used is article , \begin{thebibliography} automatically inserts a numberless section heading with \refname (default value: References ). If the document class is book or report, then a numberless chapter heading with \bibname (default value: Bibliography ) is inserted instead. Each \bibitem takes a cite key as its parameter, which you can use with \cite commands, followed by information about the reference entry itself. So if you now write

together with the thebibliography block from before, this is what gets rendered into your PDF when you run a \(\mathrm{\LaTeX}\) processor (i.e. any of latex , pdflatex , xelatex or lualatex ) on your source file:

Citing entries from a thebibliography list

Figure 1: Citing entries from a thebibliography list.

Notice how each \bibitem is automatically numbered, and how \cite then inserts the corresponding numerical label.

\begin{thebibliography} takes a numerical argument: the widest label expected in the list. In this example we only have two entries, so 9 is enough. If you have more than ten entries, though, you may notice that the numerical labels in the list start to get misaligned:

thebibliography with a label that’s too short

Figure 2: thebibliography with a label that’s too short.

We’ll have to make it \begin{thebibliography}{99} instead, so that the longest label is wide enough to accommodate the longer labels, like this:

thebibliography with a longer label width

Figure 3: thebibliography with a longer label width.

If you compile this example code snippet on a local computer you may notice that after the first time you run pdflatex (or another \(\mathrm{\LaTeX}\) processor), the reference list appears in the PDF as expected, but the \cite commands just show up as question marks [?] .

This is because after the first \(\mathrm{\LaTeX}\) run the cite keys from each \bibitem ( texbook , lamport94 ) are written to the .aux file and are not yet available for reading by the \cite commands. Only on the second run of pdflatex are the \cite commands able to look up each cite key from the .aux file and insert the corresponding labels ( [1] , [2] ) into the output.

On Overleaf, though, you don’t have to worry about re-running pdflatex yourself. This is because Overleaf uses the latexmk build tool , which automatically re-runs pdflatex (and some other processors) for the requisite number of times needed to resolve \cite outputs. This also accounts for other cross-referencing commands, such as \ref and \tableofcontents .

A note on compilation times

Processing \(\mathrm{\LaTeX}\) reference lists or other forms of cross-referencing, such as indexes, requires multiple runs of software—including the \(\mathrm{\TeX}\) engine (e.g., pdflatex ) and associated programs such as \(\mathrm{Bib\TeX}\), makeindex , etc. As mentioned above, Overleaf handles all of these mulitple runs automatically, so you don’t have to worry about them. As a consequence, when the preview on Overleaf is refreshing for documents with bibliographies (or other cross-referencing), or for documents with large image files (as discussed separately here ), these essential compilation steps may sometimes make the preview refresh appear to take longer than on your own machine. We do, of course, aim to keep it as short as possible! If you feel your document is taking longer to compile than you’d expect, here are some further tips that may help.

Enter \(\mathrm{Bib\TeX}\)

There are, of course, some inconveniences with manually preparing the thebibliography list:

  • It’s up to you to accurately format each \bibitem based on the reference style you’re asked to use—which bits should be in bold or italic? Should the year come immediately after the authors, or at the end of the entry? Given names first, or last names first?
  • If you’re writing for a reference style which requires the reference list to be sorted by the last names of first authors, you’ll need to sort the \bibitem s yourself.
  • For different manuscripts or documents that use different reference styles you’ll need to rewrite the \bibitem for each reference.

This is where \(\mathrm{Bib\TeX}\) and bibliography database files ( .bib files) are extremely useful, and this is the recommended approach to manage citations and references in most journals and theses. The biblatex approach, which is slightly different and gaining popularity, also requires a .bib file but we’ll talk about biblatex in a future post.

Instead of formatting cited reference entries in a thebibliography list, we maintain a bibliography database file (let’s name it refs.bib for our example) which contains format-independent information about our references. So our refs.bib file may look like this:

You can find more information about other \(\mathrm{Bib\TeX}\) reference entry types and fields here —there’s a huge table showing which fields are supported for which entry types. We’ll talk more about how to prepare .bib files in a later section.

Now we can use \cite with the cite keys as before, but now we replace thebibliography with a \bibliographystyle{...} to choose the reference style, as well as \bibliography{...} to point \(\mathrm{Bib\TeX}\) at the .bib file where the cited references should be looked-up.

This is processed with the following sequence of commands, assuming our \(\mathrm{\LaTeX}\) document is in a file named main.tex (and that we are using pdflatex ):

  • pdflatex main
  • bibtex main

and we get the following output:

BibTeX output with plain bibliography style

Figure 4: \(\mathrm{Bib\TeX}\) output using the plain bibliography style.

Whoah! What’s going on here and why are all those (repeated) processes required? Well, here’s what happens.

During the first pdflatex run, all pdflatex sees is a \bibliographystyle{...} and a \bibliography{...} from main.tex . It doesn’t know what all the \cite{...} commands are about! Consequently, within the output PDF, all the \cite{...} commands are simply rendered as [?], and no reference list appears, for now. But pdflatex writes information about the bibliography style and .bib file, as well as all occurrences of \cite{...} , to the file main.aux .

It’s actually main.aux that \(\mathrm{Bib\TeX}\) is interested in! It notes the .bib file indicated by \bibliography{...} , then looks up all the entries with keys that match the \cite{...} commands used in the .tex file. \(\mathrm{Bib\TeX}\) then uses the style specified with \bibliographystyle{...} to format the cited entries, and writes a formatted thebibliography list into the file main.bbl . The production of the .bbl file is all that’s achieved in this step; no changes are made to the output PDF.

When pdflatex is run again, it now sees that a main.bbl file is available! So it inserts the contents of main.bbl i.e. the \begin{thebibliography}....\end{thebibliography} into the \(\mathrm{\LaTeX}\) source, where \bibliography{...} is. After this step, the reference list appears in the output PDF formatted according to the chosen \bibliographystyle{...} , but the in-text citations are still [?].

pdflatex is run again, and this time the \cite{...} commands are replaced with the corresponding numerical labels in the output PDF!

As before, the latexmk build tool takes care of triggering and re-running pdflatex and bibtex as necessary, so you don’t have to worry about this bit.

Some notes on using \(\mathrm{Bib\TeX}\) and .bib files

A few further things to note about using \(\mathrm{Bib\TeX}\) and .bib files :

  • You may have noticed that although refs.bib contained five \(\mathrm{Bib\TeX}\) reference entries, only two are included in the reference list in the output PDF. This is an important point about \(\mathrm{Bib\TeX}\): the .bib file’s role is to store bibliographic records, and only entries that have been cited (via \cite{...} ) in the .tex files will appear in the reference list. This is similar to how only cited items from an EndNote database will be displayed in the reference list in a Microsoft Word document. If you do want to include all entries—to be displayed but without actually citing all of them—you can write \nocite{*} . This also means you can reuse the same .bib file for all your \(\mathrm{\LaTeX}\) projects: entries that are not cited in a particular manuscript or report will be excluded from the reference list in that document.
  • \(\mathrm{Bib\TeX}\) requires one \bibliographystyle{...} and one \bibliography{...} to function correctly—in future posts we’ll see how to create multiple bibliographies in the same document. If you keep getting “undefined citation” warnings, check that you have indeed included those two commands, and that the names are spelled correctly. File extensions are not usually required, but bear in mind that file names are case sensitive on some operating systems—including on Overleaf! Therefore, if you typed \bibliographystyle{IEEetran} (note the typo: “e”) instead of \bibliographystyle{IEEEtran} , or wrote \bibliography{refs} when the actual file name is Refs.bib , you’ll get the dreaded [?] as citations.
  • In the same vein, treat your cite keys as case-sensitive, always. Use the exact same case or spelling in your \cite{...} as in your .bib file.
  • The order of references in the .bib file does not have any effect on how the reference list is ordered in the output PDF: the sorting order of the reference list is determined by the \bibliographystyle{...} . For example, some readers might have noticed that, within my earlier example, the first citation in the text latex2e is numbered [2], while the second citation in the text ( texbook ) is numbered [1]! Have \(\mathrm{\LaTeX}\) and \(\mathrm{Bib\TeX}\) lost the plot? Not at all: this is actually because the plain style sorts the reference list by alphabetical order of the first author’s last name . If you prefer a scheme where the numerical citation labels are numbered sequentially throughout the text, you’ll have to choose a bibliography style which implements this. For example, if instead we had used \bibliographystyle{IEEEtran} for that example, we’d get the following output. Notice also how the formatting of each cited item in the reference list has automatically updated to suit the IEEE’s style:

IEEEtran bibliography style output

Figure 5: IEEEtran bibliography style output.

We’ll talk more about different bibliography styles, including author–year citation schemes, in a future article. For now, let’s turn our attention to .bib file contents, and how we can make the task of preparing .bib files a bit easier.

Taking another look at .bib files

As you may have noticed earlier, a .bib file contains \(\mathrm{Bib\TeX}\) bibliography entries that start with an entry type prefixed with an @ . Each entry has a some key–value \(\mathrm{Bib\TeX}\) fields , placed within a pair of braces ( {...} ). The cite key is the first piece of information given within these braces, and every field in the entry must be separated by a comma :

As a general rule, every bibliography entry should have an author , year and title field, no matter what the type is. There are about a dozen entry types although some bibliography styles may recognise/define more; however, it is likely that you will most frequently use the following entry types:

  • @article for journal articles (see example above).
  • @inproceedings for conference proceeding articles:
  • @book for books (see examples above).
  • @phdthesis , @masterthesis for dissertations and theses:
  • @inbook is for a book chapter where the entire book was written by the same author(s): the chapter of interest is identified by a chapter number:
  • @incollection is for a contributed chapter in a book, so would have its own author and title . The actual title of the entire book is given in the booktitle field; it is likely that an editor field will also be present:
  • you will often find it useful to add \usepackage{url} or \usepackage{hyperref} in your .tex files’ preamble (for more robust handling of URLs);
  • not all bibliography styles support the url field: plain doesn’t, but IEEEtran does. All styles support note . More on this in a future post;
  • you should be mindful that even web pages and @misc entries should have an author , a year and a title field:

Multiple authors in \(\mathrm{Bib\TeX}\)

In a .bib file, commas are only used to separate the last name from the first name of an author—if the last name is written first. Individual author names are separated by and . So these are correct:

But none of the following will work correctly —you’ll get weird output, or even error messages from \(\mathrm{Bib\TeX}\)! So take extra care if you are copying author names from a paper or from a web page.

Multiple-word last names

If an author’s last name is made up of multiple words separated by spaces, or if it’s actually an organisation, place an extra pair of braces around the last name so that \(\mathrm{Bib\TeX}\) will recognise the grouped words as the last name:

Alternatively, you can use the Lastname, Firstname format; some users find that clearer and more readable:

Remember: Whether the first or last name appears first in the output (“John Doe” vs “Doe, John”), or whether the first name is automatically abbreviated “J. Doe” or “Doe, J.” vs “John Doe” “J. Doe”), all such details are controlled by the \bibliographystyle .

I tried to use % to comment out some lines or entries in my .bib file, but I got lots of error messages instead?

% is actually not a comment character in .bib files! So, inserting a % in .bib files not only fails to comment out the line, it also causes some \(\mathrm{Bib\TeX}\) errors. To get \(\mathrm{Bib\TeX}\) to ignore a particular field we just need to rename the field to something that \(\mathrm{Bib\TeX}\) doesn’t recognise. For example, if you want to keep a date field around but prefer that it’s ignored (perhaps because you want \(\mathrm{Bib\TeX}\) to use the year field instead) write Tdate = {...} or the more human-readable IGNOREdate = {...} .

To get \(\mathrm{Bib\TeX}\) to ignore an entire entry you can remove the @ before the entry type. A valid reference entry always starts with a @ followed by the entry type; without the @ character \(\mathrm{Bib\TeX}\) skips the lines until it encounters another @ .

How/where do I actually get those .bib files?

Edit the .bib file as plain text.

Because .bib files are plain text you can certainly write them by hand—once you’re familiar with \(\mathrm{Bib\TeX}\)’s required syntax. Just make sure that you save it with a .bib extension, and that your editor doesn’t surreptitiously add a .txt or some other suffix. On Overleaf you can click on the “Files…” link at the top of the file list panel, and then on “Add blank file” to create a fresh .bib file to work on.

Pro tip: Did you know that Google Scholar search results can be exported to a \(\mathrm{Bib\TeX}\) entry? Click on the “Cite” link below each search result, and then on the “\(\mathrm{Bib\TeX}\)” option search. You can then copy the \(\mathrm{Bib\TeX}\) entry generated. Here’s a video that demonstrates the process. Note that you should always double-check the fields presented in the entry, as the automatically populated information isn’t always comprehensive or accurate!

Help from GUI-based .bib editors

Many users prefer to use a dedicated \(\mathrm{Bib\TeX}\) bibliography database editor/manager, such as JabRef or BibDesk to maintain, edit and add entries to their .bib files. Using a GUI can indeed help reduce syntax and spelling errors whilst creating bibliography entries in a \(\mathrm{Bib\TeX}\) file. If you prefer, you can prepare your .bib file on your own machine using JabRef, BibDesk or another utility, and then upload it to your Overleaf.

Pro tip: If you’d like to use the same .bib for multiple Overleaf projects, have a look at this help article to set up a “master project”, or this one for sharing files from Google Drive (the instructions apply to other cloud-based storage solutions, such as Dropbox).

Export from reference library services

If you click on the Upload files button above the file list panel, you'll notice some options: Import from Mendeley, and Import from Zotero. If you’re already using one of those reference library management services, Overleaf can now hook into the Web exporter APIs provided by those services to import the .bib file (generated from your library) into your Overleaf project. For more information, see the Overleaf article How to link your Overleaf account to Mendeley and Zotero .

For other reference library services that don’t have a public API, or are not yet directly integrated with Overleaf, such as EndNote or Paperpile , look for an “export to .bib ” option in the application or service. Once you have a .bib file, you can then add it to your Overleaf project.

I’ve already got a reference list in a Microsoft Word/HTML/PDF file; can I somehow reuse the data without re-typing everything?

It used to be that you would have to hand-code each line into a \bibitem or an @article{...} entry (or another entry type) in a .bib file. As you can imagine, it’s not exactly a task that many people look forward to. Fortunately, these days some tools are available to help. They typically take a plain text file, e.g.

and attempt to parse the lines, converting it into a structured bibliography as a \(\mathrm{Bib\TeX}\) .bib file. For example, have a look at text2bib or Edifix . Be sure to go through the options of these tools carefully, so that they work well with your existing unstructured bibliography in plain text.

Summary and further reading

We’ve had a quick look at how \(\mathrm{Bib\TeX}\) processes a .bib bibliography database file to resolve \cite commands and produce a formatted reference list, as well as how to prepare .bib files.

Happy \(\mathrm{Bib\TeX}\)ing!

Further reading

For more information see:

  • Bibtex bibliography styles
  • Bibliography management with natbib
  • Bibliography management with biblatex
  • BibTeX documentation at CTAN web site
  • tocbind package documentation
  • Table of contents
  • Management in a large project
  • Multi-file LaTeX projects
  • Documentation Home
  • Learn LaTeX in 30 minutes

Overleaf guides

  • Creating a document in Overleaf
  • Uploading a project
  • Copying a project
  • Creating a project from a template
  • Using the Overleaf project menu
  • Including images in Overleaf
  • Exporting your work from Overleaf
  • Working offline in Overleaf
  • Using Track Changes in Overleaf
  • Using bibliographies in Overleaf
  • Sharing your work with others
  • Using the History feature
  • Debugging Compilation timeout errors
  • How-to guides
  • Guide to Overleaf’s premium features

LaTeX Basics

  • Creating your first LaTeX document
  • Choosing a LaTeX Compiler
  • Paragraphs and new lines
  • Bold, italics and underlining

Mathematics

  • Mathematical expressions
  • Subscripts and superscripts
  • Brackets and Parentheses
  • Fractions and Binomials
  • Aligning equations
  • Spacing in math mode
  • Integrals, sums and limits
  • Display style in math mode
  • List of Greek letters and math symbols
  • Mathematical fonts
  • Using the Symbol Palette in Overleaf

Figures and tables

  • Inserting Images
  • Positioning Images and Tables
  • Lists of Tables and Figures
  • Drawing Diagrams Directly in LaTeX
  • TikZ package

References and Citations

  • Natbib bibliography styles
  • Natbib citation styles
  • Biblatex bibliography styles
  • Biblatex citation styles
  • Multilingual typesetting on Overleaf using polyglossia and fontspec
  • Multilingual typesetting on Overleaf using babel and fontspec
  • International language support
  • Quotations and quotation marks

Document structure

  • Sections and chapters
  • Cross referencing sections, equations and floats
  • Nomenclatures
  • Lengths in L a T e X
  • Headers and footers
  • Page numbering
  • Paragraph formatting
  • Line breaks and blank spaces
  • Text alignment
  • Page size and margins
  • Single sided and double sided documents
  • Multiple columns
  • Code listing
  • Code Highlighting with minted
  • Using colours in LaTeX
  • Margin notes
  • Font sizes, families, and styles
  • Font typefaces
  • Supporting modern fonts with X Ǝ L a T e X

Presentations

  • Environments

Field specific

  • Theorems and proofs
  • Chemistry formulae
  • Feynman diagrams
  • Molecular orbital diagrams
  • Chess notation
  • Knitting patterns
  • CircuiTikz package
  • Pgfplots package
  • Typesetting exams in LaTeX
  • Attribute Value Matrices

Class files

  • Understanding packages and class files
  • List of packages and class files
  • Writing your own package
  • Writing your own class

Advanced TeX/LaTeX

  • In-depth technical articles on TeX/LaTeX

Have you checked our knowledge base ?

Message sent! Our team will review it and reply by email.

IMAGES

  1. 【驚きの値段】 T -falハンディチョッパー∶ネオ ecousarecycling.com

    reference a hypothesis in latex

  2. 🏷️ Formulation of hypothesis in research. How to Write a Strong Hypothesis. 2022-10-16

    reference a hypothesis in latex

  3. Reference/hypothesis length ratios on the PFSMB test set produced by...

    reference a hypothesis in latex

  4. Null Hypothesis Examples

    reference a hypothesis in latex

  5. Hypothesis with amsthm package

    reference a hypothesis in latex

  6. Hypothesis Tests

    reference a hypothesis in latex

VIDEO

  1. Write a summary in LaTeX

  2. SPSS Tutor, Paired Sample t test With in subject, repeated measure

  3. Bibliography in LaTeX

  4. [Handwriting Math challenge] Conquering LaTex: Riemann hypothesis in Computer-Like Script

  5. LaTeX 4

  6. Is BibTeX a reference manager?

COMMENTS

  1. Making a list of hypothesis and references to the hypothesis

    It seems that hyperref in combination with ntheorem cause unwanted references in the hypothesis list. The list of hypothesis contains a reference to the chapter (chapter 1) and the hypothesis number (hypo 1.1.) following the hypothesis. If a remove the hyperref package the list of hypothesis appears as I want it to be.

  2. Theorems and proofs

    As with many other numbered elements in LaTeX, the command \label can be used to reference theorem-like environments within the document. Unnumbered theorem-like environments. It can be useful to have an unnumbered theorem-like environment to add remarks, comments or examples to a mathematical document. The amsthm package provides this ...

  3. PDF Proofs in LaTeX

    Alexander W. Kocurek June 8, 2019 (version 3) What follows is a brief guide to writing proofs, in a variety of proof systems, using LaTeX. Proof systems covered include: • Fitch proofs (§ 1) • Sequent calculi and natural deduction trees (§ 2) • Lemmon proofs (§ 3) • Truth trees (§ 4) To typeset in some of these systems, you may need ...

  4. Latex for hypothesis testing

    paired. H0: there's no difference betwee sample mean and the true mean. H1: the sample mean is lower than the true mean. ˉx = ∑n i = 1xi n. sd = √ ∑ni = 1(xi − ˉx)2 / (n − 1) t = ˉx − 0 sd / √n. Reject H0 if t < tn − 1, α. Fail reject H0 if t > tn − 1, α. CI: ( − ∞, ˉx − tdf, α ∗ sd / √n)

  5. PDF Using the amsthm Package

    a reference may be entered with \eqref; however, beware if a package such as cleveref is being used, as it may associate the wrong element type. An initial item input in this manner cannot be linked using a \label, since it is not associated with a counter; the \label in the above example refers to the theorem element, not to the item in the list.

  6. Custom Theorem, Assumption, and Lemma Numbering in Latex

    For alternative assumption, we define assumptionalt as a new theorem. It uses assumption as parent counter ( [assumption]). Then we define a new environment assumptionp. It takes one argument, which will allow us to customize the section name. Examples: \end{assumption} \begin{assumption}\label{second}

  7. LaTeX Cheat Sheet & Quick Reference

    This cheat sheet summarizes a reference list of LaTeX commonly used display math notation and some application examples of KaTeX. #Getting Started #Introduction. LaTeX A TEX-based typesetting system suitable for producing scientific, mathematical, and physical documents of high print quality.

  8. Formatting Annotations with LaTeX : Hypothesis

    Here is a full list of supported functions and notation. To use LaTeX formatting in Hypothesis, simply begin and end the markup with two dollar-signs ( $$ ). For example: $$\sum_{\mathclap{1\le i\le n}} x_{i}$$. You can also use the editor toolbar: Click the ∑ icon and note the prompt to Insert LaTeX. Enter your LaTeX markup between the ...

  9. Introducing Math : Hypothesis

    We are creating an annotation technology that can be used to enrich human knowledge. Today we take another step forward: Hypothes.is now supports math typesetting. You can now place beautifully formatted equations and mathematical symbols into annotations. To use math in your annotations, simply enclose supported LaTeX commands within enclosing ...

  10. Cross referencing sections, equations and floats

    There's also a command that can automatically do the job for all the references to work. For instance, if your document is saved as main.tex. latexmk -pdf main.tex. generates the file main.pdf with all cross-references working. To change the output format use -dvi or -ps. Further reading. For more information see: Creating a document in LaTeX

  11. References with text in LaTeX

    147. In LaTeX you can easily reference a section by using \label{} next to a section and then \ref{} to create the reference. However, the reference only includes the number of the section, or the page with \pageref{}. I would like to insert a reference containing the text of the section. Example: This is a reference to Section~\ref{section:my}.

  12. Bibliography management in LaTeX

    Introduction. When it comes to bibliography-management packages, there are three main options in LaTeX: bibtex, natbib and biblatex. This article explains how to use the biblatex package, to manage and format the bibliography in a LaTeX document.biblatex is a modern option for processing bibliography information, provides an easier and more flexible interface and a better language localization ...

  13. Citations and references

    Transferring information from the database. To get the information into your document there are three steps. First, use LaTeX to compile your document, which creates a file with a list of the references that your document cites. Second, run a program that takes information from the database of references, picks out the ones that you use, and ...

  14. Hypothesis listing environment for mathematics paper

    The number assigned to a hypothesis should be centred vertically with respect to that hypothesis; LaTeX should (preferably) handle linebreaks, since each hypothesis is mostly words ... \begin{hypothesis} \label{hyp:three} A short hypothesis. \end{hypothesis} Another reference to the last hypothesis: \ref{hyp:three}. \end{document} Which ...

  15. Referencing using LaTeX

    Citing and referencing in LaTex - using BibTeX. You can manage your references and bibliography in LaTex using the BibTex system. BibTex allows you to automatically generate and format a bibliography in a LaTeX document. You can do this by storing them in separate BibTeX database files (.bib extension). Advantages to doing this include:

  16. Referencing Figures

    In the example from Overleaf included above, you can see that we could successfully add reference to figures included in the document later. To make it possible, LaTeX has to be run twice - the first run compiles and stores all labels and their positions, and in the second run all the references are replaced with the appropriate numbers. Thus ...

  17. Citing and Using References on Overleaf: A Guide for Researchers

    Step 3: In-Text citations. If you have the browser extension installed, you can create citations by selecting the text and clicking on the CiteDrive icon in your toolbar. You can also cite references manually using the cite command. For example, if you wanted to cite Smith (201X), you would use \cite{smith201X}.

  18. Bibliography management with bibtex

    By default, this thebibliography environment is a numbered list with labels [1], [2] and so forth. If the document class used is article, \begin{thebibliography} automatically inserts a numberless section heading with \refname (default value: References).If the document class is book or report, then a numberless chapter heading with \bibname (default value: Bibliography) is inserted instead.