3

I haven't informed myself a lot about the utf8x option of the inputenc package, other than it seems it should be avoided. Still, I've come across a weird behaviour with a directly-input micro symbol (µ):

\documentclass{standalone}
\usepackage[utf8]{inputenc} % change to [utf8x]

\usepackage{libertine}
\usepackage[libertine]{newtxmath}
\usepackage{siunitx}

\begin{document}
µ \(\mu\)\si{\micro} 
\end{document}

Which produces this with utf8:

utf8 output

And this with utf8x:

utf8x output

Which means that it remaps the micro symbol µ from the keyboard to an italic greek mu. Linux Libertine has a distinct micro symbol with rounded descender:

Linux Libertine micro vs mu

It would be great to know the reason(s) for this. In any case, this question would serve for anybody who stumbled on this behaviour as well.

lblb
  • 3,454

1 Answers1

3

The standard utf8 option maps µ to \textmu but the contributed utf8x option maps it to \ensuremath {\mu}

David Carlisle
  • 757,742
  • This is obvious from my examples, but do you know why? My examples show clearly that µ and \mu should not be interchanged like that. – lblb Apr 11 '17 at 18:49
  • 1
    @lblb I don't see why it's obvious that it goes through those macros just from looking at an image? (that is actually defined in terms of \ensuremath{\mu} rather than just ending up looking the same? There is no why to answer "why?" other than ask the authors of the utf8x version, they just chose to define it that way. Of course if you target a very minimal tex distribution with only cm fonts then math is the only way to get Greek so perhaps \ensuremath{\mu} comes from that mindset. – David Carlisle Apr 11 '17 at 18:59
  • Thanks for clarifying why it might have been defined that way. I'm not familiar enough with different typefaces to know what glyphs might be unavailable. Sorry, my "obvious" comment wasn't worded well. What I meant was that with Linux Libertine in my examples, one could see that it is greek because of the descender shape, which might be less visible with other fonts. You are right though: I can't see the math mode from the screenshots. – lblb Apr 11 '17 at 19:04
  • 1
    @lblb both utf8 and utf8x do not distinguish micro (µ) from mu (μ) just that one uses a text font and the other math. – David Carlisle Apr 11 '17 at 19:05