Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Package siunitx Error: Unit \rem already defined!

257 views
Skip to first unread message

Hongyi Zhao

unread,
Oct 21, 2008, 11:42:50 AM10/21/08
to
Dear Joseph and others,

When I include the siunitx in the preamble of my document, the LaTeX
give me the following complaints:

------------------------
! Package siunitx Error: Unit \rem already defined!.

See the siunitx package documentation for explanation.
Type H <return> for immediate help.
...

l.29 \newunit{\rem}{rem}

?
------------------------

Why does this happen? what should I do to workaround this issue?

Regards,
--
Hongyi Zhao <hongy...@gmail.com>
Xinjiang Technical Institute of Physics and Chemistry
Chinese Academy of Sciences

Joseph Wright

unread,
Oct 21, 2008, 12:23:40 PM10/21/08
to
On Oct 21, 4:42 pm, Hongyi Zhao <hongyi.z...@gmail.com> wrote:
> Dear Joseph and others,
>
> When I include the siunitx in the preamble of my document, the LaTeX
> give me the following complaints:
>
> ------------------------
> ! Package siunitx Error: Unit \rem already defined!.
>
> See the siunitx package documentation for explanation.
> Type  H <return>  for immediate help.
>   ...
>
> l.29 \newunit{\rem}{rem}
>
> ?
> ------------------------
>
> Why does this happen?  what should I do to workaround this issue?
>
> Regards,
> --
> Hongyi Zhao <hongyi.z...@gmail.com>

> Xinjiang Technical Institute of Physics and Chemistry
> Chinese Academy of Sciences

The unit "rem" is defined by si-addn.cfg:

\newunit{\rem}{rem}

So either:
1) Use \renewunit
or
2) Don't load si-addn.cfg (\usepackage[noload=addn]{siunitx}).
--
Joseph Wright

Joseph Wright

unread,
Oct 21, 2008, 12:25:06 PM10/21/08
to
On Oct 21, 5:23 pm, Joseph Wright <joseph.wri...@morningstar2.co.uk>
wrote:

It occurs to me that you might of course mean that you are not
defining \rem, but are just getting the warning. As I don't know what
else you are loading, I'm slightly stuck, My suggestion would
definitely be to use

\usepackage[noload=addn]{siunitx}

and see if it helps.
--
Joseph Wright

Hongyi Zhao

unread,
Oct 21, 2008, 10:48:23 PM10/21/08
to
On Oct 22, 12:25 AM +0800, Joseph Wright

In fact, I load many pckages and the \listfiles give me the results like
this:

