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.

The following code isn't valid but conveys my intention:

\SI{}{\micro\molar}

as in micro followed by a big M. I don't want to use the explicit form of micro moles per L raised to the negative one in this case.

share|improve this question
2  
See groups.google.com/group/comp.text.tex/browse_thread/thread/… for a near-identical question posed earlier today on comp.text.tex and an answer by Joseph Wright. –  Mico Sep 6 '11 at 0:10
    
Which I quoted in my answer. :-) –  Alan Munn Sep 6 '11 at 0:42
    
The timing is truly a remarkable coincidence! Given this is a relatively obscure question too. –  ptrcao Sep 6 '11 at 3:24

2 Answers 2

up vote 18 down vote accepted

Joseph Wright just answered a similar question on comp.text.tex:

Take a look at the section 'loading additional units' in the manual. In version 1, I did include \molar and \Molar, but tightened up on sticking to SI units (almost) exclusively for version 2. The suggested definitions are

\DeclareSIUnit\molar{\mole\per\cubic\deci\metre}
\DeclareSIUnit\Molar{\textsc{m}}
share|improve this answer
    
So do I have to declare M myself, is that what this means? –  ptrcao Sep 6 '11 at 0:59
    
Yes. Using the second definition will then provide a \Molar command that can be used like any other regular SI units. So in your example, you would write \SI{}{\micro\Molar} to get the output you asked for. –  Alan Munn Sep 6 '11 at 1:03
    
Where do I put the custom file siunitx.cfg? –  ptrcao Sep 6 '11 at 1:05
    
I would put it in <path-to-local-texmf>/tex/latex/siunitx. (i.e. your local texmf directory.) –  Alan Munn Sep 6 '11 at 1:09
1  
@ptrcao Take a look at this question: Where do I place my own .sty files. You need to put them in your local texmf folder, not in C:\texlive... –  Alan Munn Sep 6 '11 at 2:53

According to the siunitx manual (page 14), you can create your own units easily by putting the following command in the preamble:

\DeclareSIUnit{\molar}{M}
share|improve this answer
    
Whenever I put that command in the preamble, I get an ``undefined control sequence'' error. Do you know what could be the problem? –  Nick Thompson Jan 12 '13 at 23:09
    
@NickThompson: Are you including the siunitx package? –  You Jan 13 '13 at 8:56

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.