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

Letterspaced chapter lines in ToC

0 views
Skip to first unread message

Peter Flynn

unread,
Apr 27, 2009, 4:49:01 PM4/27/09
to
A publisher's style requires

C h a p t e r 1 B l a h b l a h 23

with both the \@chapapp *and* the chapter title letterspaced, for which
I am using the soul package

In my redefinition of \@chapter, I have

{\protect\numberline{\thechapter}\protect\so{#1}}

which letterspaces the title just fine, but I can't figure out how to
get \so to work in my redefinition of \l@chapter:

\so{\@chapapp}\ #1\nobreak\hfil
\nobreak\uline{\hb@xt@\@pnumwidth{\hss #2}}\par

Each invocation of this gives me the error
! Package soul Error: Reconstruction failed.

I wasn't expecting \so{\@chapapp} to work as-is, and I tried
\expandafter\so\expandafter{\@chapapp} to no effect, but the
documentation for soul doesn't appear to address how to make \so work
with an argument which is a macro. Does anyone have a solution for this?

///Peter

Melchior FRANZ

unread,
Apr 27, 2009, 5:08:25 PM4/27/09
to
Peter Flynn wrote:
> I wasn't expecting \so{\@chapapp} to work as-is, and I tried
> \expandafter\so\expandafter{\@chapapp} to no effect, but the
> documentation for soul doesn't appear to address how to make \so work
> with an argument which is a macro.

It's mentioned on page 30 in the description of \SOUL@expand (which,
admittedly, is a rather bad place :-)

If the first token after the soul command was an opening brace we
start scanning. Otherwise, if the first token was a macro name, we
expand that macro and call \SOUL@ with its contents again.

So, have you tried just \so\@chapapp?

m.

Peter Flynn

unread,
Apr 27, 2009, 5:30:52 PM4/27/09
to
Melchior FRANZ wrote:
> Peter Flynn wrote:
>> I wasn't expecting \so{\@chapapp} to work as-is, and I tried
>> \expandafter\so\expandafter{\@chapapp} to no effect, but the
>> documentation for soul doesn't appear to address how to make \so work
>> with an argument which is a macro.
>
> It's mentioned on page 30 in the description of \SOUL@expand (which,
> admittedly, is a rather bad place :-)

Ah. Thank you very much!

> If the first token after the soul command was an opening brace we
> start scanning. Otherwise, if the first token was a macro name, we
> expand that macro and call \SOUL@ with its contents again.
>
> So, have you tried just \so\@chapapp?

I hadn't tried that, thanks.

///Peter

Peter Flynn

unread,
Apr 27, 2009, 5:53:44 PM4/27/09
to
Melchior FRANZ wrote:
[snip]

> So, have you tried just \so\@chapapp?

Having fixed that in the \l@chapter macro, I now find that in my
redefinition of \@chapter

\@mkboth{\MakeUppercase{\so\@chapapp\ \thechapter}}{}%

and in my \pagestyle{fancy} I use \leftmark, but i am getting

H A P T E R 3

(the initial C is missing :-)

I tried \protect\so\@chapapp but that made no difference. I've clearly
misunderstood how this interacts somewhere...

///Peter

0 new messages