LaTeX: A Typesetting Guide

As an aspiring scientist, I look to encourage as many people as possible to read what knowledge I can share. Technology has made that incredibly easy, as proven in history by the boon caused by the printing press. A huge proponent of sharing information is the accessibility to a wider audience, and part of that leads to a discussion on aesthetics and formatting. Even now, I’m aware of the way that each indent in this article will help make it easier for you, the reader.  In science, there is so much data and foundations to cover to be able to support all of these knowledgable ideas and to get to that quicker, the LaTeX Project has made it easier to streamline all of this together so that scientists can do what they do best – share their knowledge. Now, I hope at this point you’re aware that the LaTeX project has nothing to do with gloves commonly adorned by doctors, or the red suit that Velma (our new lesbian icon) wore in the Scooby-Doo live-action movie. If not, let me explain. From the site itself, “LaTeX… is a document preparation system for high-quality typesetting… often used for… technical or scientific documents,” (The LaTeX Project.org). During a semester where all but one of my professors strongly encourages submitting all work in LaTeX, and previous reports submitted under the guidelines of the American Physical Society, I felt it part of my duty to share some wisdom on the subject of writing in LaTeX.

To start, I use the online tool Overleaf to work in LaTeX, but there are other options such as TeX maker to start your LaTeX journey. My personal preference is Overleaf, but TeX maker may be helpful if you often find yourself without internet connection and still needing to edit your .tex files. 

When creating a new project, I try to keep in mind what my purpose for the document is, and if I need a specific template (either offered through Overleaf or some I have made on my own). Often, I just make a copy of the template I have made for homeworks and continue editing it to the specifications of the class I am using it for. Othertimes, I’ve used some of the resume templates to try my hand at that. Of course, each project is different, so its good to experiment on your own with different possibilities!

In all projects, there exists the title and metadata, where I can note that I am the author, list co-authors, the date, and more, all contained within the preamble section. The preamble section is where the outline of the formatting is, and a bank for all the tools you may need as you go. One of the most useful parts of the preamble is the selection of packages you include, as it widens your ability in what you’re able to accomplish in the document. For example, if you would like to show images, there’s a package called graphicx to help neatly organize the image onto the document and minimize the struggle of neatly fixing it in place. As a physics major, the packages I might use most often are: amsmath, amsfonts, amssymb, graphicx, physics, sinunitx, mathtools, verbatim, and more. You may find some other helpful packages for your own use! Moreover, the preamble is where it is stated what class the document falls under – such as article, report, book, and so many more options with even more available modifications.

Then, the document begins. Literally. The first environment, typically indicated with the “\begin{ }” (and “\end{ }”) command,  is introduced immediately after the preamble, as the document is its own environment. Whatever is typed outside of the environment will not directly be reflected onto the pdf version (unless it is formatting stated in the preamble). If I were to re-create this article in LaTeX, the first thing I would do in the document environment would be to use the command “\maketitle” so that it could take the title from the preamble and format it neatly. I could also make a section called the Introduction to let you know what the paper was all about! Sections are helpful to organize the document to make it easier on the reader, and can especially be helpful for lab reports. To create sections, you’d use the “\section{}” command, where you’d put your section title in the argument of the command. For example, let’s make an Introduction:

And without touching any fonts, bold, or anything like that, we have the start of a LaTeX article!!!

Before continuing on, allow me to clear up some basic syntax of LaTeX. As we’ve seen with the “\section{}” command, we have arguments (args) that are usually represented with curly braces: {}, and in some cases extra parameters are in straight braces: []. One common example is “\usepackage[utf8]{inputenc}”, where this (as far as I know) is a basic formatting setting. With the section command, we inputted “Introduction” to the argument so that we could name the section. Additionally, like most programming languages, there is a way to put comments in the coding portion of LaTeX that doesn’t show up in the pdf version. This is very helpful to explain new commands you’ve created or directions for a template. The comment is indicated with “%”. Anything typed after this on a line will not show up until you go onto a new line. If you would like to manually create a vertical spacing delimiter (in other words, a new line), you can use “\\”. This is not indented for the next paragraphs you may start. For horizontal spacing delimiters (simlar to the tab key) you can use “&”, which you will most commonly see in creating tables. These are the most likely syntax related things you will come across (other than the escape key)!

