Resources for \(\LaTeX\) Mathematics

Here are some useful references for doing mathematics with LaTeX:

Quick References for Mathematics

Note that some of these references may assume features not included in the implementation of LaTeX you are using. For example, most online LaTeX math interpreters do not support commands outside of math mode or may not support including additional LaTeX packages.

  • The Great, Big List of LaTeX Symbols (22 page PDF file) Many of these symbols may require additional packages, as noted in the document. Thus they may not be appropriate unless you are able to include that package. While MathJax has some support for extensions, this StackExchange conversation notes that one cannot just “include” a LaTeX package, since it is not a full implementation of LaTeX.
  • Overleaf’s Symbol Reference. Overleaf is, tangentially, a great way to get started exploring LaTeX without having to perform a complete install on one’s home computer.
  • StackExchange’s brief tutorial and reference. This very thorough reference includes an enormous amount of mathematics that is rendered with MathJax. This means it takes some time for all of the mathematics to render, so that if you have just loaded the page, it will take some time to “settle.” A consequence is that if you visit a reference item such as “Matrices” or “Absolute Values and Norms” immediately upon opening the page, it will continue to move as the mathematics renders, losing your position. Hence it is recommended, if you wish to use this resource, to just keep the page open in a tab (or be patient).
  • Wikipedia also maintains an extensive reference for displaying formulas, functions, symbols, and special characters with TeX.
  • If you don’t want to spend time searching documentation, you might try the DeTeXify Reverse Symbol Search, which lets you draw a desired symbol with your mouse and then finds the commands that give similar symbols.
  • Finally, the Comprehensive LaTeX Symbol List is a 338 page list of tables laying out all LaTeX symbols.

Tutorials

  • Learn LaTeX in 30 Minutes at Overleaf.com. Overleaf has extensive documentation on LaTeX. If you create an account, you can make it interactive. It is worth noting you should probably not expect help with issues related to installing and using LaTeX on your computer, since overleaf is an online platform. If you enjoy this, you might also find their Free Online Introduction to LaTeX helpful.
  • LaTeX for Beginners is a 37 page PDF document with examples using TeXworks.
  • latex-tutorials.com (Note: this site has ads that could be confused with content) has guides for installation, quick start, tutorials, a simple sandbox editor, and references.

More Thorough LaTeX Documentation

  • The Not So Short Introduction to LaTeX 2e is a 153 page PDF document which includes more than any single person is likely to ever want or need to know. It can be an invaluable resource for people new to LaTeX.
  • StackExchange has a site devoted to TeX. When you inevitably create various web searches for “how to <do such and such> in LaTeX”, most likely 4 of the top 5 results will come from this site, and most likely the most useful result will be one of those.
  • CTAN.org is the Centralized TeX Archive Network, which is a network of sites all mirroring a vast repository of LaTeX information and packages. LaTeX exists in a wide variety of implementations suiting different needs, and upon that, thousands of “packages” which can be included in any given LaTeX file to extend and customize the functionality to further suit an author’s or publisher’s needs.
  • The American Mathematical Society (AMS) has a collection of LaTeX tools, including the widely used amsmath LaTeX package.

Generating Images within LaTeX

Using PGF/TikZ to Create Graphics

There are many ways to include graphical content in LaTeX, but often mathematical content such as abstract graphs, graphs of functions, and geometric illustrations are easily done programmatically through TikZ (which stands for “TikZ ist kein zeichenprogramm”, German for “TikZ is not a drawing program”). Just as LaTeX is actually a macro language built atop TeX (which in turn is a typesetting system), TikZ is a macro language built atop PGF (for “Portable Graphics Format”). TeX comes with a PGF interpreter.

While most (if not all) online LaTeX math engines (including MathJax) do not support TikZ, if you wish to include images in your online mathematics communication, you may find it satisfactory to create local standalone image files that can be then uploaded to the desired location.

  • The package documentation for PGF and TikZ can be found at its CTAN page.
  • TeXample.net hosts hundreds of examples of using PGF and TikZ to create beautiful and stunning images. If you look around, you’ll likely be impressed. Each of these can be downloaded as a tex or pdf file, or opened in LaTeX. Most, if not all, use the standalone document class. If your LaTeX does distribution does not currently have this document class, but is properly set-up to automatically retrieve needed packages, then you should be able to compile any of these files on your distribution. (You may want to check which packages they include first, since more included packages means the package manager will take more time to acquire and install all the needed packages.) Finding relevant examples and seeing how they accomplish certain goals can go a long way in helping you get started creating your own content with TikZ. The Terms of Use section notes that each example is copyright its original author and distributed under either the GNU Free Documentation License or a Creative Commons Attribution License.

For example, the following code below generates a nice drawing of a graph as a standalone PDF file. This will be illustrated below.

\documentclass[tikz,border=10pt]{standalone}

\begin{document}
\begin{tikzpicture}[scale=.7]
    \draw[help lines, thin, dashed, xstep=1, ystep=1] (-4,-4) grid +(8,8); 
    \draw [thick, <->] (0,-4.25) -- (0,4.25);
    \draw [thick, <->] (-4.25,0) -- (4.25,0);
    \draw [very thick, blue, samples=500, domain=-3.48:3.67,<->] plot (\x,
{.1*\x*\x*\x*\x - \x*\x - .5*\x});
\end{tikzpicture}
\end{document}

Getting Graphics Online

Screenshots

The easiest way to include any graphic you already have in an online post, assuming you can view it on your screen, is to snap a cropped screenshot of the desired image. The following approaches will allow you do drag a rectange to select a portion of the screen and save a PNG file:

  • for more recent versions of Windows 10, you can just press “Win+Shift+S”,
  • for older Windows 10, look for the “Snipping Tool” app,
  • for Mac, use “Cmd+Shift+4.”

If you plan to share an image that is not your property, please be sure you have the rights to do so, and attribute it appropriately if necessary.

Using ImageMagick with the “standalone” package”

A PDF file created with the standalone package, like the one discussed above, can be converted to a PNG file and uploaded to a webpage. For example, following the instructions in this StackExchange discussion, I used the following ImageMagick command to obtain the image posted below:

convert -density 300 filename.pdf -quality 90 filename.png
Output of a function drawn by TikZ after being converted to PNG.
Output of a function drawn by TikZ after being converted to PNG.

If you wish to use LaTeX to create TikZ files for upload, you can even execute both the compilation and conversion by including the the following option when declaring the document class, provided you have ImageMagick installed:

\documentclass[tikz,border=10pt,convert={convertexe={convert}}]{standalone}

Note that you will have to run pdflatex with the -shell-escape option, enabling pdflatex to call an external program. The documentation for the standalone package further describes the options for automatic conversion.conversion.