Title: Aligning on =
Last modified: March 29, 2020

---

# Aligning on =

 *  Resolved [omdaddi](https://wordpress.org/support/users/omdaddi/)
 * (@omdaddi)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/aligning-on/)
 * Thanks, this is super fast and looks great. Brilliant.
 * I have not been able to find a LaTeX plugin for WP that will allow me to align
   on the = sign. e.g.
 *     ```
       \begin{align}
       n &= \frac{1}{sin\ c} \\
       &=\frac{1}{sin\ 48.3^\circ}\\
       \end{align}
       ```
   
 * This borks because wordpress escapes the ampersand so the LaTeX looks like `&
   amp;=`.
 * I have no idea if this is fixable, but worth asking.
    -  This topic was modified 6 years, 2 months ago by [omdaddi](https://wordpress.org/support/users/omdaddi/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Tom Churchman](https://wordpress.org/support/users/beskhue/)
 * (@beskhue)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/aligning-on/#post-12606114)
 * Using the KaTeX block provided by this plugin, ampersands for aligning should
   work fine! In the source code of the page you would indeed see the ampersand 
   being encoded to HTML as `&amp;`, but that is expected. The KaTeX library decodes
   that to the ampersand literal.
 * To be clear: you should not be seeing `&amp;` being rendered in the formula. 
   If that happens, something is not working as intended.
 * Your code example almost works, though you have to use the `aligned` environment
   instead of `align`.
 * So:
 *     ```
       \begin{aligned}
       n &= \frac{1}{sin\ c} \\
       &=\frac{1}{sin\ 48.3^\circ}
       \end{aligned}
       ```
   
 * When using KaTeX inline in a paragraph block with shortcodes, ampersands should
   also work as expected: e.g. `[katex]a \& b[/katex]` renders as “a&b”.
    -  This reply was modified 6 years, 2 months ago by [Tom Churchman](https://wordpress.org/support/users/beskhue/).
    -  This reply was modified 6 years, 2 months ago by [Tom Churchman](https://wordpress.org/support/users/beskhue/).
    -  This reply was modified 6 years, 2 months ago by [Tom Churchman](https://wordpress.org/support/users/beskhue/).
 *  Thread Starter [omdaddi](https://wordpress.org/support/users/omdaddi/)
 * (@omdaddi)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/aligning-on/#post-12608908)
 * Utterly solved, thank you.
 * Not quite sure what I was doing wrong, but now working a treat.
 * Thank you for the heads up on aligned rather than align.
 *  Plugin Author [Tom Churchman](https://wordpress.org/support/users/beskhue/)
 * (@beskhue)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/aligning-on/#post-12616964)
 * Great!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Aligning on =’ is closed to new replies.

 * ![](https://ps.w.org/katex/assets/icon.svg?rev=1993573)
 * [KaTeX](https://wordpress.org/plugins/katex/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/katex/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/katex/)
 * [Active Topics](https://wordpress.org/support/plugin/katex/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/katex/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/katex/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tom Churchman](https://wordpress.org/support/users/beskhue/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/aligning-on/#post-12616964)
 * Status: resolved