[Tex/LaTex] Error Message – Undefined control sequence

errors

I am using the Overleaf web site to put together an article, and this uses this code. I am getting the error I posted below and have not idea what to, any help would be great, not sure why even need to mess with code to do this! :/

Thanks!

Undefined control sequence.
\u-default-956 #1->\textmu 

l.31 ...Pressure mode with an aperture of 30.00 μ
                                                  m, and a voltage of 10 kV....

Best Answer

The error message tells you are using Unicode input encoding via package ucs and option utf8x of package inputenc. If you do not need ucs special features, then \usepackage[utf8]{inputenc} is the more common way.

The μ from the input is mapped to \textmu, which is not provided yet. Package textcomp provides it, for example, as suggested in Ruben's comment.

A more powerful way setting units is provided by package siunitx. It also takes care of the space between number and unit and prevents a line break between them.

\usepackage{siunitx}
\SI{30.00}{\micro\meter} ... \SI{10}{\kilo\volt}

Full example and my suggestion:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}

\begin{document}
  Pressure mode with an aperture of \SI{30.00}{\micro\meter},
  and a voltage of \SI{10}{\kilo\volt} \dots
\end{document}

Result

Or keeping units manually, keeping ucs and adding textcomp, the example would be:

\documentclass{article}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage{textcomp}

\begin{document}
  Pressure mode with an aperture of 30.00\,μm,
  and a voltage of 10\,kV \dots
\end{document}

Result

The \, sets a small non-breakable space, often set between the numbers and their units. The tilde ~ sets a normal non-breakable space.