As helpful and streamlined as this all is, many people may still prefer to use Word or Google Docs over this. So why use LaTeX? Two words. Math mode. It’s important to note that math mode has its own syntax, but it isn’t too much more! In STEM, math mode is extremely helpful because it allows you to easily format and include equations and other mathematical work.

Some common environments in math mode include equation, gather, and align. Gather and align can help a lot more when there are multiple relevant pieces of mathematical information at once so they can be formatted well. The equation environment is helpful for textbook-style math where you can choose to number each one or not!

Something else in math mode that is common, be it for a homework problem or simple discussion of the math, is using in-line math. This is where you don’t isolate the equation from the paragraphs, but simply keep it in-line with the words so that it’s all one neat paragraph. Let’s try it!

This example shows the syntax for in-line math mode and newline math mode. For in-line math, the math is wrapped around single dollar signs on either side, such as how we had $ f(x) = x^2 $. The newline math, which is good for exemplifying results, work, or important equations that will be referenced later (something the equation environment makes easy), is wrapped around double dollar signs. In this example, we had $$ f(x) = \sqrt(x) $$.

I hinted that the equation environment is numbered (like you’d expect to see in a textbook), but you can opt-out of this! Let’s see what this is like in LaTeX.

In this example, I showed us running into an issue where we needed a package. It’s not always easy to tell what the solution is to an issue, but here, google is your friend and luckily it isn’t too hard to find! I encourage you in your own example of trying out LaTeX to include the package and see what it looks like fixed!

For some common math symbols or uses, like exponents or square roots, it may be easy to just let it become muscle memory to do it, but for more complicated commands like for summations or limits, you can create a table for yourself to reference. (Hint: There’s luckily also another option I shall share if you wait a couple more paragraphs!)

Another thing you may want to include in your LaTeX abilities is including images, just as I have done in this article! It’s unfortunately not as intuitive as math mode, but Overleaf does a lot of the work for you still! Images are considered figures and are formatted through the figure environment. My general suggestion is in the file outline to create a folder for your images and upload them into there! To use the figure environment, you should insert a new package called graphicx into the preamble. By converting it to the figure environment, you’re given more control over where it is and the dimensions of your image, as well as some ability to caption and reference it. If you’re uninterested in the extra help, you can simply use “\includegraphics{yourImage}”.

To use the figure environment, you can simply type \begin{figure} and press tab, then Overleaf should finish the basics of it for you. This should look like:

Now, I will show you what it could look like with some editing in LaTeX!

As you can see, I included some specific edits to control how I wanted the image to look. I controlled the width, what reference I used to make it easy for myself, and where it was in the article. If you want an image on a page of its own, you can use [p!] instead of [h!] next to the begin figure environment command. Additionally, there are ways to have grids or side-by-side pictures, so its something to play around with more!

Last instructions: Data Tables. Science is very reliant on data, so it makes sense that a lot of people interested in STEM might want to know how to include data tables in LaTeX. Expectedly, data tables have their own environment. The basics look like this:

There are some recogizable things, like the centering command and the caption and label. These work just the same as the figure environment. The tabular environment within is noticably different. The columns of the table are controlled by the {c | c} arguments. If you would like more or less columns, you can alter the amount of c’s (but be sure to include the ‘|’ delimiters). The table is actually all written in the blank area with the ampersands and new line delimiters, which you may have recognized in my previous notes on syntax. Here, you may have something like:

Column 1 Title & Column 2 Title \\

data row 1 col 1 & data row 1 col 2 \\

data row 2 cold 1 & data row 2 col 2

to showcase your data. I would experiment with this on your own! For example, you can look at the Pokedex and list some Pokemon and their types/health/attack and more to try it out! It gets a little tiring, but eventually I’ll share some nice resources to make this easier as well!

Now, with some nice writing and composition skills, plus the ability to insert some familiar math into LaTeX, I would like to introduce some resources that will change the life of anyone who has not already figured this out. These few resources will absolutely help anyone using LaTeX to “work smarter, not harder”.

