# Center equation consisting of LaTeX and Julia in Pluto markdown

**URL:** <https://discourse.julialang.org/t/center-equation-consisting-of-latex-and-julia-in-pluto-markdown/73758>\
**Category:** General Usage\
**Tags:** pluto-markdown\
**Created:** [December 29, 2021, 2:19pm UTC](https://discourse.julialang.org/t/center-equation-consisting-of-latex-and-julia-in-pluto-markdown/73758 "2021-12-29T14:19:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [December 29, 2021, 2:19pm UTC](https://discourse.julialang.org/t/center-equation-consisting-of-latex-and-julia-in-pluto-markdown/73758/1 "2021-12-29T14:19:11Z")

</div>

Hi all,

I am trying to center align an equation in Pluto. Here is a MWE:

```julia
md"
 $\theta =$ $(string(round.(rand(3), digits = 3))) 
"

```

The equation is left justified. I tried bringing in html to center it, but to no avail. Is there a solution?

Thanks!

---

<div class="post-metadata">

**Author:** ![runjaj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/runjaj/32/23628_2.png) [@runjaj](https://discourse.julialang.org/u/runjaj)\
**Post date:** [December 30, 2021, 9:05am UTC](https://discourse.julialang.org/t/center-equation-consisting-of-latex-and-julia-in-pluto-markdown/73758/2 "2021-12-30T09:05:21Z")

</div>

One solution is using CommonMark and html:

```julia
using CommonMark

```

```julia
cm"""
<div align="center">

``\theta =`` $(string(round.(rand(3), digits = 3)))

</div>
"""

```

 ![center_eq_pluto](https://global.discourse-cdn.com/julialang/original/3X/4/e/4e0c4c69526531d1f36334ec4c7730f34043dbbb.png)

---

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [December 30, 2021, 9:28am UTC](https://discourse.julialang.org/t/center-equation-consisting-of-latex-and-julia-in-pluto-markdown/73758/3 "2021-12-30T09:28:25Z")

</div>

Thank you! It looks like what I was missing was CommonMark.

---

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [December 30, 2021, 9:53am UTC](https://discourse.julialang.org/t/center-equation-consisting-of-latex-and-julia-in-pluto-markdown/73758/4 "2021-12-30T09:53:04Z")

</div>

By the way, I experienced strange behavior while editing code within the `cm""" """` block. My cursor jumped around to different places and some of my changes disappeared upon pressing ctrl + enter. My workaround was to add the `cm""" """` after all of my code was entered. If there is a place to report this behavior, I would be willing to open an issue.
