What is LaTeX?

LaTeX is the standard document preparation system for producing high-quality publications in academia and technical industries. It is often used for large and important academic works such as theses, dissertations, and peer-reviewed journal articles and books, but it can be used for anything, from resumes to homework and lecture notes.

For example, the security white papers for Signal and ProtonMail are written in LaTeX by security professionals.

How does LaTeX work?

The main idea behind LaTeX is that you can focus on your content because you do not have to think about how it is formatted as you are writing. For example, if you were writing a paper with multiple sections and subsections, you could define where they start and what they are called by typing \section{Section Title} and \subsection{Subsection Title}, respectively. Then, when you are ready to see your stylized document, you press a Render or Print button in your LaTeX editor and it will produce a separate .pdf file for reading, sharing, or publishing. In the .pdf file, you will see that the sections are automatically enumerated and styled according to the default styling or any customized styling that you defined.

When you work with LaTeX, your work is saved into plaintext files with the extension .tex. They are just like .txt and .md files, except your computer operating system can easily associate them with your LaTeX editor. The two main types of files involved with LaTeX -- plaintext and .pdf  -- are among two of the most easily readable by humans without any sophisticated software, so they are great for storing information for a long time.

The way of editing and overall workflow offered by LaTeX is different from mainstream typesetting programs such as Microsoft Word, Open Office, and Google Docs. These programs are described as What You See is What You Get (WYSIWYG) because you style your content as you work, and the formatting that you see on the screen while you type is what you expect to see when you print it out or convert it to a .pdf. These editors usually save your work in special extensions such as .docx, .odt, or .rtf in order to preserve the formatting. These files require special software to read, so they force you to remain an active user or subscriber of that software in order for you to maintain access to your work.

When you work with LaTeX, you write in plain symbols and produce a .pdf of stylized symbols, but with mainstream software, you write in stylized symbols and produce a .pdf that you expect to look exactly the same.

What is Tex?

LaTeX is used by academics in many languages and in almost every field because it incorporates TeX, a sophisticated digital typesetting system. TeX was initially released by computer scientist Donald Knuth in 1978, six years before LaTeX was first released, and has long been the standard typesetting for academic publishing in technical fields. In the documents produced with LaTeX, the shapes of the letters and symbols and the way they are spaced apart are collectively known as TeX.

There are plenty of extensions to TeX, so it can be used to write about any subject, but it is probably noticed the most in mathematics, computer science, and science because it was originally designed to typeset complex mathematical formulas.

In a LaTeX program, you can type math by enclosing it in dollar signs. For example, if you type $$\frac{\sqrt{2}}{2}$$, you would get a fraction of √2 over 2. Try it for yourself on the free online Upmath editor. Some LaTeX programs allow you to use one pair of $ signs instead of two, or to use one for in-line math and two for large blocks of math.

What is KaTeX?

KaTeX is a fast, self-contained JavaScript library supported by Khan Academy that makes it easy to render TeX on mobile, desktop, and web applications without the full LaTeX infrastructure. It has much of the same functionality as LaTeX but does not have all the same features and add-ons. KaTeX is built for situations where sharing snippets of TeX is enough and sending entire .tex or .pdf files is excessive or inconvenient. For example, KaTeX is built into Facebook Messenger and Rocket.Chat for you to send bits of math in your chat messages.

A full table of TeX symbols supported by KaTeX is available here.

Since KaTeX is made for the web, it is commonly used in conjunction with Markdown, another way to indicate basic formatting while you are writing. As with LaTeX, Markdown is not WYSIWYG, and contents are stored in plaintext .md or .txt files. To make bold text in a WYSIWYG editor, you highlight the text and click a button. In LaTeX, you type \textbf{bold text} and in Markdown, type **bold text**. Keyboard shortcuts are generally available for each form of editing.

Why Learn TeX?

Many undergraduates and graduate students in STEM fields are required to learn how to use LaTeX because it is expected in graduate and professional schools, but having TeX more accessible over the web via KaTeX and having students learn TeX as early as high school will make mathematics a bigger part of our internet language, and that would have many positive consequences for each of us.

Our understanding of abstract concepts depends on our ability to describe them with language. For instance, we feel a wider range of complex moods and emotions when we have a language to distinguish between individual feelings and to identify how much we experience them. So, when we talk with other people and write to ourselves about how we feel, we can better describe what we feel, how often we feel that way, and for what reasons.

