# Plus minus sign in a latex or a text

**URL:** <https://root-forum.cern.ch/t/plus-minus-sign-in-a-latex-or-a-text/47239>\
**Category:** Newbie\
**Created:** [October 14, 2021, 11:53am UTC](https://root-forum.cern.ch/t/plus-minus-sign-in-a-latex-or-a-text/47239 "2021-10-14T11:53:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![spyhunter01](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/spyhunter01/32/23019_2.png) [@spyhunter01](https://root-forum.cern.ch/u/spyhunter01)\
**Post date:** [October 14, 2021, 11:53am UTC](https://root-forum.cern.ch/t/plus-minus-sign-in-a-latex-or-a-text/47239/1 "2021-10-14T11:53:04Z")

</div>

Dear all,

Can you please tell me how to make ± or -+ sign together in a text before I get crazy 🙂 ?  
Appreciated in advance.

I used to write things like : Form("%3.2f^{#circ}", 455.34556), but now this Form method in TLatex doesn’t wok. #pm doesn’t work in the example below.  
cout \<\< “Integral: “\<\< 100\<\<Form(”/pm”)\<\< 5\<\< endl;  
cout \<\< “Integral: “\<\< 100\<\<Form(”#pm”)\<\< 5\<\< endl;  
cout \<\< “Integral: “\<\< 100\<\<”#pm”\<\< 5\<\< endl;  
…

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [October 14, 2021, 11:59am UTC](https://root-forum.cern.ch/t/plus-minus-sign-in-a-latex-or-a-text/47239/2 "2021-10-14T11:59:30Z")

</div>

```auto
void pm(){
   cout << "Integral:" << 100<< "±" << 5<< endl;
}

```

gives:

```auto
root [1] .x pm.C
Integral:100±5

```

Note: TLatex “#pm” is for graphics only.

---

<div class="post-metadata">

**Author:** ![spyhunter01](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/spyhunter01/32/23019_2.png) [@spyhunter01](https://root-forum.cern.ch/u/spyhunter01)\
**Post date:** [October 14, 2021, 3:38pm UTC](https://root-forum.cern.ch/t/plus-minus-sign-in-a-latex-or-a-text/47239/3 "2021-10-14T15:38:56Z")

</div>

Thanks.  
That’ s painful and shame! ☹

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [October 14, 2021, 3:49pm UTC](https://root-forum.cern.ch/t/plus-minus-sign-in-a-latex-or-a-text/47239/4 "2021-10-14T15:49:44Z")

</div>

> [@spyhunter01](#):
>
> That’ s painful and shame!

What do you mean ? graphics text on a canvas is not the same as the characters you get on terminal.

---

<div class="post-metadata">

**Author:** ![spyhunter01](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/spyhunter01/32/23019_2.png) [@spyhunter01](https://root-forum.cern.ch/u/spyhunter01)\
**Post date:** [October 14, 2021, 4:56pm UTC](https://root-forum.cern.ch/t/plus-minus-sign-in-a-latex-or-a-text/47239/5 "2021-10-14T16:56:13Z")

</div>

I mean I wish only #pm should have worked. Anyway, this is what it is.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [October 15, 2021, 6:47am UTC](https://root-forum.cern.ch/t/plus-minus-sign-in-a-latex-or-a-text/47239/6 "2021-10-15T06:47:50Z")

</div>

TLatex allows to draw math formulae on screen . It has the LaTeX syntax.  
The text on the terminal is not at all the same, you cannot have math formulae there.  
Each character is defined by its code. You can do the opposite using [TMathText](https://root.cern/doc/master/classTMathText.html) (available also via TLatex) ie: use special characters on graphics rendering.

---

<div class="post-metadata">

**Author:** ![Martha\_Simons](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/martha_simons/32/19411_2.png) [@Martha\_Simons](https://root-forum.cern.ch/u/Martha_Simons)\
**Post date:** [December 24, 2025, 12:27pm UTC](https://root-forum.cern.ch/t/plus-minus-sign-in-a-latex-or-a-text/47239/8 "2025-12-24T12:27:30Z")

</div>

> [@spyhunter01](#):
>
> That’ s painful and shame! [☹](https://rickycasino.bet/en-au)

Using the Unicode hex code `\u00B1` for the console is often safer than copy-pasting the symbol if you’re worried about source file encoding (UTF-8 vs Latin-1). ``
