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.

LaTeX-Tutorial.com

Bibliography in latex with bibtex/biblatex, learn how to create a bibliography with bibtex and biblatex in a few simple steps. create references / citations and autogenerate footnotes., creating a .bib file, using bibtex.

  • Autogenerate footnotes with BibLaTeX
  • BibTeX Format

BibTeX Styles

  • New Post! Export Bibliographic Database (BibTeX) Entries from Online Databases

We have looked at many features of LaTeX so far and learned that many things are automated by LaTeX. There are functions to add a table of contents, lists of tables and figures and also several packages that allow us to generate a bibliography. I will describe how to use bibtex and biblatex (both external programs) to create the bibliography. At first we have to create a .bib file, which contains our bibliographic information.

A .bib file will contain the bibliographic information of our document. I will only give a simple example, since there are many tools to generate the entries automatically. I will not explain the structure of the file itself at this point, since i suggest using a bibtex generator (choose one from google). Our example will contain a single book and look like this:

If you don’t want to use a BibTeX generator or a reference management tool like Citavi (which generates BibTeX files automatically for you), you can find more examples of BibTeX formats here.

After creating the bibtex file, we have to tell LaTeX where to find our bibliographic database. For BibTeX this is not much different from printing the table of contents. We just need the commands \bibliography  which tells LaTeX the location of our .bib file and \bibliographystyle which selects one of various bibliographic styles.

By using this code, we will obtain something like this:

Image

I named my .bib file lesson7a1.bib, note that I did not enter the .bib extension. For the style, I’ve choosen the ieeetr style, which is very common for my subject, but there are many more styles available. Which will change the way our references look like. The ieeetr style will mark citations with successive numbers such as [1] in this example. If I choose the style to apalike instead, i will get the following result:

Image

Most editors will let you select, to run bibtex automatically on compilation. In TeXworks (MiKTeX) for example, this should be selected by default.

Image

If you use a different editor, it can be necessary to execute the bibtex command manually. In a command prompt/shell simply run:

It is necessary to execute the pdflatex command, before the bibtex command, to tell bibtex what literature we cited in our paper. Afterwards the .bib file will be translated into the proper output for out references section. The next two steps merge the reference section with our LaTeX document and then assign successive numbers in the last step.

Autogenerate footnotes in \(\LaTeX\) using BibLaTeX

The abilities of BibTeX are limited to basic styles as depicted in the examples shown above. Sometimes it is necessary to cite all literature in footnotes and maintaining all of them by hand can be a frustrating task. At this point BibLaTeX kicks in and does the work for us. The syntax varies a bit from the first document. We now have to include the biblatex package and use the \autocite and \printbibliography  command. It is crucial to move the \bibliography{lesson7a1} statement to the preamble of our document:

The \autocite command generates the footnotes and we can enter a page number in the brackets \autocite[1]{DUMMY:1} will generate a footnote like this:

Image

For BibLaTeX we have to choose the citation style on package inclusion with:

The backend=bibtex  part makes sure to use BibTeX instead of Biber as our backend, since Biber fails to work in some editors like TeXworks. It took me a while to figure out how to generate footnotes automatically, because the sources I found on the internet, didn’t mention this at all.

BibTeX Formats

This is not meant to be a comprehensive list of BibTeX formats, but rather give you an idea of how to cite various sources properly. If you’re interested in an extensive overview of all BibTeX formats, I suggest you to check out the resources on Wikibooks.

Journal.png

Inbook (specific pages)

Inbook.png

This is a list of the formats that I have most commonly used. If you think some important format is missing here, please let me know.

Here’s a quick overview of some popular styles to use with BibTeX.

abbrv.png

I’m trying to keep this list updated with other commonly used styles. If you’re missing something here, please let me know.

  • Generate a bibliography with BibTeX and BibLaTeX
  • First define a .bib file using: \bibliography{BIB_FILE_NAME} (do not add .bib)
  • For BibTeX put the \bibliography statement in your document , for BibLaTeX in the preamble
  • BibTeX  uses the \bibliographystyle command to set the citation style
  • BibLaTeX chooses the style as an option like:  \usepackage[backend=bibtex, style=verbose-trad2]{biblatex}
  • BibTeX uses the \cite command, while BibLaTeX uses the \autocite command
  • The \autocite command takes the page number as an option: \autocite[NUM]{}

Next Lesson: 08 Footnotes

Citation Management and Writing Tools: LaTeX and BibTeX

  • LaTeX and BibTeX
  • Other Citation Tools
  • LaTeX & BibTeX & Overleaf
  • Zotero & BibTeX
  • Mendeley & BibTeX
  • JabRef & BibTeX  

LaTeX & BibTeX (& Overleaf)

What is LaTeX?

LaTeX is a typesetting program that takes a plain text file with various commands in it and converts it to a formatted document based on the commands that it has been given. The source file for the document has a file extension of .tex. It is widely used at MIT for theses and other technical papers due to its prowess with mathematical and foreign characters. For more information on LaTeX, see  LaTeX on Athena Basics , provided by the Athena On-Line Help system.

What is BibTeX?

BibTeX is a bibliographic tool that is used with LaTeX to help organize the user's references and create a bibliography. A BibTeX user creates a bibliography file that is separate from the LaTeX source file, wth a file extension of .bib. Each reference in the bibliography file is formatted with a certain structure and is given a "key" by which the author can refer to in the source .tex file.  For more information on BibTeX, see  see MIT IS&T's page:  How do I Create Bibliographies in LaTeX .

Overleaf at MIT

If you're new to LaTeX/BibTeX, consider using Overleaf ,  an online LaTeX and Rich Text collaborative writing and publishing tool. It includes built-in features to link your Zotero or Mendeley library to your LaTeX document .

MIT Libraries provides Overleaf Pro+ accounts for all MIT faculty, students and staff. Learn more on how to get started with Overleaf.  

Zotero & BibTeX

Export from Zotero to BibTeX:

  • To export all of the references in a certain library to BibTeX, click on the Actions drop-down menu in Zotero and select "Export Library..."
  • To export only certain references, select those references using control-clicks and shift-clicks, then right click one of them and select "Export Selected Items..."
  • From the dialog box that pops up, select the BibTeX format, and click OK.
  • Navigate to the directory where you are storing your manuscript (your .tex file), and save the file. This will generate a file in the appropriate format for BibTeX to read and create a bibliography from.

