# \`\\boldsymbol\` in \`Latexify\`

**URL:** <https://discourse.julialang.org/t/boldsymbol-in-latexify/119489>\
**Category:** General Usage\
**Created:** [September 17, 2024, 10:18am UTC](https://discourse.julialang.org/t/boldsymbol-in-latexify/119489 "2024-09-17T10:18:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PatrickHaecker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/patrickhaecker/32/222891_2.png) [@PatrickHaecker](https://discourse.julialang.org/u/PatrickHaecker)\
**Post date:** [September 17, 2024, 10:18am UTC](https://discourse.julialang.org/t/boldsymbol-in-latexify/119489/1 "2024-09-17T10:18:50Z")

</div>

I am probably missing something simple, but typing a lot of `LaTeX` in markdown strings seems to be harder than it needs to be when `Latexify` exists.

Therefore, is there a simpler way to output

```julia
using Markdown
md"""
``
\boldsymbol{Σ}^{-1} = \begin{bmatrix}\frac{\min(σ_1, σ_2)}{σ_1} & 0 \\ 0 & \frac{\min(σ_1, σ_2)}{σ_2}\end{bmatrix}
``
"""

```

which prints  
 ![grafik](https://global.discourse-cdn.com/julialang/original/3X/5/f/5f0d077ba6c139780e62f57fd59f44e95b37cd9f.png)

using `Latexify`? I came up with the following, but I wasn’t able to include `\boldsymbol`

```julia
using Latexify
@latexify Σ^(-1) = [min(σ_1, σ_2)/σ_1 0; 0 min(σ_1, σ_2)/σ_2]

```

and therefore this prints  
 ![grafik](https://global.discourse-cdn.com/julialang/original/3X/8/1/815a4bcf6ff7bb25a90724197c71d984f0ec3da8.png)

So how to use `\boldsymbol` in `Latexify`?

---

<div class="post-metadata">

**Author:** ![PatrickHaecker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/patrickhaecker/32/222891_2.png) [@PatrickHaecker](https://discourse.julialang.org/u/PatrickHaecker)\
**Post date:** [September 18, 2024, 9:21am UTC](https://discourse.julialang.org/t/boldsymbol-in-latexify/119489/2 "2024-09-18T09:21:11Z")

</div>

@korsbo May I kindly ask if you have any insights as the package author? If it’s just not possible, that would also be a valuable information.

---

<div class="post-metadata">

**Author:** ![fgerick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fgerick/32/13228_2.png) [@fgerick](https://discourse.julialang.org/u/fgerick)\
**Post date:** [September 18, 2024, 9:41am UTC](https://discourse.julialang.org/t/boldsymbol-in-latexify/119489/3 "2024-09-18T09:41:17Z")

</div>

you can use `\bfSigma<tab>` to get this

```julia
@latexify 𝚺^(-1) = [min(σ_1, σ_2)/σ_1 0; 0 min(σ_1, σ_2)/σ_2]

```

which gives

```julia
L"$\mathbf{\Sigma}^{-1} = \left[
\begin{array}{cc}
\frac{\mathrm{min}\left( \sigma_{1}, \sigma_{2} \right)}{\sigma_{1}} & 0 \\
0 & \frac{\mathrm{min}\left( \sigma_{1}, \sigma_{2} \right)}{\sigma_{2}} \\
\end{array}
\right]$"

```

It’s not `\boldsymbol{\Sigma}`, but I think for this example it’s the same?

It doesn’t work for example for `\bfnabla`:

```julia
julia> @latexify 𝛁∇
L"$\mathbf{\nabla}\nabla$"

```

since `\mathbf{\nabla}` is the same as `\nabla`

---

<div class="post-metadata">

**Author:** ![PatrickHaecker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/patrickhaecker/32/222891_2.png) [@PatrickHaecker](https://discourse.julialang.org/u/PatrickHaecker)\
**Post date:** [September 18, 2024, 10:17am UTC](https://discourse.julialang.org/t/boldsymbol-in-latexify/119489/4 "2024-09-18T10:17:27Z")

</div>

> [@fgerick](#):
>
> `\bfSigma<tab>`

Wow, I didn’t know that this is possible. In my case it’s `\biSigma<tab>` (bold and italic due to being variable).  
Thank you very much, this is a more elegant solution than I had hoped for!
