## LaTeX forum ⇒ Math & Science ⇒ Use special character as a variable in a formula Topic is solved

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
3102
Posts: 1
Joined: Sun Apr 20, 2014 2:28 pm

### Use special character as a variable in a formula

If i write $t=a$ in LaTex, I get "t = a". If I write $t=?$ I get "t =?" but I want to get "t = ?". The ? shall have the same distance from the equals sign as any other variable or letter. Is there a way to to treat the "?" the same way as any other letter in a formula?

To make clear how $t=a$ and t=? look like, I have added a screenshot.
Attachments
picture1.JPG (13 KiB) Viewed 2221 times

Johannes_B
Site Moderator
Posts: 4186
Joined: Thu Nov 01, 2012 4:08 pm
A quick and dirty hack would be to set the space by hand.

\documentclass{article}\usepackage{mathtools}\newcommand{\iswhat}{\;?}\begin{document}$t=a$\par$t=?$\par$t=\iswhat$\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm
Other possibilities are
$t=\mathord{?}$

and
$t={}?$