For example, there are plenty of different symbols and functions that I might need for a paper, and it’s not always as intuitive as writing out the name of the greek symbol after the escape key (but luckily sometimes it is). This is where Detexify comes into play! There are other similar resources for equations, but I have enjoyed this one the most. Detexify allows me to draw the symbol I would like to include in my document, and not only will it show me the command for the symbol, but it will also tell me what package it belongs to and what mode it is used in. For example, if I want to indicate “there exists a real number x” symbolically, I could spend some time googling each specific thing and then write it down and hopefully remember in the future. However, through Detexify I can draw the symbols I need and find out that the symbol for a real number uses the command “\mathds{R}” in math mode through the package dsfont. I find this quicker and more helpful than just knowing the relevant command to use, and a little better than referencing a table every time! You can find this website at https://detexify.kirelabs.org/classify.html.

Additionally, data can become very length-y very quickly and make creating data tables excrutiating. Even some small tables can take a while to set up through LaTeX without a quick way to do it. However, there’s actually a convenient website where you can set up a table for any data you would like to show in a quick and easy manner (as you might in MS Word or another similar processor), then it produces the LaTeX code that corresponds with what you’ve entered. I only wish that I had found this when I was actually taking my Advanced Lab I course and didn’t spend an hour just filling in data I had written on paper into the document. You can find this website at https://www.tablesgenerator.com/.

Also, there is indeed a LaTeX wiki for any other things you may want to look at (including a section that goes in more detail on images).

The irony is not lost on me that this article sharing my LaTeX knowledge is not written in LaTeX. However, when I first learned to use it, I wrote everything out in my own personal article where I experimented with all of these things and more. It was also extremely useful for me to look back on in case there was anything I knew I had done before and just needed a quick reference on how I did it and what the result looked like. I strongly encourage everyone to practice in their own article and learn something new! Maybe, after reading this article, you’ll find you also want to share some fun tidbits of information in the neatest and best way possible: LaTeX!

Your journey starts here! Let’s talk!

ThemeRex © 2026. All rights reserved.
  Timothy Durham was convicted of rape when a test showed his DNA genotype matched the DNA recovered from the crime scene. Eye witnesses testified that Durham was in a different state at the time of the incident, but he wasn’t exonerated from his 3000 year sentence until follow up DNA analysis showed that the preliminary forensic analysis used in the trial was misinterpreted (Thomas et al.). DNA testing serves an invaluable part in our criminal justice system, but it comes with complications and bias that can lead to wrongful convictions and misinformed juries.  

Background:

Forensic genetics aims to identify the origin of a biological sample. It can be traced back to Karl Landsteiner who discovered human ABO blood groups. With blood groups, suspects could be eliminated based on their blood type. For example, if a suspect had type A blood and there was type B blood left at the scene by the perpetrator, the investigators could rule out the suspect. Unfortunately, the reverse didn’t work. If the suspect and perpetrator both had the same blood type, it can’t be concluded that the suspect was guilty. Blood identifiers evolved into 8 distinct categories which improved the ability to eliminate suspects, but could only conclude that (if the system matched) it might be the perpetrator or this person might be related to the perpetrator (Jobling and Gill). The field evolved in the 1980s with the discovery of Minisatellites, lines of repetitive DNA that don’t encode proteins. Minisatellite patterns in DNA create what we know today as the DNA fingerprint, and it has a much higher accuracy rate than previous methods (Augustyn et al.). Around the same time, a breakthrough for victims of sexual assault was discovered. In the case of assault, bodily fluids of both the victim and the assaulter can get mixed. A process called differential lysis was created which could selectively increase the concentration of sperm in a fluid sample thereby allowing for accurate DNA testing (Jobling and Gill). Forensics evolved to use single-locus probe testing after several years because of its ease of interpretation. It looked at specific minisatellites that had high variability between subjects. This was the first DNA-based method to be used in a criminal investigation. Two murder homicides from several years apart were connected using DNA evidence. The evidence was then used to exonerate an innocent man, and the guilty party was found when he tried to evade mandatory DNA testing for all men in the small town. His guilt was then reinforced when the DNA profiles matched, and he gave a confession (Jobling and Gill). Finding DNA at a crime scene doesn’t guarantee that you’ll find a murderer. There are issues with non-pure samples and limited samples that make DNA work difficult, and accreditation of facilities and new techniques and take time (Jobling and Gill).  

