# [texhax] help redefining section

Paul Tremblay phthenry at iglou.com
Wed Feb 14 04:26:18 CET 2007

On Sat, 10 Feb 2007 18:20:26 -0500
Paul Tremblay <phthenry at iglou.com> wrote:

> I used the code below to redefine my section, but it didn't work when
> I used \section*:
>
> \let\OldSection=\section
> \renewcommand{\section}[1]{\singlespacing\OldSection{#1}\doublespacin
> g}
>
> The problem is that Latex sees the "*" as the first argument. I am
> trying to get my titles to be only single spaced, though I might also
> want to customized my sections in different ways, so I would like a
> more general solution to customizing \sections.
>

Well, here is one solution:

% use a default setting in case you want to change the spacing in the
future.
\let\DefaultLineSpace=\doublespacing
\makeatletter
\singlespacing
\vspace*{50\p@}%
{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
\Huge \bfseries  #1\par\nobreak
\vskip 40\p@
}
\DefaultLineSpace}
\makeatother

That seems to work. I am using the memoir class. I assume that if I put
this at the beginning, I can stil se memoir commands to customize my
chapter headings. I assume that I can find teh default settings for
sections and subsections by looking at memoir.cls.

Paul