# Interpolate LaTeX and function call in markdown

**URL:** <https://discourse.julialang.org/t/interpolate-latex-and-function-call-in-markdown/72833>\
**Category:** General Usage\
**Tags:** markdown, pluto\
**Created:** [December 9, 2021, 3:23pm UTC](https://discourse.julialang.org/t/interpolate-latex-and-function-call-in-markdown/72833 "2021-12-09T15:23:02Z")\
**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 9, 2021, 3:23pm UTC](https://discourse.julialang.org/t/interpolate-latex-and-function-call-in-markdown/72833/1 "2021-12-09T15:23:02Z")

</div>

Hi all,

I was wondering how I can interpolate LaTeX and a function call in Pluto’s markdown.

Suppose I have one cell

`θ = 1/3`

And a markdown cell:

```julia
md"
$\theta =$ = $round(θ, digits=2)
"

```

I tried adding \ in several places, but nothing worked. Essentially, I would like to display a math symbol with a limited number of digits for its value.

Thank you.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [December 9, 2021, 3:54pm UTC](https://discourse.julialang.org/t/interpolate-latex-and-function-call-in-markdown/72833/2 "2021-12-09T15:54:30Z")

</div>

Isn’t your problem just that you’re not interpolating correctly?

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/0/c083b4f5f4b10e527c0d9c8aaa5b2b28287c4768.png)

`$` is eager, so you have to enclose anything more than the shortest complete statement in brackets if you want to interpolate it as a whole.

---

<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 9, 2021, 3:59pm UTC](https://discourse.julialang.org/t/interpolate-latex-and-function-call-in-markdown/72833/3 "2021-12-09T15:59:48Z")

</div>

Thank you. That was exactly what I was missing. Much appreciated!

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [December 9, 2021, 4:02pm UTC](https://discourse.julialang.org/t/interpolate-latex-and-function-call-in-markdown/72833/4 "2021-12-09T16:02:06Z")

</div>

This is an issue with `TeX` syntax. If `Markdown` (only) used `LaTeX`’s `\( x\)`, this would be solved.

Sometimes it helps to use `Markdown.parse("string")` so you can escape explicitly.
