I use relative units to redefine the subsection as follows:


\@addtoreset{chapter}{part}% reset chapter number when a new part starts





\renewcommand*\thesection{\thechapter.\arabic{section}}% section 1.1
\renewcommand*\thesubsection{\thesection.\arabic{subsection}}% subsection 1.1.1
\renewcommand*\thesubsubsection{\thesubsection.\arabic{subsubsection}} %subsubsection1.1.1.1


It works when I use the class AMSBook, However it show me the following wrong message when I use the SpringBook class 'svmult'.

Dimensions can be in units of em, ex, in, pt, pc,
cm, mm, dd, cc, bp, or sp; but yours is a new one!
I'll assume that you meant to say pt, for printer's points.
To recover gracefully from this error, it's best to
delete the erroneous units; e.g., type `2' to delete
two letters. (See Chapter 27 of The TeXbook.)

Is there any way to make the class know this relative unit: "\linespacing"?

P.S. I use "\noindent" in the last as I don't want the indent. I still get an error when I delete it.

  • please provide a small test file that shows that error, by default there is no command \linespacing so the code shown would generate an undefined command error not the error shown – David Carlisle May 29 at 22:30
  • Unrelated but the \noindent in that definition is wrong and will break the standard latex section syntax – David Carlisle May 29 at 22:31
  • @DavidCarlisle Hi. I just make the revision and attach the full test code. – X liu May 29 at 22:45

In amsart \linespacing is defined by

\normalsize \linespacing=\baselineskip

so it's just \baselineskip as set at the document default size.

You could use the same definition in other classes, or use other font dependent values suc as ex units or simply \baselineskip

It is unlikely that the error you show is the first error, with article class the first error is

! Undefined control sequence.
<argument> .7\linespacing 
                          \@plus .8\linespacing 
l.11 \subsection

and you only get the missing unit error if you scroll past this error. Later errors are often spurious TeX's recovery from errors often leaves it in a state where more errors are generated.

unrelated to the error but the \noindent should not be in the definition. To suppress indentation simply negate the 4th argument of \@startsection using \noindent in the section definition will generate spurious white paragraphs

| improve this answer | |
  • Thanks. When I replace "\linespacing" by "\baselineskip". Everything works now. I also change the "\noindent" to the right position. – X liu May 29 at 23:00
  • @Xliu glad you got it working but \noindent should not be used at all. LaTeX never uses \noindent to suppress indentation after a section heading. – David Carlisle May 29 at 23:04
  • I use {0pt} as the 3rd argument. By the way, {\z@} means no setting or also set it to 0? – X liu May 29 at 23:12
  • 1
  • Yes. Just checked. Both works. Thank you. – X liu May 29 at 23:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.