----------------
*File List*
CASthesis.cls 2007/01/09 v0.1h CASthesis document class
ctexbook.cls 2007/05/06 v0.8a ctex document class
book.cls 2005/09/16 v1.4f Standard LaTeX document class
bk12.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
indentfirst.sty 1995/11/23 v1.03 Indent first paragraph (DPC)
type1cm.sty 2002/09/05 v0.04 BlueSky/Y&Y Type1 CM font definitions
(DPC, pa
tched RF)
fancyhdr.sty
ctexcjk.clo 2007/05/06 v0.8a ctex document class option
CJK.sty 2008/08/10 4.8.1
MULEenc.sty 2008/08/10 4.8.1
CJKnumb.sty 2008/08/10 4.8.1
CJKpunct.sty 2006/10/12 4.6.0
CJKfntef.sty 2008/08/10 4.8.1
CJKulem.sty 2008/08/10 4.8.1
ulem.sty 2000/05/26
ctex.def 2007/05/06 v0.8a ctex configuration file
ctexcap.cfg 2007/05/06 v0.8a ctex configuration file
ctex.cfg 2007/05/06 v0.8a ctex configuration file
amsmath.sty 2000/07/18 v2.13 AMS math features
amstext.sty 2000/06/29 v2.01
amsgen.sty 1999/11/30 v2.0
amsbsy.sty 1999/11/29 v1.2d
amsopn.sty 1999/12/14 v2.01 operator names
amsthm.sty 2004/08/06 v2.20
amsfonts.sty 2001/10/25 v2.2f
amssymb.sty 2002/01/22 v2.2d
bm.sty 2004/02/26 v1.1c Bold Symbol Support (DPC/FMi)
textcomp.sty 2005/09/27 v1.99g Standard LaTeX package
ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
threeparttable.sty 2003/06/13 v 3.0
booktabs.sty 2005/04/14 v1.61803 publication quality tables
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
dvipdfm.def 1999/9/6 vx.x Driver-dependant file
psfrag.sty 1998/04/11 v3.04 PSfrag (MCG)
ifpdf.sty 2007/12/12 v1.6 Provides the ifpdf switch (HO)
mathptmx.sty 2005/04/12 PSNFSS-v9.2a Times w/ Math, improved (SPQR, WaS)
courier.sty 2005/04/12 PSNFSS-v9.2a (WaS)
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)
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
hyperref.sty 2007/02/07 v6.75r Hypertext links for LaTeX
pd1enc.def 2007/02/07 v6.75r Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
kvoptions.sty 2007/10/18 v3.0 Keyval support for LaTeX options (HO)
url.sty 2006/04/12 ver 3.3 Verb mode for urls, etc.
hpdftex.def 2007/02/07 v6.75r Hyperref driver for pdfTeX
CASthesis.cfg 2007/01/09 v0.1h CASthesis configuration file
setspace.sty 2000/12/01 6.7 Contributed and Supported LaTeX2e package
glossaries.sty 2008/08/27 v1.16 (NLCT)
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
xkeyval.sty 2008/08/13 v2.6a package option processing (HA)
xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)
mfirstuc.sty 2008/06/18 v1.02 (NLCT)
xfor.sty 2007/08/21 v1.03 (NLCT)
glossary-hypernav.sty 2007/07/04 v1.01 (NLCT)
glossary-list.sty 2008/02/16 v1.03 (NLCT)
glossary-long.sty 2007/07/04 v1.01 (NLCT)
longtable.sty 2004/02/01 v4.11 Multi-page Table package (DPC)
glossary-super.sty 2007/07/04 v1.01 (NLCT)
supertabular.sty 2004/02/20 v4.1e the supertabular environment
chapter/glossary_entries.tex
ccaption.sty 2005/03/29 v3.2a Extended captioning and new floats
natbib.sty 2007/10/30 8.1 (PWD)
multibib2.sty 2004/01/28 v1.3 Multiple bibliographies for one document.
ccmap.sty 2006/11/18
ts1cmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
t1ptm.fd 2001/06/04 font definitions for T1/ptm.
color.sty 2005/11/14 v1.0j Standard LaTeX Color (DPC)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pdftex.def 2008/09/08 v0.04l Graphics/color for pdfTeX
supp-pdf.tex
nameref.sty 2006/12/27 v2.28 Cross-referencing by name of section
refcount.sty 2008/08/11 v3.1 Data extraction from references (HO)
template.out
template.out
GBKkern.cfg
c19song.fd 2007/12/07 4.7.0
c19hei.fd 2007/12/07 4.7.0
c19kai.fd 2007/12/07 4.7.0
ot1ztmcm.fd 2000/01/03 Fontinst v1.801 font definitions for OT1/ztmcm.
omlztmcm.fd 2000/01/03 Fontinst v1.801 font definitions for OML/ztmcm.
omsztmcm.fd 2000/01/03 Fontinst v1.801 font definitions for OMS/ztmcm.
omxztmcm.fd 2000/01/03 Fontinst v1.801 font definitions for OMX/ztmcm.
ot1ptm.fd 2001/06/04 font definitions for OT1/ptm.
c19fs.fd 2007/12/07 4.7.0
t1phv.fd 2001/06/04 scalable font definitions for T1/phv.
chapter/abstract.tex
c19rm.fd 2007/05/06 v0.8a ctex font definition file
t1pcr.fd 2001/06/04 font definitions for T1/pcr.
template.gls
chapter/prolegomenon.tex
ts1ptm.fd 2001/06/04 font definitions for TS1/ptm.
chapter/DFT-intro.tex
chapter/chap-math.tex
chapter/chap-tabfig.tex
figures/amss.eps
figures/amss.eps
figures/amss.eps
figures/amss.eps
chapter/chap-req.tex
template.bbl
chapter/pub.tex
mypub.aux
mypub.bbl
chapter/resume.tex
chapter/thanks.tex
***********
----------------

As for the complete log file, you can get it form my ftp server:

ftp://159.226.135.215/incoming/template.zip

Hope this help you locate the reason of this issue.

> I'm slightly stuck, My suggestion would
> definitely be to use
>
> \usepackage[noload=addn]{siunitx}

When I load siunix like this, I will meet new errors like this:

------------------
! Package siunitx Error: Unit \degree already defined!.

See the siunitx package documentation for explanation.
Type H <return> for immediate help.
...

l.26 ...it[valuesep=none]{\degree}{\si@sym@degree}
------------------

Regards,
--
Hongyi Zhao <hongy...@gmail.com>

Joseph Wright

unread,
Oct 22, 2008, 1:55:45 AM10/22/08
to
On Oct 22, 3:48 am, Hongyi Zhao <hongyi.z...@gmail.com> wrote:
> On Oct 22, 12:25  AM +0800, Joseph Wright
>
>
>