Auto-syncing from Zotero to BibTeX:

Auto-updating your .bib file when you make changes or additions to your Zotero Library is not available directly in Zotero. You can, however, install and enable a Zotero extension,  Better BibTeX , to enable these features. 

  • Once Better BibTeX is enabled, select the folder/library/items you wish to include in your .bib file as you would do in the basic export process described above.
  • In the export dialog box, you will now see many more options for your export format. Select the “Better BibTeX” option, and, to set up the auto sync, make sure you also check the “Keep updated” box.
  • Click Ok, name your .bib file and save in the same location as your LaTeX file.

You can adjust or remove a .bib auto sync of Zotero records at any time by going to your Zotero preferences and clicking on the Better BibTeX tab, followed by the Automatic export tab.

For more detailed instructions on setting up your Zotero export, see the  Zotero and BibTeX Quick Guide .

Linking with Overleaf:

In Overleaf, you can link your entire library or a Group library to your Overleaf project. This link allows you to have synced records with Zotero while actively accessing them in Overleaf. More information on linking your Zotero and Overleaf accounts may be found on this Overleaf How-To Guide .

Mendeley & BibTeX

Export to BibTeX:

  • Within your Library in Mendeley Reference Manager, select the references that you would like to export to BibTeX.
  • In the dropdown menu in the toolbar at the top of the screen, click File > Export All > BibTeX (*.bib)
  • Make sure you save your BibTeX file to the same location as your LaTeX file.

In Overleaf, you can link your entire library or a subset of your records to your Overleaf project. This link allows you to have synced records with Mendeley while actively accessing them in Overleaf. More information on linking your Mendeley and Overleaf accounts may be found on this Overleaf How-To Guide .

JabRef & BibTeX

If you primarily create documents in LaTeX (versus a word processing software like Microsoft Word) you may want to consider using JabRef as your primary citation management software.

JabRef is a reference manager that acts as an interface to the BibTeX style used by the LaTeX typesetting system. JabRef is open source and is freely downloadable. The graphical interface allows the user to easily import, edit, search, and group citations in the BibTeX format. It also offers automatic citation key generation. JabRef does not offer any citation styles of its own; instead the citation is generated from the BibTeX file by LaTeX. Specifications for each style are given by the chosen style file.

JabRef can be used on Windows, Linux, and Mac.

For more detailed instructions on setting up JabRef as your LaTeX citation management software, see the JabRef Getting Started guidance .

Get help with LaTeX and BibTeX

  • Zotero and BibTeX Quick Guide

LaTeX resources at MIT

LaTeX on Athena, Basics  (IS&T)

How do I create bibliographies in LaTeX?  (IS&T)

  • << Previous: Mendeley
  • Next: Other Citation Tools >>
  • Last Updated: Jan 16, 2024 10:17 AM
  • URL: https://libguides.mit.edu/cite-write

MSU Libraries

  • Need help? Ask a Librarian
  • Writing in LaTeX

Introduction to BibTeX

Creating a bibtex file, adding a bibtex library to your document, using the biblatex package to cite, changing citation styles.

  • Creating Accessible LaTeX Documents
  • Additional Help
  • LaTeX Templates

Using Citation Managers with LaTex

Although some people manage their citations in BibTex, a citation manager can still be extremely helpful for organizing and keeping track of your citations. Zotero, Mendeley, and EndNote all allow you to export citations to BibTex.

For help with choosing a citation manager see:

  • Comparing Citation Managers

For instructions on how to export to BibTex from a citation manager see:

  • University of British Columbia's LaTeX Guide This guide to LaTeX includes instructions on how to export BibTeX files from Zotero, Mendeley, and EndNote.

LaTex allows you to manage citations within your document through the use of a separate bibtex file ( filename.bib ). Bibtex files follow a standard syntax that allow you to easily reference the citations included in that file through the use of a bibliography management package. There are multiple bibliography management packages that you can use to manage citations. This guide will demonstrate how to use biblatex which allows for the most customization.

Example BibTeX file:

