LaTeX forum ⇒ Fonts & Character SetsWhat is wrong with microtype in this code? Topic is solved

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
User avatar
Cham
Posts: 894
Joined: Sat Apr 02, 2011 4:06 pm

What is wrong with microtype in this code?

Postby Cham » Mon Jun 11, 2018 9:39 pm

I'm getting several warnings in the console during compilation of this MWE code:
  1. \RequirePackage[l2tabu,orthodox]{nag}
  2. \documentclass[11pt,twoside]{book}
  3. \usepackage{microtype}
  4. \usepackage{amsmath}
  5. \usepackage[separate-uncertainty=true]{siunitx}
  6.  
  7. \begin{document}
  8.  
  9. Blabla :
  10. \begin{align*}
  11. \si{\nano} (\text{nano}) &= \num{e-9}, \\[6pt]
  12. \si{\micro} (\text{micro}) &= \num{e-6}, \\[6pt]
  13. \end{align*}
  14.  
  15. \end{document}


Here are the warnings I'm getting after compilation:
Package microtype Warning: Unknown slot number of character
(microtype) `\textminus '
(microtype) in font encoding `TS1' in protrusion list
(microtype) `textcomp'.

Package microtype Warning: Unknown slot number of character
(microtype) `\texttrademark '
(microtype) in font encoding `TS1' in protrusion list
(microtype) `textcomp'.

Package microtype Warning: Unknown slot number of character
(microtype) `\textcopyright '
(microtype) in font encoding `TS1' in protrusion list
(microtype) `textcomp'.

Package microtype Warning: Unknown slot number of character
(microtype) `\textregistered '
(microtype) in font encoding `TS1' in protrusion list
(microtype) `textcomp'.

Package microtype Warning: Unknown slot number of character
(microtype) `\textdegree '
(microtype) in font encoding `TS1' in protrusion list
(microtype) `textcomp'.


I don't understand what's going on here. I don't see what I have done wrong. How can I fix that code?

User avatar
Cham
Posts: 894
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Tue Jun 12, 2018 2:17 am

There's another description of this problem here :

https://tex.stackexchange.com/questions ... s-warnings

It's indeed the micro symbol (weird shape of \mu) that causes the warnings.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Jun 12, 2018 1:33 pm

Hi Cham,

indeed, and simply loading the textcomp package fixes it, since siunitx supports textcomp symbols.

\usepackage{textcomp}

Stefan
Site admin

User avatar
Cham
Posts: 894
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Tue Jun 12, 2018 2:02 pm

What difference may I see if I load textcomp ?

User avatar
Stefan Kottwitz
Site Admin
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Jun 12, 2018 2:18 pm

The warnings go away, microtype can work with it, and proper fonts are used.

Otherwise, without textcomp, siunitx just uses its own symbols, that's more a workaround by this package.

Stefan
Site admin

User avatar
Cham
Posts: 894
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Tue Jun 12, 2018 2:45 pm

I mean will I see any differences in the main text and equations that aren't using any siunitx commands ?

User avatar
Stefan Kottwitz
Site Admin
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Jun 12, 2018 4:00 pm

Probably not!

textcomp only provides additional symbols, for example, math symbols (arrows, delimiters), currency symbols, diacritics, and greek symbols that can be used in text mode. I would use it by default, just in case. The author of siunitx (Joseph, he is a moderator here on latex.org btw.) would prefer textcomp too, but he did not want to enforce users to load it so he provides some symbols, such as the micro symbol, himself.

If you did not use it before, you won't see a difference.

Stefan
Site admin

User avatar
Cham
Posts: 894
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Tue Jun 12, 2018 4:18 pm

Thanks. I will keep it then.

Case is solved. :)


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 2 guests