Similarly, if we incorporate KaTeX into the online platforms that we use to communicate, we can integrate mathematics into our written language and thereby improve our understanding of mathematical objects. Ideas that were once strange and obscure will feel more natural and human as we talk more about them. Math will then seem less separate from ourselves and less of a formal activity done only in classrooms for grades. This may also help reduce mathematical anxiety, a common phenomenon among students today.

Adding support for mathematics to our online infrastructure is especially important today. Students are becoming increasingly reliant on receiving their education over the internet, and a lack of familiarity with TeX forces them to scan documents, take pictures, or to draw their math. These methods do not work well for collaboration or require expensive, specialized hardware, so are inefficient or unusable by students and schools with limited budgets.

Furthermore, by including mathematics in our daily language, we can reduce the misconceptions that mathematics is entirely, or even mostly, a computational activity. It is true that a large and important part about studying mathematics is learning how to solve practical problems with calculations, but middle and high school students are too often taught that mathematics is all about these calculations. If they were to sit-in on an upper-level college math course, however, it is likely that they would not see any numbers at all. Instead, they would see complete sentences and stylized letters.

The field that we call Mathematics is as much about using logical arguments to prove that our computations actually work for what we use them for as it is about actually using them. Mathematics is a creative use of language and symbols to create representations of abstract concepts that we believe or take for granted to exist in the world. Most high schools and middle schools do not show students these aspects of mathematics. By making TeX more accessible to all, we can show our students that mathematics is a form of writing --  a form of expression -- that is more interesting and has more intellectual value than solving repetitive calculations.

If students were to have mathematics incorporated into their online language and have a better understanding of what higher level mathematics is really about, then they will likely learn it more quickly, with less effort, and with more enthusiasm. These benefits will probably extend to other disciplines since mathematical literacy is an important foundation for doing serious work in almost any technical field. For example, students who want to engage with the recent progress in mathematical machine learning and artificial intelligence would benefit from knowing how to communicate math with the online community. This involves learning how to write math in complete sentences with TeX.

How to use TeX

The number of things that one can do with TeX is limitless and everyone's situation is different, so there is no single best way to use it.

LaTeX is free to install and use on every major desktop operating system, but the installation process can be challenging for many users. On Windows, users need to decide on a free TeX distribution and free editor to work as the front end for the distribution. For security purposes, it is advised that users verify the hashes and signatures of the distributions and editors that they download to ensure their authenticity. If you want to avoid installing LaTeX on your desktop or do not have Administrator privileges to do so, there are online LaTeX editors that are free to use, but you may want to be wary of privacy concerns or need to use additional tools to save and sync your TeX between your devices.

If you do not need the full document preparation system provided by LaTeX or prefer to get started with a simpler approach, we recommend using our Standard Notes app. It syncs your notes between all your devices, including mobile devices, with end-to-end encryption. The installation process is simple and straightforward. Our Markdown Math editor is fully equipped with KaTeX, and you can use it to import and export individual notes in your preferred extension for plaintext files (e.g., .txt, .md, and .tex) to share your math with others. You can also work with our Code Editor to type in LaTeX and use the Action Bar to export your .tex files to render with your dedicated TeX editor.

The Standard Notes approach is great if you want to take notes or complete assignments in Markdown and KaTeX. With our full range of editors, themes, and backup options, you can also use the app for your other academic and personal notes.

We offer students a 30% discount on the one-year and five-year plans of our Extended subscription and we offer free refunds for up to 30 days if you change your mind and want to use a full LaTeX service. Click here to learn more.

If you are only interested in learning TeX on desktop, you can use the free Visual Studio Code text editor. You can use VSCode to easily open and save .md files, including ones exported from Standard Notes, and view the TeX with extensions like Markdown All-in-one and Markdown+Math. These extensions also use KaTeX.

If you only want to type TeX to communicate via email, you can use the Tex for Gmail Google Chrome extension.

In any case, regardless of how you use TeX, it has the possibility to improve your relationship with math and the way you produce documents. Beyond academics, you can use it to design professional resumes, publish technical specifications, and write papers to include in your personal or business portfolios. There are plenty of open source templates that you can use or start from scratch to create a style that best suits your use.

Further Resources


Join our Slack and follow us on Twitter to get all the latest updates about Standard Notes.