@article{grimberg,    author = {Grimberg, Bruna Irene and Hand, Brian},    title = {Cognitive Pathways: Analysis of students' written texts for science understanding},    journal = {International Journal of Science Education},    volume = {31},    number = {4},    pages = {503-521},    ISSN = {0950-0693},    DOI = {10.1080/09500690701704805},    url = {https://doi.org/10.1080/09500690701704805 https://www.tandfonline.com/doi/pdf/10.1080/09500690701704805?needAccess=true},    year = {2009},    type = {Journal Article} }

You can always create BibTeX files manually. However, many databases and citation managers allow you to export bibtex files that can then be uploaded into your LaTeX environment.

  • Digital Measure's guide to exporting BibTeX files

To add a bibtex file to your LaTex document, you can either create a new file in your Overleaf environment or upload a .bib file to the environment.

citation bibtex latex

To start using the biblatex package to cite, we first need to add the package and establish the BibTex file we are using in the preamble of the document.

\usepackage[backend=biber, style=numeric, citestyle=authoryear]{biblatex}

\addbibresource{references.bib}

To create in text citation within your document, we can use the cite command ( \cite{citationkey} ) and include the citation key in the argument. The citation key can be found by looking up the first word included in the relevant citation within the BibTex file. These can always be updated by editing the BibTex file.

You can cite authors in line by using the cite command \cite{grimberg}.

We can then simply print the bibliography at the end of the document.

\printbibliography

Biblatex supports most common citation styles. To change the citation style in your document you have to edit the citestyle command of the biblatex package in the preamble.

\usepackage[backend=biber, style=numeric, citestyle=apa ]{biblatex}

You can also update the way the bibliography is sorted by adding a sorting command of the biblatex package.

\usepackage[backend=biber, style=numeric, citestyle=authoryear, sorting=nty ]{biblatex}

For more information on editing biblatex citation styles, see:

  • Overleaf's Guide to Biblatex Citation Styles
  • << Previous: Writing in LaTeX
  • Next: Creating Accessible LaTeX Documents >>
  • Last Updated: Oct 14, 2022 7:57 PM
  • URL: https://libguides.lib.msu.edu/latex

Ask Yale Library

My Library Accounts

Find, Request, and Use

Help and Research Support

Visit and Study

Explore Collections

BibTeX, natbib, biblatex: Managing Citations in LaTeX: Citation Styles in LaTeX

  • LaTeX Bibliography Resources
  • Bibliography Packages
  • Citation Styles in LaTeX
  • Zotero and LaTeX
  • Troubleshooting
  • Workshop Notes

But what about importing from databases?

Some tools, like the Astrophysics Data System (ADS), Inspec, and Google Scholar, make exporting to BibTeX user-friendly. They escape special characters and generate citation keys for you. Other tools are a bit less straightforward. 

In general, the BibTeX export will be located in either an "export" or "cite" menu just above your search results. The cite menu is sometimes activated with an icon that looks like a quotation mark. It can be more effective to use a reference management tool like Zotero to manage your references, so we recommend taking a look at that tab for more information on semi-automated ways to manage your references.

Here are some additional pages with specialized information for you.

  • TeXMed - a BibTeX interface for PubMed TeXMed is just an interface to NCBI PubMed http://www.ncbi.nlm.nih.gov, that allows you to query PubMed and to store references in BibTeX format.
  • Documentation on Web of Knowledge/Web of Science for BibTeX Citations Quick summary: Once you've found a citation you want to save, just go to the bottom of the article information page and export using the options in the Output Record box.
  • Documentation on Exporting to BibTeX in ProQuest Quick summary: Click the Cite button in the light blue bar above your search results. A box will come up that will walk you through citing the resource(s). Select BibTeX as your citation style, then press the orange "Change" button. Copy the citation to your .bib file. NOTE THAT YOU WILL NEED TO PROVIDE THE IDENTIFIERS FOR EXPORTED CITATIONS.

Other Resources

  • Choosing a BibTeX Style Reed College has provided several modified versions of APA, MLA, and Chicago. Click on the name of the style you want to download under the Styles Recommended by Reed section. Place the style in the directory of your paper.
  • Online BibTeX Tidy This tool tidies bibtex files by fixing inconsistent whitespace and special characters, removing duplicates, removing unwanted fields, and sorting entries. It has a lot of options in the right-hand column to help you with messy BibTeX files.
  • Using EndNote with LaTeX [HTML web log] A quick, easy guide to using .bib files and EndNote at the same time.
  • Using Overleaf with RefWorks A quick guide from Overleaf on using RefWorks.

Finding a Citation Style

The LaTeX Bibliography Resources page includes information about LaTeX templates, many of which include a bibliography style and sample bib file to get you started. If you need to locate another style, though, here are some instructions. Please note that templates built for BibTeX + natbib will not always easily translate to ones built for biber/Biblatex if the template is complex.

The search.

We start by searching for filetype:bst and the name of whatever we're looking for. In the example search, I'm looking for the style for Geophysical Research . If you are using biber, you can look for a bbx style file with filetype:bbx .

You should see a variety of results that all have that filetype. Use online savviness to avoid clicking on results that might not be safe — we're dealing with code files, after all. Many people will put style files on GitHub or on their academic personal websites. Often, the creator will upload the style file as a text document that you can copy-paste into Overleaf or save into the directory you're working from on your computer.

Create a New File in Overleaf (or in the directory you're working in).

Please note that many of these styles are generated using command line utilities. Take note of what was used (in this case,  docstrip ) so that you can search for it if you need to debug. Some of the command line-generated style files will cause package conflicts. See the Troubleshooting tab on this guide for a common example.

The specific agu.bst file was generated with a utility called docstrip.

Once you have pasted in the contents, you're fine to add it to the document preamble.

We've pasted in the contents of the file we found online.

  • << Previous: Bibliography Packages
  • Next: Zotero and LaTeX >>
  • Last Updated: Jun 30, 2023 9:11 AM
  • URL: https://guides.library.yale.edu/bibtex

Yale Library logo

Site Navigation

P.O. BOX 208240 New Haven, CT 06250-8240 (203) 432-1775

Yale's Libraries

Bass Library

Beinecke Rare Book and Manuscript Library

Classics Library

Cushing/Whitney Medical Library

Divinity Library

East Asia Library

Gilmore Music Library

Haas Family Arts Library

Lewis Walpole Library

Lillian Goldman Law Library

Marx Science and Social Science Library

Sterling Memorial Library

Yale Center for British Art

SUBSCRIBE TO OUR NEWSLETTER

@YALELIBRARY

image of the ceiling of sterling memorial library

Yale Library Instagram

Accessibility       Diversity, Equity, and Inclusion      Giving       Privacy and Data Use      Contact Our Web Team    

© 2022 Yale University Library • All Rights Reserved

A complete guide to the BibTeX format

  • What is BibTeX?

BibTeX is reference management software for formatting reference lists and in-text citations in combination with the typesetting system LaTeX. The reference entries are stored in BibTeX’s own special format, which is usually denoted with the file extension *.bib. Managing your references with BibTeX comes in especially handy for large documents such as a PhD thesis or a research paper. For even greater ease in reference management consider using reference manager with BibTeX support.

  • BibTeX format explained

Due to its simple structure and the fact that a simple text editor is enough to generate and edit BibTeX files, BibTeX has become one of the standard formats to store and share bibliographic data.

Each BibTeX reference consist of three parts:

Part 1: the entry type

In its current version BibTeX features 14 entry types. A BibTeX entry start with the @ sign followed by the entry type name. Everything that belongs to the entry is enclosed in curly brackets.

Part 2: the citekey

The citekey is the name that is used to uniquely identify the BibTeX entry. It can be any combination of letters and digits and follows immediately after the opening bracket of the BibTeX entry.

Part 3: a list of key-value pairs storing the bibliographic data

Finally, the bibliographic data is stored by a list of predefined field types and their corresponding values.

Let's illustrate on an example. Here is a BibTeX entry for the famous "The Art of Computer Programming" by Donald E. Knuth.

BibTeX format explained

  • Entry types

BibTeX features 14 entry types that help your organize your references. Each entry type has its own set of required an optional fields to store the bibliographic data that is needed to format the references correctly.

Here is a complete listing of the BibTeX entry types including a short description:

  • article : any article published in a periodical like a journal article or magazine article
  • book : a book
  • booklet : like a book but without a designated publisher
  • conference : a conference paper
  • inbook : a section or chapter in a book
  • incollection : an article in a collection
  • inproceedings : a conference paper (same as the conference entry type)
  • manual : a technical manual
  • masterthesis : a Masters thesis
  • misc : used if nothing else fits
  • phdthesis : a PhD thesis
  • proceedings : the whole conference proceedings
  • techreport : a technical report, government report or white paper
  • unpublished : a work that has not yet been officially published

The citekey can be any combination of alphanumeric characters including the characters "-", "_", and ":". The most frequent pattern is to use the last name of the first author followed by the year. Let's illustrate the concept on the book "The Theoretical Minimum" by George Hrabovsky and Leonard Susskind originally published 2013.

It's also possible to list all authors or even the title in the citekey. The longer the citekey is the more likely it is unique by chance, but that comes at the price of more typing and the citekeys are more difficult to remember.

BibTeX comes with a list of standard fields that are supported by most citation styles. Each entry type has required fields and optional fields. Optional field store additional information that might not be present for each reference, but can still be included in the bibliography entry. Due to the flexible definition of the BibTeX format there are also many non-standard fields that are frequently used, but are only supported by selected BibTeX styles.

Standard field types

  • address : address of the publisher or the institution
  • annote : an annotation
  • author : list of authors of the work
  • booktitle : title of the book
  • chapter : number of a chapter in a book
  • edition : edition number of a book
  • editor : list of editors of a book
  • howpublished : a publication notice for unusual publications
  • institution : name of the institution that published and/or sponsored the report
  • journal : name of the journal or magazine the article was published in
  • month : the month during the work was published
  • note : notes about the reference
  • number : number of the report or the issue number for a journal article
  • organization : name of the institution that organized or sponsored the conference or that published the manual
  • pages : page numbers or a page range
  • publisher : name of the publisher
  • school : name of the university or degree awarding institution
  • series : name of the series or set of books
  • title : title of the work
  • type : type of the technical report or thesis
  • volume : volume number
  • year : year the work was published

Non-standard field types

These fields are frequently used, but are not supported by all BibTeX styles.

  • doi : DOI number (like 10.1038/d41586-018-07848-2)
  • issn : ISSN number (like 1476-4687)
  • isbn : ISBN number (like 9780201896831)
  • url : URL of a web page
  • More about BibTeX

If you need to dive deeper into BibTeX, we recommend to have a look at these sources:

  • Tame the BeaST: The B to X of BibTeX by Nicolas Markey [PDF]
  • Using bibtex: a short guide by Martin J. Osborne
  • BibTeXing by Oren Patashnik [PDF]
  • Plagiarism and grammar
  • Citation guides

BIBTEX Citation Generator

- powered by chegg.

Keep all of your citations in one safe place

Create an account to save all of your citations

Check your paper before your teacher does!

Avoid plagiarism — quickly check for missing citations and check for writing mistakes., is this source credible consider the criteria below..

Is the purpose to entertain, sell, persuade, or inform/teach ? Journal articles are often designed to inform or teach. Books and websites could have any of these or a combination of the purposes above. So it is important to determine why the source was created and if it is appropriate for your research. For websites in particular, looking at their "About Us" page or "Mission Statement" can help you evaluate purpose.

Accuracy is the reliability and truthfulness of the source. Here are a few indicators of an accurate source:

  • Citations or a works cited list. For websites, this can be links to other credible sites.
  • Evidence that backs up claims made by the author(s).
  • Text that is free of spelling and grammatical errors.
  • Information that matches that in other, credible sources.
  • Language that is unbiased and free of emotion.

Based on the above the source could be accurate, inaccurate, a mixture of accurate and inaccurate, or hard to tell.

Authority: Author

The author is the individual or organization who wrote the information in the book, in the journal article, or on the website. If no author is listed, there may be another contributor instead. For example, an editor or a translator. A credible author has:

  • Written several articles or books on the topic.
  • Provided contact information. For example, an email address, mailing address, social media account, etc.
  • The experience or qualifications to be an expert on the topic.

Authority: Publisher

The credibility of the publisher can contribute to the authority of a source. The publisher can be a person, company or organization. Authoritative publishers:

  • Accept responsibility for content.
  • Are often well-known.
  • Often publish multiple works on the same or related topics.

Relevance describes how related or important a source is to your topic. While a source may be credible, it does not necessarily mean it is relevant to your assignment. To determine relevance, you should:

  • Determine the website's intended audience. Look at the level of the information and the tone of the writing. For example, is it meant for academics or the general public?
  • Make sure that the information is related to your research topic.
  • Make sure that the information helps you answer your research question.

A publication date is an important part of evaluating the credibility of a source and its appropriateness for your topic. It is generally best to use content that was recently published or updated, but depending on your assignment, it may be appropriate to use older information. For example, a journal entry from Abraham Lincoln during the Civil War is too outdated to use in a discussion about modern politics and war, but would be appropriate for a paper about the Civil War. Consider the following when evaluating currency:

  • Was it published or updated recently? If a website, is there even a publication date listed?
  • Is the date of the source appropriate or inappropriate for my assignment?

After analyzing your source, do you believe it is credible, not credible, partially credible, or are you unsure? If you are still unsure, it may help to ask your instructor a librarian for assistance.

  • Citation Guides
  • Chicago Style
  • Terms of Use
  • Global Privacy Policy
  • Cookie Notice
  • DO NOT SELL MY INFO

SCI Journal

How to Reference in Latex – 7 Steps to Bibliography with BibTeX

Photo of author

This post may contain affiliate links that allow us to earn a commission at no expense to you. Learn more

reference in Latex

Want to learn how to Reference in Latex? Here are 7 Steps to Master Bibliography with BibTeX.

Adding references and citations to any document can be a time-consuming task. You may need to include a single reference multiple times and also ensure each one follows a consistent referencing style.

The good news is that LaTeX’s bibliography management tool BibTeX makes much of the work involved in reference management a breeze. This is because BibTeX bibliography entries are kept within a separate BibTeX database file that can be imported easily into your main document.

Some of the benefits of using BibTeX file for reference in LaTex include:

  • Having to type each reference only once
  • Achieving a consistent citation style throughout your document
  • Easily getting each item you cite to show up as a reference at the end of the document

In general, using bib file for referencing saves a lot of time. This makes it useful for researchers that need to cite or include a large number of references that are presented consistently in their document.

Table of Contents

How to Add a Reference in LaTeX Bibliography Management

Adding a reference in a LaTex bibliography file, or bib file can seem intimidating at first. However, managing a bib file is a relatively simple and straightforward process once you understand the steps involved. We have broken down the procedure into 7 simple steps for this guide.

Step 1 – Begin Document – Making a LaTeX document

Begin document: Create an empty LaTeX document with “.tex” extension in your preferred LaTeX editor. This could be TeXstudio, ShareLaTeX, or Texmaker.

Step 2 – Creating a new reference bib file with “.bib” extension

Create a new empty file and rename it to “citation.bib”. 

The “bib” extension informs the LaTeX compiler that the bib file contains all the references for your document. Each of these files will be formatted in a particular style discussed in later steps.

Step 3 – Locating the paper to be cited in Google Scholar

The next step is to obtain your citation. Look for the paper you wish to cite in  Google Scholar. Once you have located the paper on Google Scholar’s search results, look for a set of inverted commas next to a star symbol. 

citation bibtex latex

Step 4 – Obtaining the citation in BibTeX format for Reference in LaTex 

Select the inverted commas, and a window titled “cite” should appear. 

citation bibtex latex

This Cite window will list a number of different citation styles such as MLA and APA. At the bottom of this window, there should be a set of hyperlinks for BibTeX, EndNote, RefMan, and RefWorks. Select BibTeX and your citation should appear in the following format:

@article{yaggi2006sleep,

  title={Sleep duration as a risk factor for the development of type 2 diabetes},

  author={Yaggi, H Klar and Araujo, Andre B and McKinlay, John B},

  journal={Diabetes care},

  volume={29},

  number={3},

  pages={657–661},

  year={2006},

  publisher={Am Diabetes Assoc}

You can also add a second citation by following the same steps for a second paper in Google Scholar.

@article{weitzman1982chronobiology,

  title={Chronobiology of aging: temperature, sleep-wake rhythms and entrainment},

  author={Weitzman, Elliot D and Moline, Margaret L and Czeisler, Charles A and Zimmerman, Janet C},

  journal={Neurobiology of aging},

  volume={3},

  number={4},

  pages={299–309},

  year={1982},

  publisher={Elsevier}

For these citations, “ yaggi2006sleep” and “ weitzman1982chronobiology ” are referred to as the key of their respective papers. You can follow the above steps to add each reference you would like to cite in your document. Once this is complete, you can return to your main LaTeX file and cite your papers individually.

How to Call a Reference in LaTex Bibliography

Step 5 – calling a latex reference.

Calling a reference in the LaTex bibliography is also quite straightforward. In a new line, you can type:

The references for the paper in our example are \cite{yaggi2006sleep} and \cite{weitzman1982chronobiology}.

Remember that the document keys are vital for citing each paper, so ensure you enter them correctly.

[Need example of what this looks like]

Step 6 – Managing and Creating Your Preferred LaTex Bibliography Styles

In the next line, you can choose your preferred bibliography style. For this example, we will be using IEEE referencing style. This is a numbered referencing bibliography style that uses citation numbers provided in square brackets in your document.

Type the following:

\bibliographystyle{ieeetr}

\bibliography{citation} 

You can also add references in the following bibtex styles by simply including the style code in place of ieeetr :

With this bibliography style, references are shown in alphabetical order and are labeled numerically. Use plain in the above code to add citations in this style.

References appear in order of citation and are labeled numerically. Use unsrt in the above code to add citations in this style.

Same as plain, but the references are labeled by entry. Use alpha in the above code to add citations in this style.

Same as plain, but first names and journal names use abbreviations. Use abbrv in the above code to add citations in this style.

This style shows in-text citations as numbers enclosed in square brackets and separated with commas such as [1, 2]. Use acm in the above code to add citations in this style.

Step 7 – Compiling the Code for Reference in LaTex 

Next, compile and run your code. Your document will refresh a few times. You can then view the bibliography at the end of the LaTeX document. The references for our IEETR style example will show up as:

The references for this paper are [1] and [2] . 

[1] and [2] refer to the citations list at the end of the document.

For example:

citation bibtex latex

The above steps are summarized as:

  • Create an empty LaTeX document in the .tex extension.
  • Create a new reference file in the .bib extension.
  • Locate the paper, journal, or book to be cited in Google Scholar.
  • Obtain the citation in BibTeX format
  • Call the reference
  • Select your citation style in LaTex.
  • Compile the code in LaTex.

Additional Tips

As you can see, adding and calling references in LaTeX is a relatively straightforward process. Some tips to keep in mind when working with references in BibTeX and LaTeX include:

  • Running your .tex LaTeX file through LaTeX before running BibTeX as the latter program requires the auxiliary file produced by LaTeX.
  • Noting down the key for your paper, book, or journal properly as they will be vital for calling your reference in the bibliography.
  • Ensuring the code mentioned above is entered with the correct syntax to avoid any compilation errors in LaTex. 

Frequently Asked Questions

Q1: how do you reference equations in latex.

You can reference equations in LaTeX by inserting a label in your equation with an “eqn:” prefix. A typical LaTeX equation resembles the following: \begin{equation} \label{eqn:somelabel} e=mc^2 \end{equation}

Q2: What is Documentclass LaTeX?

The first line of code in a LaTeX document is referred to as the Documentclass declaration command. It resembles the following: \documentclass[options]{class} Documentclass informs LaTex about which layout standard to use. Some common document classes include: article : For articles from scientific journals and presentations. book : For books. letter : For writing letters

Q3: How do you add references in LaTeX without citations?

If you wish to list references without citing them in the text body, you can add a single input using: \nocite{keyname} You can then mark any key within the .bib file by using: \nocite{*} Add this command for each entry in the bib data file or \nocite{key} for a single one that isn’t cited in the text.

Q4: How do you reference labels in LaTeX?

You can reference labels in LaTeX by placing a \label{key} command behind a sectioning command, chapter, or image. You should then assign a unique key to it. Following this, you can use \ref{key} and \pageref{key} commands to reference them.

Q5: How do you change the reference style in LaTeX?

You can change the reference style in LaTeX by altering the \bibliographystyle{ filename} line in your LaTeX document. Filename here should be replaced with your preferred reference style such as plain and ieeetr .

Q6: How do you cite all references in LaTeX?

You can cite all your sources by typing \citeall .

Q7: Where can you get more help with LaTex?

You can get more help with LaTeX by visiting https://en.wikibooks.org/wiki/LaTeX .

Further Reading

LaTex Tutorial

  • 27 Pros and Cons of Using LaTex for Scientific Writing
  • 6 easy steps to create your first Latex document examples
  • How to add circuit diagrams in Latex
  • How to change Latex font and font size
  • How to create a Latex table of contents
  • How to create footnotes in LaTeX and how to refer to them, using the builtin commands
  • How to create Glossaries in LaTeX
  • How to create plots in Latex – codes and examples
  • How to create symbols in LaTeX – commands for Latex greek alphabet  
  • How to create tables in LaTeX – rows, columns, pages and landscape tables
  • How to drawing graphs in Latex – vector graphics with tikz
  • How to highlight source code in LaTeX
  • How to insert an image in LaTeX – Managing Latex figure and picture
  • How to Itemize and Number List – Adding Latex Bullet Points
  • How to make hyperlink in latex – Clickable links
  • How to use Latex Packages with examples
  • How to use LaTeX paragraphs and sections
  • LaTeX Installation Guide – Easy to follow steps to install LaTex
  • Learn to typeset and align Latex equations and math

Photo of author

3 thoughts on “How to Reference in Latex – 7 Steps to Bibliography with BibTeX”

Thanks for this invaluable support to LaTeX users.

I feel you should tell to use \bibliography{} command and refer to the .bib file here.

I want to cite in 4 referencing, for example: [1-4] But, I see: [1], [2], [3], [4]

how can I write: [1-4]

Leave a Comment Cancel reply

Save my name, email, and website in this browser for the next time I comment.

We maintain and update science journals and scientific metrics. Scientific metrics data are aggregated from publicly available sources. Please note that we do NOT publish research papers on this platform. We do NOT accept any manuscript.

citation bibtex latex

2012-2024 © scijournal.org

  • Grand Valley State University

citation bibtex latex

University Libraries

Search the Library for Articles, Books, and More Find It!

More research tools:

  • Subject Guides
  • Find Materials
  • LaTeX: Getting started
  • Managing Citations in LaTeX

LaTeX: Getting started: Managing Citations in LaTeX

  • Writing in LaTeX
  • Creating Accessible LaTeX Documents
  • Additional Help
  • LaTeX Templates

Using Citation Managers with LaTex

Although some people manage their citations in BibTeX, a citation manager can still be extremely helpful for organizing and keeping track of your citations. Zotero, Mendeley, and EndNote all allow you to export citations to BibTeX.

For for information about choosing and using a citation manager see:

  • Citing Sources: Manage Citations

For instructions on how to export to BibTeX from a citation manager see:

  • University of British Columbia's LaTeX Guide This guide to LaTeX includes instructions on how to export BibTeX files from Zotero, Mendeley, and EndNote.

Introduction to BibTeX

LaTeX allows you to manage citations within your document through the use of a separate BibTeX file ( [filename].bib ). BibTeX files follow a standard syntax that allows you to easily reference the citations included in that file through the use of a reference- or bibliography-management package. There are multiple bibliography-management packages that you can use to handle citations in LaTeX. This guide will demonstrate how to use BibLaTeX which allows for the most customization.

Example BibTeX file:

@article{grimberg,    author = {Grimberg, Bruna Irene and Hand, Brian},    title = {Cognitive Pathways: Analysis of students' written texts for science understanding},    journal = {International Journal of Science Education},    volume = {31},    number = {4},    pages = {503-521},    ISSN = {0950-0693},    DOI = {10.1080/09500690701704805},    url = {https://doi.org/10.1080/09500690701704805 https://www.tandfonline.com/doi/pdf/10.1080/09500690701704805?needAccess=true},    year = {2009},    type = {Journal Article} }

Creating a BibTeX file

You can always create BibTeX files manually. However, many databases and citation managers allow you to export BibTeX files that can then be uploaded into your LaTeX environment.

  • Watermark (formerly Digital Measures) guide to exporting BibTeX files

Adding a BibTeX Library to your Document

To add a BibTeX file to your LaTeX document, you can either create a new file in your Overleaf environment or upload a .bib file to the environment.

citation bibtex latex

Using the Biblatex package to Cite

To start using the BibLaTeX package to cite, we first need to add the package and establish the specific BibTeX file we are using in the preamble of the document.

\usepackage[backend=biber, style=numeric, citestyle=authoryear]{biblatex}

\addbibresource{references.bib}

To create in text citations within your document, we can use the cite command ( \cite{citationkey} ) and include the citation key in the argument. The citation key can be found by looking up the first word included in the relevant citation within the BibTeX file. These can always be updated by editing the BibTeX file.

You can cite authors in line by using the cite command \cite{grimberg}.

We can then simply print the bibliography at the end of the document.

\printbibliography

Changing Citation Styles

BibLaTeX supports most common citation styles. To change the citation style in your document you have to edit the citestyle command of the BibLaTeX package in the preamble.

\usepackage[backend=biber, style=numeric, citestyle=apa ]{biblatex}

You can also change the way the bibliography is sorted by adding a sorting command of the BibLaTeX package:

\usepackage[backend=biber, style=numeric, citestyle=authoryear, sorting=nty ]{biblatex}

For more information on editing biblatex citation styles, see:

  • Overleaf's Guide to Biblatex Citation Styles
  • << Previous: Writing in LaTeX
  • Next: Creating Accessible LaTeX Documents >>
  • Last Updated: Jan 22, 2024 12:29 PM
  • URL: https://libguides.gvsu.edu/LaTeX

Login to LibApps

Text Us! (616) 818-0219

Mary Idema Pew Library (616) 331-3500 [email protected]

Steelcase Library (616) 331-6799

Frey Foundation Learning Commons (616) 331-5933

Social Media

citation bibtex latex

Committed to Equality

ACRL Diversity Alliance Logo

Federal Depository Library Program

Federal Depository Library Program Logo

  • GVSU is an AA/EO Institution
  • Privacy Policy
  • Disclosures
  • Copyright © 2018 GVSU

RefME Logo

Bibtex Citation Generator

Powered by chegg.

  • Select style:
  • Archive material
  • Chapter of an edited book
  • Conference proceedings
  • Dictionary entry
  • Dissertation
  • DVD, video, or film
  • E-book or PDF
  • Edited book
  • Encyclopedia article
  • Government publication
  • Music or recording
  • Online image or video
  • Presentation
  • Press release
  • Religious text

Popular BibTeX generic citation style style Citation Examples

How to cite a book in bibtex generic citation style style.

Use the following template to cite a book using the BibTeX generic citation style citation style.

Reference List

Place this part in your bibliography or reference list at the end of your assignment.

In-text citation

Place this part right after the quote or reference to the source in your assignment.

How to cite a Journal in BibTeX generic citation style style

Use the following template to cite a journal using the BibTeX generic citation style citation style.

How to cite Film or Movie in BibTeX generic citation style style

Use the following template to cite a film or movie using the BibTeX generic citation style citation style.

How to cite an Online image or video in BibTeX generic citation style style

Use the following template to cite an online image or video using the BibTeX generic citation style citation style.

How to cite a Website in BibTeX generic citation style style

Use the following template to cite a website using the BibTeX generic citation style citation style.

Additional BibTeX generic citation style style Citation Examples

How to cite a blog in bibtex generic citation style style.

Use the following template to cite a blog using the BibTeX generic citation style citation style.

How to cite a Court case in BibTeX generic citation style style

Use the following template to cite a court case using the BibTeX generic citation style citation style.

How to cite a Dictionary entry in BibTeX generic citation style style

Use the following template to cite a dictionary entry using the BibTeX generic citation style citation style.

How to cite an E-book or PDF in BibTeX generic citation style style

Use the following template to cite an e-book or pdf using the BibTeX generic citation style citation style.

How to cite an Edited book in BibTeX generic citation style style

Use the following template to cite an edited book using the BibTeX generic citation style citation style.

How to cite an Email in BibTeX generic citation style style

Use the following template to cite an email using the BibTeX generic citation style citation style.

How to cite an Encyclopedia article in BibTeX generic citation style style

Use the following template to cite an encyclopedia article using the BibTeX generic citation style citation style.

How to cite an Interview in BibTeX generic citation style style

Use the following template to cite an interview using the BibTeX generic citation style citation style.

How to cite a Magazine in BibTeX generic citation style style

Use the following template to cite a magazine using the BibTeX generic citation style citation style.

How to cite a Newspaper in BibTeX generic citation style style

Use the following template to cite a newspaper using the BibTeX generic citation style citation style.

How to cite a Podcast in BibTeX generic citation style style

Use the following template to cite a podcast using the BibTeX generic citation style citation style.

How to cite a Song in BibTeX generic citation style style

Use the following template to cite a song using the BibTeX generic citation style citation style.

How to cite The Bible in BibTeX generic citation style style

Use the following template to cite The Bible using the BibTeX generic citation style citation style.

How to cite a TV Show in BibTeX generic citation style style

Use the following template to cite a TV Show using the BibTeX generic citation style citation style.

  • Plagiarism and grammar
  • Citation guides

Cite a Website in BIBTEX

Don't let plagiarism errors spoil your paper, consider your source's credibility. ask these questions:, contributor/author.

  • Has the author written several articles on the topic, and do they have the credentials to be an expert in their field?
  • Can you contact them? Do they have social media profiles?
  • Have other credible individuals referenced this source or author?
  • Book: What have reviews said about it?
  • What do you know about the publisher/sponsor? Are they well-respected?
  • Do they take responsibility for the content? Are they selective about what they publish?
  • Take a look at their other content. Do these other articles generally appear credible?
  • Does the author or the organization have a bias? Does bias make sense in relation to your argument?
  • Is the purpose of the content to inform, entertain, or to spread an agenda? Is there commercial intent?
  • Are there ads?
  • When was the source published or updated? Is there a date shown?
  • Does the publication date make sense in relation to the information presented to your argument?
  • Does the source even have a date?
  • Was it reproduced? If so, from where?
  • If it was reproduced, was it done so with permission? Copyright/disclaimer included?
  • Citation Machine® Plus
  • Citation Guides
  • Chicago Style
  • Harvard Referencing
  • Terms of Use
  • Global Privacy Policy
  • Cookie Notice
  • DO NOT SELL MY INFO

Help | Advanced Search

Computer Science > Computation and Language

Title: 2d matryoshka sentence embeddings.

Abstract: Common approaches rely on fixed-length embedding vectors from language models as sentence embeddings for downstream tasks such as semantic textual similarity (STS). Such methods are limited in their flexibility due to unknown computational constraints and budgets across various applications. Matryoshka Representation Learning (MRL) (Kusupati et al., 2022) encodes information at finer granularities, i.e., with lower embedding dimensions, to adaptively accommodate ad hoc tasks. Similar accuracy can be achieved with a smaller embedding size, leading to speedups in downstream tasks. Despite its improved efficiency, MRL still requires traversing all Transformer layers before obtaining the embedding, which remains the dominant factor in time and memory consumption. This prompts consideration of whether the fixed number of Transformer layers affects representation quality and whether using intermediate layers for sentence representation is feasible. In this paper, we introduce a novel sentence embedding model called Two-dimensional Matryoshka Sentence Embedding (2DMSE). It supports elastic settings for both embedding sizes and Transformer layers, offering greater flexibility and efficiency than MRL. We conduct extensive experiments on STS tasks and downstream applications. The experimental results demonstrate the effectiveness of our proposed model in dynamically supporting different embedding sizes and Transformer layers, allowing it to be highly adaptable to various scenarios.

Submission history

Access paper:.

  • Download PDF
  • HTML (experimental)
  • Other Formats

References & Citations

  • Google Scholar
  • Semantic Scholar

BibTeX formatted citation

BibSonomy logo

Bibliographic and Citation Tools

Code, data and media associated with this article, recommenders and search tools.

  • Institution

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs .

IMAGES

  1. Biblatex citation styles

    citation bibtex latex

  2. Bibliography management with bibtex

    citation bibtex latex

  3. Citations with LaTeX and BibTeX

    citation bibtex latex

  4. How to Use Reference, Citation and BibTex in LaTex, Overleaf, ShareLatex

    citation bibtex latex

  5. Natbib Tutorial: Mastering Reference Management in LaTeX with BibTeX

    citation bibtex latex

  6. Bibliography in LaTeX with Bibtex/Biblatex

    citation bibtex latex

VIDEO

  1. How to add citation in latex?

  2. How to Download Your BibTeX (.bib) File from Your CiteDrive Project

  3. Google Scholar para la citación BibTeX

  4. How to add latex citation correctly

  5. Tutorial on using BibTeX with LaTeX to add references to a document @IITMadrasOfficial

  6. Add tags to your BibTeX entries

COMMENTS

  1. Bibliography management with bibtex

    1 Advisory note 2 Introduction 3 Bibliography: just a list of \bibitems 3.1 A note on compilation times 4 Enter \ (\mathrm {Bib\TeX}\) 4.1 Some notes on using \ (\mathrm {Bib\TeX}\) and .bib files 5 Taking another look at .bib files 5.1 Multiple authors in \ (\mathrm {Bib\TeX}\) 5.2 Multiple-word last names

  2. Bibliography in LaTeX with Bibtex/Biblatex

    BibTeX Styles New Post! Export Bibliographic Database (BibTeX) Entries from Online Databases We have looked at many features of LaTeX so far and learned that many things are automated by LaTeX. There are functions to add a table of contents, lists of tables and figures and also several packages that allow us to generate a bibliography.

  3. PDF Citing and referencing in LaTeX using BibTeX

    To specify the output style of citations and references - insert the \bibliographystyle command e.g. \bibliographystyle{unsrt} where unsrt.bst is an available style file (a basic numeric style). Basic LaTeX comes with a few .bst style files; others can be downloaded from the web

  4. Citation Management and Writing Tools: LaTeX and BibTeX

    Contents LaTeX & BibTeX & Overleaf Zotero & BibTeX Mendeley & BibTeX JabRef & BibTeX LaTeX & BibTeX (& Overleaf) What is LaTeX? LaTeX is a typesetting program that takes a plain text file with various commands in it and converts it to a formatted document based on the commands that it has been given.

  5. Managing Citations in LaTeX

    LaTex allows you to manage citations within your document through the use of a separate bibtex file ( filename.bib ). Bibtex files follow a standard syntax that allow you to easily reference the citations included in that file through the use of a bibliography management package.

  6. Citation Styles in LaTeX

    Select BibTeX as your citation style, then press the orange "Change" button. Copy the citation to your .bib file. NOTE THAT YOU WILL NEED TO PROVIDE THE IDENTIFIERS FOR EXPORTED CITATIONS. Other Resources Choosing a BibTeX Style Reed College has provided several modified versions of APA, MLA, and Chicago.

  7. BibTeX format explained [with examples]

    BibTeX is reference management software for formatting reference lists and in-text citations in combination with the typesetting system LaTeX. The reference entries are stored in BibTeX's own special format, which is usually denoted with the file extension *.bib. Managing your references with BibTeX comes in especially handy for large ...

  8. BibMe: Free BIBTEX Bibliography & Citation Maker

    BibMe: Free BIBTEX Bibliography & Citation Maker BIBTEX Citation Generator - powered by Chegg Choose your source: Website Book Journal More

  9. bibtex

    1 Answer Sorted by: 67 At a bare minimum, your LaTeX source file needs to contain these elements for \citeauthor to work: ---- doc.tex ---- \documentclass{article} \usepackage[numbers]{natbib}

  10. How to Reference in Latex

    Create a new empty file and rename it to "citation.bib". The "bib" extension informs the LaTeX compiler that the bib file contains all the references for your document. Each of these files will be formatted in a particular style discussed in later steps. Step 3 - Locating the paper to be cited in Google Scholar

  11. Managing Citations in LaTeX

    LaTeX allows you to manage citations within your document through the use of a separate BibTeX file ([filename].bib).BibTeX files follow a standard syntax that allows you to easily reference the citations included in that file through the use of a reference- or bibliography-management package.

  12. latex

    Use the biblatex package (link). It's the most complete and flexible bibliography tool in the LaTeX world. Using biblatex, you'd write something like. \documentclass[12pt]{article} \usepackage[sorting=none]{biblatex} \bibliography{journals,phd-references} % Where journals.bib and phd-references.bib are BibTeX databases.

  13. Citation Machine®: BIBTEX Format & BIBTEX Citation Generator

    Get research tips and citation information or just enjoy some fun posts from our student blog. Home >. BIBTEX Citation Generator. Citation Machine® helps students and professionals properly credit the information that they use. Cite sources in APA, MLA, Chicago, Turabian, and Harvard for free.

  14. Bibtex Citation Generator

    How to cite a Book in BibTeX generic citation style style Use the following template to cite a book using the BibTeX generic citation style citation style. Reference List Place this part in your bibliography or reference list at the end of your assignment. Template:

  15. Citing a Website in BIBTEX

    BIBTEX Citation Generator >. Cite a Website. Citation Machine® helps students and professionals properly credit the information that they use. Cite sources in APA, MLA, Chicago, Turabian, and Harvard for free.

  16. Benchmarking Retrieval-Augmented Generation for Medicine

    While large language models (LLMs) have achieved state-of-the-art performance on a wide range of medical question answering (QA) tasks, they still face challenges with hallucinations and outdated knowledge. Retrieval-augmented generation (RAG) is a promising solution and has been widely adopted. However, a RAG system can involve multiple flexible components, and there is a lack of best ...

  17. [2402.14246] Reconstruction-Based Anomaly Localization via Knowledge

    Anomaly localization, which involves localizing anomalous regions within images, is a significant industrial task. Reconstruction-based methods are widely adopted for anomaly localization because of their low complexity and high interpretability. Most existing reconstruction-based methods only use normal samples to construct model. If anomalous samples are appropriately utilized in the process ...

  18. [2402.11303] FViT: A Focal Vision Transformer with Gabor Filter

    Vision transformers have achieved encouraging progress in various computer vision tasks. A common belief is that this is attributed to the competence of self-attention in modeling the global dependencies among feature tokens. Unfortunately, self-attention still faces some challenges in dense prediction tasks, such as the high computational complexity and absence of desirable inductive bias. To ...

  19. Customize-A-Video: One-Shot Motion Customization of Text-to-Video

    Image customization has been extensively studied in text-to-image (T2I) diffusion models, leading to impressive outcomes and applications. With the emergence of text-to-video (T2V) diffusion models, its temporal counterpart, motion customization, has not yet been well investigated. To address the challenge of one-shot motion customization, we propose Customize-A-Video that models the motion ...

  20. [2402.14776] 2D Matryoshka Sentence Embeddings

    Common approaches rely on fixed-length embedding vectors from language models as sentence embeddings for downstream tasks such as semantic textual similarity (STS). Such methods are limited in their flexibility due to unknown computational constraints and budgets across various applications. Matryoshka Representation Learning (MRL) (Kusupati et al., 2022) encodes information at finer ...