Reading your (non-standard) class, I see it defines \rem and \degree
at least. Try

noload={accepted,addn}

to prevent both redefinitions by siunitx. On the next release, I'll
change how the definitions occur to prevent the warnings.
--
Joseph Wright

Hongyi Zhao

unread,
Oct 22, 2008, 2:08:39 AM10/22/08
to
On Oct 22, 1:55 PM +0800, Joseph Wright
<joseph...@morningstar2.co.uk> wrote:
[snip]

>> ----------------
>> *File List*
>> CASthesis.cls 2007/01/09 v0.1h CASthesis document class
>> ctexbook.cls 2007/05/06 v0.8a ctex document class
>
> Reading your (non-standard) class, I see it defines \rem and \degree
> at least. Try
>
> noload={accepted,addn}

Do you mean:

\usepackage[noload={accepted,addn}]{siunitx}

I've tried like this, but the error is still the same.

Regards,
--
Hongyi Zhao <hongy...@gmail.com>

Hongyi Zhao

unread,
Oct 22, 2008, 2:49:45 AM10/22/08
to
On Oct 22, 12:23 AM +0800, Joseph Wright
<joseph...@morningstar2.co.uk> wrote:
[snip]
>
> The unit "rem" is defined by si-addn.cfg:
>
> \newunit{\rem}{rem}

Now, I've redefine the command \degree used by my to \mydegree then I
load the sinuitx like this and it works well:

\usepackage[noload={addn}]{siunitx}

>
> So either:
> 1) Use \renewunit

Do you mean what? From where can I redefine this command and how to
load the package siunitx in preamble?

> or
> 2) Don't load si-addn.cfg (\usepackage[noload=addn]{siunitx}).

If I don't load this confiure file, does it mean that some predefined
functions by it will ber unavailable, if true, how to workaround this
issue with unloading this file?

Regards,
--
Hongyi Zhao <hongy...@gmail.com>

Joseph Wright

unread,
Oct 22, 2008, 3:11:18 AM10/22/08
to
On Oct 22, 7:08 am, Hongyi Zhao <hongyi.z...@gmail.com> wrote:

> On Oct 22, 1:55 PM +0800, Joseph Wright<joseph.wri...@morningstar2.co.uk> wrote:
>
> [snip]
>
> >> ----------------
> >>   *File List*
> >> CASthesis.cls    2007/01/09 v0.1h CASthesis document class
> >> ctexbook.cls    2007/05/06 v0.8a ctex document class
>
> > Reading your (non-standard) class, I see it defines \rem and \degree
> > at least. Try
>
> > noload={accepted,addn}
>
> Do you mean:
>
> \usepackage[noload={accepted,addn}]{siunitx}
>
> I've tried like this, but the error is still the same.

Yes, that's what I meant. I may have forgotten one file loading
another (things get rather complicated with inter-dependence of
units).
--
Joseph Wright

Joseph Wright

unread,
Oct 22, 2008, 3:14:34 AM10/22/08
to
On Oct 22, 7:49 am, Hongyi Zhao <hongyi.z...@gmail.com> wrote:

> On Oct 22, 12:23  AM +0800, Joseph Wright<joseph.wri...@morningstar2.co.uk> wrote:
>
> [snip]
>
>
>
> > The unit "rem" is defined by si-addn.cfg:
>
> > \newunit{\rem}{rem}
>
> Now, I've redefine the command \degree used by my to \mydegree then I
> load the sinuitx like this and it works well:
>
> \usepackage[noload={addn}]{siunitx}
>
>
>
> > So either:
> > 1) Use \renewunit
>
> Do you mean what?  From where can I redefine this command and how to
> load the package siunitx in preamble?

Ignore that: I was thinking about a slightly different issue.


>
> > or
> > 2) Don't load si-addn.cfg (\usepackage[noload=addn]{siunitx}).
>
> If I don't load this confiure file, does it mean that some predefined
> functions by it will ber unavailable, if true, how to workaround this
> issue with unloading this file?

Each config file sets up certain units. They are all listed in the
documentation in separate tables, so if you look at the information
for the "addn" table you will see what units are missed out. If you
then need them, you can define them manually later.

An alternative:

\documentclass{CASthesis}
\let\CASrem\rem
\let\rem\undefined
\let\CASdegree\degree
\let\degree\undefined
\usepackage{siunitx}
...

should work as it renames the problematic macros from the document
class.

As I said, I'll alter the config files so that this won't be an issue
for later releases.
--
Joseph Wright

0 new messages