Subjectivity of DNA Interpretation:

In a 2009 publication, the National Academy of Science discusses the possibility for subjective influence in lab based forensics. The interpretation bias happens in complex cases where, for example, there could be a mixture of DNA. A study published in 2011 looked specifically at this issue. A gang rape happened in Georgia, and the mixture in DNA from the case was used to prosecute one suspect after another suspect took a plea bargain to testify against him. With DNA mixtures, there are three possible conclusions: suspect excluded, suspect cannot be excluded, and inconclusive. If the suspect is excluded, it means that there’s little to no possibility that his DNA is part of the sample. If the suspect cannot be excluded, it means that there’s a possibility that his DNA is part of the sample. In the trial, the DNA examiners who knew the context of the case concluded that the suspect being prosecuted could not be excluded. The 2011 study gave the DNA evidence from this case and the DNA profiles of the suspects to 17 forensic examiners. These examiners had no context of the case, and they all worked independently. Of the 17, only 1 came to the same conclusion (suspect cannot be excluded) as the examiners who knew the context of the case. Twelve of the 17 concluded that the suspect who was prosecuted and convicted had no relation to the DNA found in the sample. Not only does this show that subjectivity occurs due to the context of the case, but the 17 examiners came up with different findings based on their past experiences meaning that not all DNA analysis is objective. Some organizations like the Scientific Working Group on DNA Analysis Methods say that quantitative statistical evidence should be presented with every categorical conclusion, but the US doesn’t require this (Dror and Hampikian).

False Positives:

There are two categories that cause wrongful identification in a DNA report: coincidental matches and false positives. Coincidental matches are DNA matches between two unrelated people. The probability of these matches is about 1 to 500,000 for white individuals and about 1 to 350,000 for black individuals. This small probability of coincidental matches makes people feel confident in DNA evidence. False positives, on the other hand, are matches between DNA and test DNA that result from issues in the forensics lab. There have been multiple cases of forensics labs accidentally switching victim and suspected rapist DNA which lead to convictions that were later overturned when the lab realized the error. There are also cases of misreading or misunderstanding a sample. In a case from 1993, a man was convicted of rape because someone interpreted a mixed sample of victim and perpetrator DNA as an individual sample. The conviction was again overturned. To prevent false convictions, retesting DNA is allowed, but it’s not an efficient solution. Many people are pushing for statistical information on the probability of false positives, so that the jurors can make accurate judgements based on DNA evidence (Thomas et al.).  

Conclusion:

DNA analysis is a useful tool for the criminal justice system, but subjectivity can be an issue in forensic testing. To combat wrongful convictions, there are organizations like The Innocence Project who use DNA testing to free the innocent, but reformed forensic testing standards should be put in place to prevent subjectivity and to ensure juries are correctly informed during trials. https://www.innocenceproject.org/    

Citation:

Augustyn , Adam, et al. “DNA Finerprinting.” Encyclopedia Britannica , 26 Apr. 2018, www.britannica.com/science/DNA-fingerprinting#ref153186. Dror, Itiel E., and Greg Hampikian. “Subjectivity and Bias in Forensic DNA Mixture Interpretation.” Science & Justice, vol. 51, no. 4, 2011, pp. 204–208., doi:10.1016/j.scijus.2011.08.004. Jobling, Mark A., and Peter Gill. “Encoded Evidence: DNA in Forensic Analysis.” Nature Reviews: Genetics, vol. 5, no. 10, Oct. 2004, pp. 739–751., doi:10.1038/nrg1455. Thompson, William C, et al. “How the Probability of a False Positive Affects the Value of DNA Evidence.” Journal of Forensic Sciences, vol. 48, no. 1, Jan. 2003, pp. 1–8., doi:10.1520/jfs2001171.