Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using TeXnicCenter for Windows (7) and I'm a bloody beginner in everything that concerns LaTeX. I'm using the siunitx package for mathematical formulas and it works just fine... with one exception. The \micro (e.g. \si{\micro}) command doesn't work! It simply doesn't show the µ in the PDF file. I've tried to use \u as well without success. Does anybody know what the error could be?

share|improve this question
8  
\micro is not a unit (it is a quantifier), it is hardly ever written on its own. Have you tried \si{\micro\metre}? –  daleif Nov 7 '11 at 14:52
3  
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. –  N.N. Nov 7 '11 at 14:52
    
@daleif Sounds like an answer to me ... –  Joseph Wright Nov 7 '11 at 16:51
3  
@Chris: As daleif has already said, \micro is a prefix and will print 'µ', while something like \micro\metre is a prefixed unit and will print 'µm'. Your comments on Marco's answer indicate that there is something else up, but without a minimal example it's not really possible to give any more advice. –  Joseph Wright Nov 8 '11 at 8:46
    
PS: Maybe you want to switch from TXC to TexMaker‌​, because TXC 1 does not support UTF-8 (TXC 2 will) but TexMaker does. Plus TexMaker is available for Win, Linux and Mac. –  matth Nov 10 '11 at 15:53

3 Answers 3

I’ll throw this in here, as my search for a solution led me here, but my problem was another one.

Using XeTeX and Latin Modern, I found that the greek letter μ does not work. However, the Unicode micro sign μ does work.

Knowing that, I added \sisetup{math-micro=\text{µ},text-micro=µ}, and now all seems well.

To clarify, use

µ
MICRO SIGN
Unicode: U+00B5, UTF-8: C2 B5

and not

μ
GREEK SMALL LETTER MU
Unicode: U+03BC, UTF-8: CE BC

for great justice.

MWE for my setup (XeTeX on OS X):

\documentclass{standalone}
\usepackage{fontspec}
\usepackage{siunitx}
% Note that the sign must be
%  µ
%  MICRO SIGN
%  Unicode: U+00B5, UTF-8: C2 B5
% and \emph{not}
%  μ
%  GREEK SMALL LETTER MU
%  Unicode: U+03BC, UTF-8: CE BC
\sisetup{math-micro=\text{µ},text-micro=µ}

\begin{document}
Now you can \si\micro\ all the things.
\end{document}

MWE screenshot

share|improve this answer
    
Nice one! It would be great if you can provide a 10-20 lines of compilable LaTeX file with this working in action. We usually even put a screenshot of the resulting file to show the effect in action. –  percusse May 8 '12 at 10:46
    
That is what I recommend in the manual :-) –  Joseph Wright May 8 '12 at 10:55
2  
@JosephWright When I copy the line from the manual, I get the greek letter. In fact, when I copy the one from my own document which is set up to use the micro sign, I also get the greek letter! Not sure why, but might be worth pointing out. :) –  nlogax May 8 '12 at 11:26
1  
@nlogax The document has to work with pdfLaTeX, so I can only use what is available there. I'm expecting people using XeLaTeX/LuaLaTeX to use their system character map application to sort this out. –  Joseph Wright May 8 '12 at 11:50
    
Thank you for your nice example! –  percusse May 8 '12 at 11:59

Here is a MWE which compiles fine, using the command @daleif suggested

\documentclass[a4paper,final]{article}

\usepackage[T1]{fontenc}
\usepackage[]{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}

\usepackage[]{siunitx}
\usepackage{textcomp}

\begin{document}

  Greek letter \textmu{} in normal text.
  Greek letter µ in normal text.
  The unit for viscosity is \si{\micro\pascal}.
  Just the \si{\micro} is not a SI unit but it works anyway.
  Some number with unit \SI{51}{\micro\metre} lorem ipsum.
  A number with unit in a formula $\SI{123}{\micro\metre}$ dolor sit amet.

\end{document}

As shown in the example, use \si for just units and capital \SI for a value-with-unit-combination.
And if you want a plain µ in the text, you could also try the command \textmu which is made available by the package \usepackage{textcomp}

share|improve this answer
5  
\si is for formatting units, \SI is for formatting a number-plus-unit combination (a 'quantity'). –  Joseph Wright Nov 8 '11 at 10:13
    
Thanks, I edited the text –  matth Dec 1 '11 at 17:02

Depending on which engine and encoding you use, you can just write a literal μ. Or you can typeset it in math mode as a variable $\mu$. It depends on what use the μ has in your document.

If it is a quantifier then add the corresponding unit as daleif already pointed out in the comment.

share|improve this answer
    
Thank you all, so the $\mu$ and the plain µ are both working. The \si{\micro\metre} doesn't :( The problem is that the two working methods return a µ. Is there a possibility to get a normal µ still? –  Chris Nov 7 '11 at 20:37
    
If a plain µ yields a slanted µ, then it seems that your font simply doesn't have an upright µ. What is the result of $\mathup\mu$? –  Marco Nov 7 '11 at 20:57
    
Again it returns only a µ. Is there no way to add an upright µ to my font? –  Chris Nov 7 '11 at 21:58
    
You don't really want to add a glyph to your font. But nothing prevents you from defining a command that inserts an upright µ from another font. –  Marco Nov 7 '11 at 22:02
    
Or you can use \DeclareUnicodeCharacter to automate this. Or see this or this –  Marco Nov 7 '11 at 22:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.