Actually, in some my texts (exercises) I intensively use normalized
frequencies like $0,25\pi$ rad/s or \pi/8 s^{-1} etc, so I will be very
happy if I can write math expression in \SI (which now allows only pure
numbers) or in special defined environment (like \unit in SIunit package)
regards, Zarko
See for example p.42 of the current (v1.2) manual
\documentclass{article}
\usepackage{siunitx}
\begin{document}
\num[numaddn=\pi]{4\pi e-7}
\SI[numaddn=\pi]{4\pi e-7}{\henry\per\ampere}
\end{document}
(You may need to watch your fonts here: it is a bit awkward to cover
every circumstance.)
--
Joseph Wright
Draer Joseph Wright,
thank you very much for your answer. I will test above possibilities it
when Miktex will include last version of siunitx package (I don't prefer
manual upgrading of particular packages in MikTeX).
Regards, Zarko
This should work fine in every release version of siunitx. It's just
that the page in the manual varies from release to release!
--
Joseph Wright
Well, i didn't find this option in old manual, so I think that this
possibility is new in latest version of siunitx ...
and indeed, there is mess with characters or with encoding. Instead of
\pi it appear as German character for ss. I use the following fonts and
encodings:
\usepackage[T1]{fontenc}\usepackage[cp1250]{inputenc}
\usepackage[slovene]{babel}
\usepackage{palatino,mathpazo,marvosym,pifont}
\usepackage[scaled=0.88]{helvet}
what to do?
regards, Zarko
This is a known issue, and I'm a bit limited on what I can do "out of
the box", as there are issues with different combinations of mode,
fonts, etc. For your case, I'd do:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[cp1250]{inputenc}
\usepackage[slovene]{babel}
\usepackage{mathpazo,marvosym,pifont} % mathpazo covers palatino
\usepackage[scaled=0.88]{helvet}
\usepackage{siunitx}
\protected\def\SIpi{\mathnormal\pi}
\sisetup{numaddn=\SIpi}
\begin{document}
\num{4\SIpi e-7}
\SI{4\SIpi e-7}{\henry\per\ampere}
% Or redefine \pi
\let\SIpi\pi
\protected\def\pi{\mathnormal\SIpi}
\sisetup{numaddn=\pi}
\num{4\pi e-7}
\SI{4\pi e-7}{\henry\per\ampere}
$\pi r^2$
\end{document}
--
Joseph Wright
Thank you very much!
Above option work fine, but with second one I receive error: \pi already
defined. Maybe I miss something, so I will give another try after more
carefully reading of documentation for siunitx!
>
> % Or redefine \pi
> \let\SIpi\pi
> \protected\def\pi{\mathnormal\SIpi}
> \sisetup{numaddn=\pi}
> \num{4\pi e-7}
> \SI{4\pi e-7}{\henry\per\ampere}
> $\pi r^2$
> \end{document}
regards, Zarko
Should be nothing to do with siunitx (I hope). Did you use my example
exactly? What does \listfiles say? I get:
*File List*
article.cls 2005/09/16 v1.4f Standard LaTeX document class
size10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
inputenc.sty 2006/05/05 v1.1b Input encoding file
cp1250.def 2006/05/05 v1.1b Input encoding file
babel.sty 2008/07/06 v3.8l The Babel package
bblopts.cfg 2006/07/31 v1.0 MiKTeX 'babel' configuration
slovene.ldf 2005/03/31 v1.2m Slovene support from the babel system
mathpazo.sty 2005/04/12 PSNFSS-v9.2a Palatino w/ Pazo Math (D.Puga, WaS)
marvosym.sty 2006/05/11 v2.1 Martin Vogel's Symbols font definitions
pifont.sty 2005/04/12 PSNFSS-v9.2a Pi font support (SPQR)
upzd.fd 2001/06/04 font definitions for U/pzd.
upsy.fd 2001/06/04 font definitions for U/psy.
helvet.sty 2005/04/12 PSNFSS-v9.2a (WaS)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
siunitx.sty 2008/12/22 v1.1j A comprehensive (SI) units package
xkeyval.sty 2008/08/13 v2.6a package option processing (HA)
xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)
amstext.sty 2000/06/29 v2.01
amsgen.sty 1999/11/30 v2.0
array.sty 2005/08/23 v2.4b Tabular extension package (FMi)
xspace.sty 2006/05/08 v1.12 Space after command names (DPC,MH)
si-prefix.cfg 2008/12/22 v1.1j siunitx: SI Multiple prefixes
si-named.cfg 2008/12/22 v1.1j siunitx: SI Named units
si-addn.cfg 2008/12/22 v1.1j siunitx: SI Additional units
si-prefixed.cfg 2008/12/22 v1.1j siunitx: SI Prefixed units
si-accepted.cfg 2008/12/22 v1.1j siunitx: SI Accepted units
si-physical.cfg 2008/12/22 v1.1j siunitx: SI Physically-measured units
si-abbr.cfg 2008/12/22 v1.1j siunitx: Abbreviated units
ts1cmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
t1ppl.fd 2001/06/04 font definitions for T1/ppl.
ot1ppl.fd 2001/06/04 font definitions for OT1/ppl.
omlzplm.fd 2002/09/08 Fontinst v1.914 font definitions for OML/zplm.
omszplm.fd 2002/09/08 Fontinst v1.914 font definitions for OMS/zplm.
omxzplm.fd 2002/09/08 Fontinst v1.914 font definitions for OMX/zplm.
ot1zplm.fd 2002/09/08 Fontinst v1.914 font definitions for OT1/zplm.
(Note that this is the latest MiKTeX version of siunitx, rather than the
most recent one to CTAN.)
If things are still odd, please post your log for *exactly* my test file.
--
Joseph Wright
[...]
Sorry for latte response. my internet provider has some difficulties
with his news server ...
I found a cause of error: \pi already define. It was order of definition
and packages. I have siunitx and definition of \pi before of package
mathpazo. When I put the mathpazo on the top, error disappear.
Thank you very much for your help and great package!
regards, Zarko