# A Hitchhiker’s Guide to LaTeX

You have an essay to turn in, and only have a few hours left. I’ve got you covered fam.

So, I have a lot of friends pursuing Business Degrees at their Universities. And I have realized that a lot of them are still using Microsoft Word. I am using the word “still” because some teachers made me use LaTeX when I joined Computer Engineering in College so I am kind of already into that. I mean, It’s not that I am looking down on Microsoft Word, I am just not that used to It anymore. As far as editing softwares go, It’s okay. For me, It’s just proprietary software that I don’t really want to pirate using Torrent (may I remind my South American friends: It’s illegal) or pay for it, since I’m trying to save up the money by now. Libre Office works just fine with open file formats, and Google Documents is just way more convenient, as It is always syncing with the Cloud. Yes, there are a lot of issues using both Google’s and Microsoft’s software when It comes to the Terms of Service. But If I have to agree with a huge TOS that I totally read at least once (sarcasm intended), at least Google Docs won’t take extra space on my desktop’s hard drive, and It’s easier to use with different devices.

I probably got out of my way talking about these mainstream softwares, but the thing is, I’m into LaTeX. When I have to put something on paper (If I actually care about formatting), my typical workflow starts on Google Drive and ends on Overleaf (I started using an editor from Ubuntu’s Software Store, but I ended up with Overleaf because of how convenient It was). My friends who are not attending the same classes as I am are using Microsoft Word, and I have noticed that some of them waste a lot of time with formatting. I mean, isn’t Word user friendly? Sometimes I hear things like “Word just cropped my image out of nowhere”, or “My paragraph won’t fit here”. And honestly, I just pick a template on Overleaf and sometimes my work is over pretty fast. Once everything is ready, It may be a matter of copying and pasting text. I don’t waste a lot of time once I have picked up a format because the final PDF file is being generated automatically. So, in theory, the final result is what It should be. LaTeX was implemented with the idea of keeping the writer as far away from the final document as possible. It is not a “What you see is what you get” kind of deal. To me, one of the hardest aspects surrounding LaTeX is actually how the hell am I supposed to pronounce It? That might as well be something that I won’t cover here.

Anyway, I decided to write this down on my personal Medium blog as a guide to my friends (or anyone else who is interested) since I want them to try generating text using LaTeX as quickly as possible, with a minimal learning curve. So, let’s get going.

First, you create an account here. Yep, that’s all I have for this part.

Now, let’s create a document. Your Overleaf homepage kind of works like Google Doc’s homepage, your projects will be stored here.

Okay, now you can either load a template from your computer (choose the correct .zip file) or pick one from the website. I will be using IEEE’s template, but the following instructions should be more or less the same no matter the template.

Once everything loaded, you should be kind of overwhelmed by little funny things that kind of look like “computer code”. Well, LaTeX actually works with “code”, but I would rather call them “commands”. So now, let’s go for the cool part, actually making things.

So, you should be able to find this part by scrolling down on the editor (not the PDF that sits under the “Recompile” button). That’s where you put your title, pretty easy.

This part is right under the title, and may look kind of intimidating. The thing is, If you are writing something by yourself, you are able to delete the extra Author blocks. Everything that goes under the first “\and” and is inside the “}” can be deleted. The remaining Author should go to the center of the file once It is recompiled. This reinforces why generating files this way has an inherent advantage, the resulting file should be exactly described by the given command.

So, now for the actual content. Everthing that is inside the “Abstract” and the “keywords” tag will be placed apart from the rest of the text. The text itslef goes under the “\section” and “\subsection” commands.

Your Bibliography goes by the end of the file, and It kind of looks like this.

You are able to use one of those references with the command “\cite{b1}” in your text. With Zotero, you are able to generate and keep your bibiliography organized in It’s own file, but that’s usually only useful with more extensive papers.

You can kind of see how this can escalate pretty quickly, right? You may add as many sections as you want, and your work is ready to go. Some formats are trickier than others, obviously. This one is more specifically very straight foward. Final result should look like this:

Well, this basic structure is kind of already what I did in my first semester as a Computer Engineering student. But over time, you are going to realise that this is just not enough. LaTeX is extremely good at generating code blocks, showing images with the right size and displaying math.

This is basically how you are able to add images. LaTeX should automatically put your image at an optimal location on the final PDF file.But, when typing the original command, put the image block close to what It’s referring to. Do not forget to add the file to the project (in this example, my image is inside the “img” folder).

It is also possible to generate tables in LaTeX. Yes, it’s kind of weird to use “&” as the separator in each line, but the result is great. Also notice how I generated omega, with “$\omega$”. The end result would be the special symbol you would have to find in the “Insert” tab of Microsoft Word. With LaTeX, these symbols come out automatically. Over time, with these shortcuts in mind, producing text that requires a lot of symbols is much faster than searching an especific tab.

This is where LaTeX shines. Writing equations. I had a professor at College who said that you could smell the difference between a document made in Word and one made in LaTeX from far away, just based on the equations. I kind of believe that (based purely on looks).

If you are new to LaTeX, there are a lot of helpful online tools to make your life easier. For generating tables, for generating equations and even for references. StackOverflow is also your friend If things get complicated. But overall, what I showed here is enough for basic texts (It’s basically what I wish I knew back in 2015).

All I can say is that I hope I made someone’s homework look better.

--

--

## More from Guilherme Braga

A Computer Engineering student from Brazil. I basically write some code and go hiking on weekends. I’m constantly amazed by numbers that kinda look cool.

Love podcasts or audiobooks? Learn on the go with our new app.

## Guilherme Braga

A Computer Engineering student from Brazil. I basically write some code and go hiking on weekends. I’m constantly amazed by numbers that kinda look cool.