The definition of the chapter command in KOMA-class scrbook is:


I am wondering what \secdef does.

2 Answers 2


\secdef is a utility command; if a definition is in the form


a call of \foo will do


while calling \foo* will do


This is because the definition of \secdef is


Therefore, leaving aside the <tokens> that may precede the execution of \secdef, we get


If \foo* is called, \fooB is executed, otherwise TeX does


and so \fooA must be defined in a special way:


like \@chapter is. The \@dblarg trick basically examines the next token; if it is [, then we are in a situation such as


and LaTeX will do


Otherwise we have


and \@dblarg will arrange things in such a way that TeX will eventually see


Change \foo into \chapter, \fooA into \@chapter and \fooB into \@schapter to better understand the idea.


Oh... I guess I got it on my own: \secdef seems to switch between \chapter and \chapter* call, so you can define in the example above for each case an own macro \@chapter (non-star case) or \@schapter (star-case).

You must log in to answer this question.

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