[OS X TeX] Tinkering with the argument of a \chapter
Alain Schremmer
schremmer.alain at gmail.com
Mon Oct 24 15:53:57 EDT 2011
On Oct 24, 2011, at 3:15 PM, Ross Moore wrote:
> Hi Alain
>
> On 25/10/2011, at 5:18, Peter Dyballa <Peter_Dyballa at Web.DE> wrote:
>> I'd try something new: amsbook. It has \smaller as in
>>
>> \section[Base Ten]{Base T\smaller{EN}} % chapter starts with
>> \thispagestyle{plain}
>
> It is not a good idea to mix text and macros in a title.
> Much better is to define a robust macro, e.g.
>
> \DeclareRobustCommand{\BaseTEN}{....}
> expanding to how you want it to appear on the page in the section-
> heading.
>
> This means that \BaseTEN will occur in the .aux and .toc file,
> so you can give a local redefinition before making the ToC, where
> the font sizes are different.
Do you truly think that, failing a tsunami with
\chapter[Base T{\smaller EN} Place System]{Base T{\smaller EN} Place
System}
I am going to have the guts to try the robust way?
However, I am a bit curious about why macros in a title is not a good
idea. The problem I had run into was that there are three places
where the title is typeset: heading of chapter, running head and toc
and I could not get all three to behave. But the above does all three.
> Getting it right in the running head is a bit harder.
> It is pretty standard to hack at \@oddhead and \@evenhead to
> customize to all your requirements. So just add a redefinition here
> too.
It sure is not standard by my standards :-))
> Also, if you are using hyperref to create bookmarks and hyperlinks,
> then you can specify a plain text (no styling) version for use in
> these structures.
God forbid. Back at the beginning of my LaTeX affair, I tried to use
hyperref. That nearly turned me completely off LaTeX.
>> but also understands and preserves
>>
>> \section[Base Ten]{Base \textsc{Ten}}
>>
>> But \smaller looks better.
>
> Look inside the .toc file to see what this approach produces.
\@input{../Text-contents/3.aux}
\contentsline {chapter}{\numberline {3}Base T{\smaller EN} Place
System}{21}
And, so, why is the latter worse than having \BaseTEN in the aux and
toc files?
> Then try again with my robust solution as described above.
> You will quickly understand why this is a better approach.
I am of course more than certain that you are right but ... here, my
reaction is that of a typical student.
Grateful regards
--schremmer
More information about the MacOSX-TeX
mailing list