# How to format text in annotation

**URL:** <https://community.plotly.com/t/how-to-format-text-in-annotation/10586>\
**Category:** 📊 Plotly Python\
**Created:** [May 30, 2018, 1:07pm UTC](https://community.plotly.com/t/how-to-format-text-in-annotation/10586 "2018-05-30T13:07:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbosc](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@nbosc](https://community.plotly.com/u/nbosc)\
**Post date:** [May 30, 2018, 1:07pm UTC](https://community.plotly.com/t/how-to-format-text-in-annotation/10586/1 "2018-05-30T13:07:36Z")

</div>

Hi,

In this [example](https://plot.ly/python/linear-fits/), I assume you have formatted the string using $$. When I run this example, if I use the same syntax the annotation is not displayed. If I remove the $$ the annotation is displayed but in a rather basic format.

What are the $ format and why it is not working?

Cheers

---

<div class="post-metadata">

**Author:** ![Blaceus](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/blaceus/32/2992_2.png) [@Blaceus](https://community.plotly.com/u/Blaceus)\
**Post date:** [May 30, 2018, 2:30pm UTC](https://community.plotly.com/t/how-to-format-text-in-annotation/10586/2 "2018-05-30T14:30:11Z")

</div>

I do not know why you are not seeing the same annotation as the example. However, the $ symbols are there to tell plotly that you are using a LaTeX typesetting for the string you are creating.  
See: [https://plot.ly/python/LaTeX/](https://plot.ly/python/LaTeX/)

---

<div class="post-metadata">

**Author:** ![nbosc](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@nbosc](https://community.plotly.com/u/nbosc)\
**Post date:** [May 30, 2018, 2:49pm UTC](https://community.plotly.com/t/how-to-format-text-in-annotation/10586/3 "2018-05-30T14:49:40Z")

</div>

When I look at your example, the text in the hovering looks like this:  
 ![42](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/1/1476f0ac29c0c202ecc1f74b59530fc6db6d31df.png)

Is it what is expected?

---

<div class="post-metadata">

**Author:** ![jmmease](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jmmease/32/3706_2.png) [@jmmease](https://community.plotly.com/u/jmmease)\
**Post date:** [June 7, 2018, 10:58am UTC](https://community.plotly.com/t/how-to-format-text-in-annotation/10586/4 "2018-06-07T10:58:03Z")

</div>

Hi @nbosc,

You may want to keep an eye on [https://github.com/plotly/plotly.py/issues/515](https://github.com/plotly/plotly.py/issues/515), it looks like there are several issues cropping up with latex typesetting in various contexts.
