The Elementor website builder is a nice way to quickly create a good-looking website. However, by using Elementor, you lose some of the basic WordPress functionalities.
One of these functionalities I ran into yesterday was my inability to incorporate LaTeX equations, despite having installed the appropriate plugin.
The solution is really simple, but since I couldn’t find it anywhere, I thought it’d be nice to share a quick overview below. So, here’s my ‘how to get LaTeX equations on my Elementor website.’
Step 1: install the WP QuickLaTeX plugin
You can either do so by downloading the ZIP-file from the official site and uploading it to the plugins section on your WordPress dashboard (plugins > add new plugin > upload plugin), or by installing directly from the browser (plugins > add new plugin > search for “WP QuickLaTeX).
Then activate the plugin to get it running (you can do this under plugins > installed plugins).
Step 2: add a ‘shortcode’ block to the beginning of your post or page
After starting a new post or page drag a ‘shortcode’-block from the builder to the top of your page.
Within the ‘shortcode’-block, change the content of the block to ‘latexpage’ between square-brackets, such as below:
Step 3: add a WordPress text block to your page
Now this is the step I overlooked to the point of frustration. To insert a LaTeX equation in your text, you cannot use the Elementor text block. Rather, you will need to use the WordPress textblaock, which you can find under the ‘WordPress’ tab in the builder widget section.
If you search for ‘text’ in the widgets, this block does not show!
Step 4: Add LaTeX equation to your page
In the WordPress text block, you can now write your equations in the WordPress text block, using the syntax provided in the plugin documentation. The most straightforward are the following options, illustrated in the example below. These include inline, between lines, or between lines with labels. The labels can be referenced later in the text.
Becomes (in a WordPress text block):
That’s it! Keep in mind that the equations only show when you view (save draft > view page) or publish the page. In the editor, it will always look like unformatted code.