How To Use Latex In Google Docs

LaTeX, a high-quality typesetting system, is widely used for formatting complex mathematical and scientific writing.
Google Docs, on the other hand, is a popular platform for creating and editing documents online. However, you may have realized that Google Docs doesn’t support LaTeX directly. But does that mean you cannot use LaTeX in Google Docs? No, it’s possible! In this article, we will guide you how to embed LaTeX equations into your Google Docs.

Method 1: Use the built-in Equation Editor

Google Docs has a built-in Equation editor which can be used to insert mathematical symbols or equations. While it doesn’t support LaTeX language, the equation editor has a wide variety of symbols and operators that mimic many of LaTeX functionalities.

Here is how to use it:

  1. Navigate to “Insert” tab in the Menu.
  2. Select “Equation”.
  3. A text box will appear in your document where you can type your equation.

Method 2: Use a Google Docs Add-On

For those who want to use actual LaTeX commands, you can use a Google Docs add-on like Auto-LaTeX Equations or Code Blocks.

Auto-LaTeX Equations

Auto-LaTeX Equations add-on for Google Docs allows you to type in LaTeX equations in any document, then render them as images or SVGs. Here’s how:

  1. Go to Add-ons -> Get add-ons and search for Auto-LaTeX Equations.
  2. Install the add-on.
  3. Once installed, you can access it by going to Add-ons -> Auto-LaTeX Equations.
  4. Write your LaTeX equations enclosed within dollar signs like $…$ or $$…$$.
  5. To render them, go to Add-ons -> Auto-LaTeX Equations -> Render Equations.

Code Blocks

Code Blocks, another add-on, lets you insert and format text with line numbers, highlights, and color themes. You can use it to write LaTeX code in your Google Docs.
Here’s how to use Code Blocks:

  1. Install the Code Blocks add-on in a similar way to Auto-LaTeX Equations.
  2. Once installed, highlight the LaTeX code in your document.
  3. Go to Add-ons -> Code Blocks -> Start.
  4. Select “LaTeX” from the language dropdown menu to format your LaTeX code.

Example:

Here is a simple LaTeX code to showcase the usage:

      \documentclass{article}
      \usepackage{amsmath}
      \begin{document}
      \begin{align*}
      f(x) &= x^2\\
      g(x) &= \frac{1}{x}\\
      F(x) &= \int^a_b \frac{1}{3}x^3
      \end{align*}
      \end{document}
      

This will render as a set of equations in LaTeX.

Conclusion

Even though Google Docs doesn’t support LaTeX natively, there are several ways to incorporate LaTeX into your documents. You can either use Google Docs’ built-in equation editor or use a Google Docs add-on like Auto-LaTeX Equations or Code Blocks. By utilizing these tools, you can write and format your mathematical and scientific documents efficiently.