LaTeX Tables in Substack, Step by Step
Learn how to make LaTeX tables using MathJax, in Substack. Step-by-step guide with every example, formatting tip, unit, and variable for clean tables.
Creating tables in Substack used to compare to acting on a nondeterministic polynomial-complete problem1: at worst, it was impossible; at best, a headache. For the longest time, bloggers had to embed precarious Datawrapper schemata or harness other, often obscure third-party graphic design platforms to vehiculate writerly ideas visually. The MathJax-powered LaTeX feature on Substack, however, endures as an economically viable means to clean, academia-safe tables directly inside your posts, so… why not give it a fair go?
If you have been wondering, “Can I use LaTeX on Substack?” or “How do I even make LaTeX tables in Substack?”, you have run into the right tutorial. I will here present how to make LaTeX tables in Substack to the letter, with step-by-step examples you—and anyone else reading this—can paste into your own weblog. By the end of my article, you will have thus learned, I hope, how to format rows and columns, compute variables and units, and buff your finished product with bonus tips.
First Things First: How Substack Uses LaTeX
LaTeX is a typesetting system—nay, the gold standard in writing technical documents, formulae, and equations—for professional publishing in science, mathematics, and engineering. But rather than formatting via user-experience (UX) buttons, we rely on short commands to tell LaTeX how to vindicate mathematical tables and symbols.
Now, Substack uses MathJax, a Web version of LaTeX that runs directly in the browser. Most LaTeX commands for mathematics should consequently work here, although some advanced tools do not, as we later understand. Let’s turn that to our advantage, nevertheless, by perceiving this version of LaTeX as one that may be easier to learn on the go. Here is how:
Basic Example of a LaTeX Table for Substack
The most commonplace modality for LaTeX tables in Substack is to employ LaTeX’s array environment. That is, the LaTeX feature of which we avail ourselves to build typesetting matrices, systems of equations, and other mathematical contents depending on precise alignment. One may liken that array environment to the grids on Microsoft Word, the ones that require knowledge of how many columns are needed, before filling in each row. And so, columns are divided by &, rows end with \\, and vertical bars | add column lines, as opposed to \hline for horizontal lines.
Viz., here is a basic example with variables from the October article on the vertical line test:
\begin{array}{|c|c|}
\hline
n & P(n) \\
\hline
1 & 2 \\
2 & 4 \\
3 & 5 \\
\hline
\end{array}Wielding that script, we should reach a two-column LaTeX table, such as the one here below, tapping into the values of n and P(n), the |c|c| therein straightening columns to the centre. You can, likewise, reify left- and right-sidedness, respectively with l for left and r for right.
Adding Variables to LaTeX Tables in Substack
A table almost always includes variables or measurements. As a result, it is worth noting that Substack’s MathJax treats variables like n or P(n) as italic automatically. For words, you need \text{} to keep them upright. Units are added the same way.
For instance:
\begin{array}{|c|c|c|}
\hline
\text{Number of Tickets Bought } n & \text{Price of Tickets } P(n) & \text{Price per Ticket} \\
\hline
1 & 2 & 2.00 \\
2 & 4 & 2.00 \\
3 & 5 & 1.67 \\
4 & 6 & 1.50 \\
\hline
\end{array}That LaTeX table shows three columns, such as the ones here below: one for the number of tickets bought, a second for the price of tickets, and a third for the price per ticket. Now, notice how \text{} ensures text like “Ticket” becomes plain, while n and P(n) are italic. In teaching and technical writing, that combination of mathematics and text is crucial when making LaTeX tables in Substack.
Summary: How to Build Substack LaTeX Tables
At last, here is a simple, step-by-step workflow for building LaTeX tables in Substack:
Decide the number of columns. E.g.,
\begin{array}{|c|c|}for two,\begin{array}{|c|c|c|}for three.Add headers. E.g.:
\text{Number of Tickets} & \text{Price of Tickets} & \text{Price per Ticket}Divide each row. Separate those rows with
\\. E.g.:1 & 2.00 & 2.00 \\Insert lines. Use
\hlinefor horizontal lines, with one at the top, between headers and rows, and one at the bottom.Align columns. Use
lfor left,cfor centre, andrfor right.Combine mathematics and text. E.g., variables like n need no formatting, but words, such as “Tickets,” should be wrapped in
\text{}.
Following those steps nearly guarantees your LaTeX tables in Substack will be clean, easy to read, and professional.
Personal Bonus Tips for Substack LaTeX Tables
Bold and italic in MathJax.
\textbf{}for bold and\textit{}for italics do NOT work in Substack; be mindful of which words you treat as plain text and which you treat as variables.Cleaner layout. Try
\begin{array}{ccc}for a simpler look, using only\hlineto separate rows.Preview. Since MathJax may space content in a slightly different manner, always check Substack’s preview before publishing.
Spacing.
\,for a small space,\;for a medium space, and\quadfor a large space. E.g.:P(n)\,\text{dollars}
References
NP-complete problem. (n.d.). In Encyclopaedia Britannica online. Retrieved from https://britannica.com/science/NP-complete-problem
Smiley, K. (2024, May 31). Adventures in datawrapping: Charts and tables and graphs, oh my. Everyday Ethical AI, Substack. https://karensmiley.substack.com/p/adventures-in-datawrapping-charts
According to the Encyclopaedia Britannica online (n.d.), a problem is “called NP (nondeterministic polynomial) if its solution can be guessed in polynomial time,” i.e., in a number of steps growing reasonably with that problem’s size, rather than explosively. “Nondeterministic,” here, entails “no particular rule is followed to make the guess” (Encyclopaedia Britannica online, n.d.).


Latex is more approachable than I though, I will try to put some of what you show in practice.
J adore ❤️