0

I am using the siunitx package to manage unit spacing in my text, but I just realized that it is not working properly when used in the references (using BibTex). TeXmaker does not through any errors or warnings when compiling either the .bib or the .tex. Am I missing something?

Example:

...
title = "Far-infrared surface-plasmon quantum-cascade lasers at $\SI{21.5}{\mu m}$ and $\SI{24}{\mu m}$ wavelengths",
...

Comes out as:

enter image description here

10
  • Please provide a fully compilable example, then it is a lot easier to help.
    – daleif
    Oct 4, 2015 at 19:14
  • That is not the correct way to use siunitx, does \micro\metre make a difference?
    – daleif
    Oct 4, 2015 at 19:23
  • It works fine in the body of the document. I tried \micro\metre and got 4 errors ! Undefined control sequence.\micro ...
    – cvb0rg
    Oct 4, 2015 at 19:28
  • You have to use it inside the second argument of \SI{} {} of course.
    – daleif
    Oct 4, 2015 at 19:31
  • That was what I did, got the control sequence error.
    – cvb0rg
    Oct 4, 2015 at 19:34

1 Answer 1

2

Two things here.

  1. You should use \micro\metre not \mu m
  2. Since bibtex styles may alter casing in titles it may be necessary to use {\SI{2.5}{\micro\metre}} to protect it.

The reason why you got an error, is that the title casing done by bibtex leaves you with \si{2.5}{\micro\metre} but the \si command only takes one argument, so the other bleeds into the main doc where \micro is not defined

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .