In one simple sentence, LaTeX is an extension of the TeX language, although TeX in real life is a collection of macros. That isn't an official definition, rather some sort of visualization, but we'll get to a solid definition of "what it actually is" soon.I've phrased it this way because I plan to write a short series of articles on "How to create a professional thesis." During this process, I won't run out of breath or go bald 😉This first part is basically an introduction to text processing. I'll compare commonly known Word/Writer text preprocessors with LaTeX. Furthermore, I'll explain why LaTeX is actually the better option for this kind of documents (documents longer than 10-15 pages, like semester assignments, long scripts, and thesis of course).You won't find this kind of knowledge so easily (at least I couldn't). If you're still interested, then let's go! 🙂
Listen and learn from mistakes of others
I can honestly say that my first chapter of my Bachelor's dissertation went very smoothly and pretty quickly while writing in MS Word. Yes, I was surprised to have 20+ pages in just a few days. Then I sent my work to my supervisor for corrections and to point out weak spots in my 1st chapter. Meanwhile, I wrote a few more pages for chapter two and corrected many sentences from the first one (but I'd already sent the 1st version of my 1st chapter to my supervisor). A few days later, I received the corrections for the first version of my first chapter. Now comes the interesting part: I start wondering:If you're like me and start wondering about this, you've probably noticed that it can become a huge problem if you don't want to spend a few more hours tracking every change in your supervisor's corrected version.
While trying to solve this problem using MS Word, I felt dizzy and sick. Believe me or not, but these kinds of problems with MS Word or LibreOffice Writer are just the tip of an iceberg!
Either way, don't worry too much. These points are just warnings for you and that's why I decided to start this series of articles.
WYSIWYG or WYSIWYM
It's not obvious to everyone, but MS Word and LibreOffice Writer are WYSIWYG1 programs. That means every change in a document will affect the final output (this one what you actually see on screen). For example, if you type a sentence and add 7 spaces somewhere in it, the final document will contain those 7 spaces. Obvious, right? This is expected behavior for WYSIWYG editors, and also a default expectations for many users.
But you can easily answer:
The answer is "yes" and "no". It's very easy to write texts in Word/Writer, but only for short documents. You can also write as many pages as you want if you don't care about migrating or potentially losing your data in the future. Word documents like .docx aren't plain text; they're actually archives of multiple sub-objects in it. If you don't believe me, open any .docx file in an archive manager to see for yourself.
As I mentioned above, LaTeX is an extended version of TeX. However, TeX isn't a programming language. It's a set of macros that helps you typesets better. In contrast with Word, LaTeX uses the WYSIWYM2 approach. In other words, the writer can focus on content rather than playing with visuals like font type, size, color, or other stuff that is useless at the moment of writing. That's a real advantage that LaTeX offers, but one people usually don't see nor appreciate it. When you plan to write a long document, what matters most is your writing, not worrying about the font size for chapters or sections. You just need to know whether something will be a chapter, section, subsection and everything else like styling this comes later or at the end.
My mistakes during the first approach
After writing my BA thesis in MS Word (yes, shame on me!), I can honestly point out a few problems that I encountered while writing and found worth mentioning here:
During writing, I constantly and accidentally changed or removed styles (probably via some default shortcut). Usually, the whole document looked different and I didn't notice it in time!
Using and defining tons of styles for a document. For subscript fonts, heading 1/2/3, quoted text, unnumbered chapters ... it's a horror!!! Even for those who write in Word constantly. What if you take a break for 2 weeks? You'll probably forget which styles you used and what they were named.
Triggering unknown keybindings (that you aren't aware of) can invoke exotic default Word commands. If you don't notice them in time, you'll need to check the whole document to see if anything changed. (Word does show an info log of what might have changed.)
Sometimes objects simply disappeared from the screen or got modified without any conscious action on my part. (It may be a software bug.)
Backing up current work: I saved my files with a never-ending list of names like name + (version or date) + .docx. My thesis folder contained almost 100 different files, each one bigger than the previous one. At the end, the first document was 0.3KB and the last one 2.8MB. (That's a waste of disk space plus you have no idea which backup copies contain the parts of your thesis you need, since any part of your document can evolve at any time.)
Managing bibliographies in Word is literally a horror! Even with additional bibliography managers3. By the way, if you managed to accomplish all of that using just Word, then learning "how to do it with LaTeX?" will be far faster, simpler, and more efficient in the final result. (I never came across sharing bibliographies between documents in Word/Writer.)
If someone else edits your .docx file and doesn't follow your styles, they'll likely break your document's format entirely.
Those were only a few irritating things I encountered while writing any WYSIWYG document longer than 10-15 pages. I find 2-4 pages are easy, 5-9 are medium, but 9-15 are already hard to maintain. I believe 15-20 pages is the absolute maximum to balance document length and smoothness of writing).
I thought a lot about why these mistakes happened. At first, I wondered whether it was because I'm tending to be a perfectionist where everything should (not must) be in order. Although over time I realized it wasn't me: I was perfectly fine and still am - I just chose the wrong tool for this job.
Moral: the tools you use matter!
If tools matter, which one should I use?
This isn't an easy question since it depends on your preferred typing style. I met so many types of people along the way, but I can distinguish two kinds in general when they face LaTeX for the first time.
"Sure, I'll try" - this type of person is usually open to new things, even if the new stuff feels painful during the first few days or weeks.
"I won't do it" - this type of person is a true conservative. They "know what they know" and have no desire to change it, but still need to accomplish their goal: writing the thesis.
This reflects my own observations when I showed sample texts written in LaTeX to them. If you're in the first group, great!
However, if you put yourself in the second group, you'll probably suffer while learning something completely new with LaTeX. With option 2 there's a huge probability that LaTeX won't suit you.
I should also mention that writing in LaTeX may look like "programming" (in most people's opinions). Most of the time I spent in a simple text editor, but to be more precise by "simple text editor", I mean SDI, not MDI. This is important basic knowledge. If you don't know what the difference is, take your time and read up on it. I'll wait for you here 🙂
Ok, Finished? Wonderful! So, to start writing in LaTeX you'll need a TeX library (TeXlive, MikTeX or MacTeX) and a simple text editor. TeX libraries are standard installations based on your operating system (Linux, Windows or OSX). Which one goes with what, I'll tell you later (it isn't important at the moment).
Text editors
Writing this heading made me feel like I'd just stuck my hand in an anthill. Why? This topic is so huge that I'm afraid even a few books wouldn't cover all the aspects about text editors.
Still, I can give you a good start. I'll point you to 2 great articles comparing multiple text editors (some IDEs included) and also mention which editors I prefer and why. I think that's a fair start :)
Take a look at the websites below:
tex.stackexchange.com/q/339/48903 - This's the richest source of knowledge I've come across so far. You'll find a really smart comparison for almost any popular editor you can choose from.
en.wikipedia.org/wiki/Comparison_of_TeX_editors - yes, it's a Wikipedia page (not always the most reliable source), but this article has an outstanding comparison table worth exploring to find which editor suits you best.
I like two editors the most: within CLI tools, I definitely prefer Vim with latex-suite plugin. If you want to get started with Vim, I can recommend my dotfiles, not as a ready-made solution but as a helpful starting point for your Vim journey and configuration. If you're wondering or hesitating right now (like I was before) about whether the long learning journey of Vim is really worth taking, I highly suggest reading my other article called Is it worth knowing Vim, and why?.
From the GUI category, my favorite is TeXstudio and here I wrote another article How to configure TeXstudio where I describe how to smoothly get started with this program and why to use it for LaTeX. I'm also very fond of Sublime Text 3, although it's more of a regular text editor than a dedicated LaTeX IDE (here I shared my thoughts in Discover the Sublime Text 3).
I won't try to convince you which one is better because it doesn't really matter. You can follow my footsteps and try one of those that I mentioned above. Nevertheless, the decision which one to start with is up to you.
I hope you won't be disappointed because as a programmer I have my "writing standards" and important features for my typing workflow. Those editors have great features (especially Vim!) and that's why I use them, even after work for my personal projects. But unfortunately, they don't have the candy-like appearance some expect from modern text editors (I'm looking at you Atom, Sublime or IntelliJ).
Online alternatives vs local TeX library
Today we're not limited to only locally installed programs. There are a few online tools that can replace an editor and TeX compiler just by visiting a website. Overleaf is one and ShareLaTeX is another (they plan to merge in a few years). Both have similar alternatives that might suit you, but most interesting features like Git integration will cost extra (or require a subscription).
We can achieve all of this with even higher security without paying a penny (just the amortization of your computer and electricity). Here's how:
Why is it better to have it locally than on one of those services?
Working offline
Much faster compilation on our local machine
Our data is on our hard drive (some services have terms stating that for free accounts, your work can be treated as their property, so they can use it for their own purposes)
We can protect ourselves from data loss using version control systems like Git
Free, unlimited collaboration using version control systems
If we fear our computer might break during work (e.g., hard drive failure), we can secure our data with any instant cloud sync service (Dropbox or Mega). TeX files are just text files, so they're small and light - ideal for quick synchronization.
Installing standard TeX library
This part should be a piece of cake if you've gotten this far. Well DONE! (I know that it could have been difficult because lots has been said - both positive and negative - and you might feel confused.)
There are 3 most popular standard TeX libraries (for Linux, Mac OSX and Windows):
For Windows and Mac OSX installation is straightforward. Just download the installer, follow the wizard and that's all.
For Linux users, full installation looks even simpler:
sh
# Debian based systemssudo apt-get install texlive-full biber
And that's all for this part. IMHO these are the best information on how to quickly start with LaTeX, along with answers to questions that aren't easy to find elsewhere.
Next part
As for "how to start building a LaTeX thesis", I'll cover that in the next article Thesis in LaTeX - part 2. I'll base my implementation on the uekthesis class, which I created for my university: Cracow University of Economics. It can be modified and adjusted to meet any other University requirements on the fly (we'll do that too).
WYSIWYM stands for What You See Is What You Mean. ↩
What?!? Additional managers for proprietary software? That seems wrong. Was Word ever meant to be a tool for writing long documents with multiple bibliography sources? ↩
How can I merge my supervisor's corrected version with my recent updates without spending a couple of hours on it?
Pfff, I can write as many pages as I want in Word/Writer and it's trivially easy!
Right now I'll install a full library because we live in times where 1-2GB of data aren't a problem anymore and a full installation can prevent LaTeX beginners from errors like "package not installed" (some packages have different names, and the name of a package and the name of the library used sometimes can be hard to find or debug).