[texhax] help redefining section

Paul Tremblay phthenry at iglou.com
Sun Feb 18 23:30:46 CET 2007


On Tue, 13 Feb 2007 22:26:18 -0500
Paul Tremblay <phthenry at iglou.com> wrote:

> 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}\doublespac
> > in 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
>   \def\@makeschapterhead#1{%
>  \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.
> 


I was wrong. The above code doesn't change the spacing. The only thing I
find to work is this code:

\newcommand*{\Chapter}[1]{\singlespacing\chapter{#1}\doublespacing} 

\newcommand*{\ChapterNoNum}[1]{\singlespacing\chapter*{#1}\doublespacin
g} 

The only other code I got to work involved changing the makechaphead and
makeschaphead, but these commands nullifiied any of the other macros the
memoir package used.

Paul




More information about the texhax mailing list