When trying to write a mathematical symbol using the regular font (i.e not italics) in math-mode as displayed in the following MWE
\documentclass[english, 12pt, a4paper, elec, utf8, a-1b]{mythesis}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{amsfonts,amssymb,amsbsy}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{nccmath}
\usepackage{graphicx}
\usepackage{tabu}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage[lofdepth,lotdepth]{subfig}
\usepackage{booktabs}
\begin{document}
...equipped with a 50$\textrm{\mu}$m slit...
\end{document}
a error is produced saying:
Missing $ inserted.
<inserted text>
$
l.684 ... equipped with a 50$\textrm{\mu}$m slit, and...
I am trying to compile the file using PdfLaTeX, and haven't found anything indicating that it shouldn't work. I have also tried deleting corrupted aux files and tried using \text{} instead of \textrm{} but the same error is produced. I have also tried using \mathrm{} but in my case the font remains the same as it would regularly be in math mode.
To reiterate, how can I write a mathematical symbol in a regular font when \text, \textrm, \mathrm{} are not working? Is there another method to write mathematical symbols in a regular font?
Thanks already in advance :)
\muin math mode, not in\textrm{}. – May 17 '18 at 14:15\mathrmfor math mode, but that does not work for\mu(it doesn't produce an error like$\textrm{\mu}$does, but the output is not what you expected). I agree with Ulrike that you are quite probably looking forsiunitx:\usepackage{siunitx}and then\SI{50}{\micro\metre}. – moewe May 17 '18 at 14:19