# Bibliography Style Latex Last Name First With Credentials

The purpose of the parenthetical citation is to lead the reader to an exact item in the bibliography, so the first entry in the bibliography (usually author’s last name, sometimes title if no author is listed) is what is included in the parenthetical citation. Additionally, the exact point (page number) is listed.

Plagiarism is using the words, thoughts, or ideas of someone else without giving credit. Plagiarism can take many forms, and it can be intentional or accidental.

"Along with using someone’s direct words without quotation marks and attribution, plagiarism includes using someone’s thoughts or ideas and representing them as one’s own. For example, if you were to change the wording of a passage, but not credit the source, you are plagiarizing as much as if you used the original words. This presents something of a conundrum: students are required to use the research and writing of others, but such use is limited. In most research assignments, students are encouraged – or even required – to use the research of others, but proper credit must be given.

To ensure that you will give credit appropriately, begin by keeping your research materials organized. There are many note-taking systems available to assist you, but it is essential that you keep track of which ideas came from which sources. After finding good information from a reputable source, you must then integrate that information into your paper. There are several methods of doing this: quotation, paraphrase, and summary." (Talman)

By Lian Tze Lim

## Introduction

Many tutorials have been written about what $$\mathrm{Bib\TeX}$$ is and how to use it. However, based on my 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 first article, one of a planned series to address references, 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 () files work and look at some ways to prepare files. This is, of course, running the risk of repeating some of the material contained in many online tutorials, but future blog posts will expand our coverage to include bibliography styles and —the alternative package and bibliography processor.

## Bibliography: just a list of

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 list of :

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

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

Figure 1: Citing entries from a list.

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

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

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

We’ll have to make it instead, so that the longest label is wide enough to accommodate the longer labels, like this:

Figure 3: 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 (or another $$\mathrm{\LaTeX}$$ processor), the reference list appears in the PDF as expected, but the commands just show up as question marks [?].

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

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

### 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., ) and associated programs such as $$\mathrm{Bib\TeX}$$, , 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 list:

• It’s up to you to accurately format each 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 s yourself.
• For different manuscripts or documents that use different reference styles you’ll need to rewrite the for each reference.

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

Instead of formatting cited reference entries in a list, we maintain a bibliography database file (let’s name it for our example) which contains format-independent information about our references. So our 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 files in a later section.

Now we can use with the cite keys as before, but now we replace with a to choose the reference style, as well as to point $$\mathrm{Bib\TeX}$$ at the 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 (and that we are using ):

and we get the following output:

Figure 4: $$\mathrm{Bib\TeX}$$ output using the bibliography style.

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

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

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

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

4. is run again, and this time the commands are replaced with the corresponding numerical labels in the output PDF!

As before, the build tool takes care of triggering and re-running and as necessary, so you don’t have to worry about this bit. You can inspect the generated file on Overleaf, if you click on the downward-pointing triangle next to the “Download as ZIP” button, and choose the “For submission (with .bbl)” option. This is also useful for some journal submission sites where their internal $$\mathrm{\LaTeX}$$ compilation systems do not run separately.

On some other journals, if you are asked to “copy the contents of the file into your manuscript”, you can also use this download option to access the file. You can then copy-and-paste the contents to replace the original lines in your manuscript.

A few further things to note about using $$\mathrm{Bib\TeX}$$ and :

• You may have noticed that although 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 file’s role is to store bibliographic records, and only entries that have been cited (via ) in the 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 . This also means you can reuse the same 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 and one 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 (note the typo: “e”) instead of , or wrote when the actual file name is , 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 as in your file.
• The order of references in the 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. For example, some readers might have noticed that, within my earlier example, the first citation in the text is numbered [2], while the second citation in the text () is numbered [1]! Have $$\mathrm{\LaTeX}$$ and $$\mathrm{Bib\TeX}$$ lost the plot? Not at all: this is actually because the 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 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:

Figure 5: bibliography style output.

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

## Taking another look at files

As you may have noticed earlier, a 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 , and 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:

• for journal articles (see example above).
• for conference proceeding articles:
• for books (see examples above).
• , for dissertations and theses:
• 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:
• is for a contributed chapter in a book, so would have its own and . The actual title of the entire book is given in the field; it is likely that an field will also be present:
• is for whatever doesn’t quite fit any other entry type. It can be especially useful for web pages—by writing or :
• you will often find it useful to add or in your files’ preamble (for more robust handling of URLs);
• not all bibliography styles support the field: doesn’t, but does. All styles support . More on this in a future post;
• you should be mindful that even web pages and entries should have an , a and a field:

### Multiple authors in $$\mathrm{Bib\TeX}$$

In a 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 . So these are correct:

or

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 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 .

is actually not a comment character in files! So, inserting a in 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 field around but prefer that it’s ignored (perhaps because you want $$\mathrm{Bib\TeX}$$ to use the field instead) write or the more human-readable .

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 files?

### Edit the file as plain text

Because 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 extension, and that your editor doesn’t surreptitiously add a 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 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 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 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 file on your own machine using JabRef, BibDesk or another utility, and then upload it to your Overleaf project using “Files > Bibliography > Upload .bib file”.

Pro tip: If you’d like to use the same 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 “Files > Bibliography” menu item in your Overleaf editor you may notice some options: Import your Mendeley, Zotero and CiteULike libraries! 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 file (generated from your library) into your Overleaf project.

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 ” option in the application or service. Once you have a file, you can then add it to your Overleaf project using the steps explained earlier and in the linked help articles.

### 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 or an entry (or another entry type) in a 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}$$ 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 future articles

We’ve now had a quick look at how $$\mathrm{Bib\TeX}$$ processes a bibliography database file to resolve commands and produce a formatted reference list, as well as how to prepare files. In an forthcoming post we’ll look further into some popular options, as well as some citation niceties provided by the package.

Until then, happy $$\mathrm{Bib\TeX}$$ing!

More news from Overleaf

Lian Tze Lim

Community TeXpert

Computer scientist, once-lecturer, trainer. Enjoys tinkering with LaTeX in the name of productive procrastination (ahem). Personal motto: "all research students are insane at one time or another".