Photo by Antoine Dautry on Unsplash

Writing Math (LaTeX) Formulas in Medium

Matteo Capitani
3 min readJun 21, 2021

--

Introduction

I have looked for an easy solution to publish mathematical formula on Medium. As I use Markdown (and Jupyter notebooks) for my daily work, it is natural for me to use a solution like Markdium that works smoothly for embedding code.

For mathematical equations, however, the solution is not that easy. For example, the following procedure will not lead to a rendered formula. As I am not a Mac user, also the recommendation in this Medium article are not relevant for me.

The way I considered rely on saving the images in SVG and converting the images in PNG (currently, Medium does not support SVG for images).

The procedure

As a first step, I downloaded and installed Visual Studio Code. While there are many other alternative Markdown editors, Visual Studio come with many useful plugins. Specifically, I installed the plugin Math to Image. From the Extension tabs in Visual Studio Code:

Installing the plugin in Visual Studio Code.

After that, in a tab with a Markdown file opened, to convert the formula into a SVG file a right click is all that is required:

--

--

Matteo Capitani

Data Scientist, Mathematician and Physicist by Education