# [OS X TeX] Bibliography as section heading

Chabot Denis chabotd at globetrotter.net
Wed Feb 7 22:27:15 EST 2007

```Hi again Alan,

I followed your suggestion to use a package instead of the renew
command.

My section headings are now capitalized. However they are not
in all capitals by hand).

I'm leaving it like this for now, I think I can get away with it. But
if someone knows how I would get the TOC display headings the same
way as the rest of the document.

Too bad titlesec conflicted with hyperref, because it did produce a
properly formatted TOC.

Denis
Le 07-02-07 à 13:33, Alan Munn a écrit :

> At 12:55 PM -0500 2/7/07, Chabot Denis wrote:
>> Le 07-02-07 à 12:17, Alan Munn a écrit :
>
> [on how to make section titles uppercase and use hyperref at the
> same time]
>
>>> \renewcommand\section{\@startsection {section}{1}{\z@}%
>>>                                    {-3.5ex \@plus -1ex \@minus -.
>>> 2ex}%
>>>                                    {2.3ex \@plus.2ex}%
>>> {\normalfont\Large\bfseries\MakeUppercase}}
>>> \makeatother
>>>
>>> This compiles for me with all your other packages.
>>>>
>>>> By the way, I tried replacing the titlesec package you suggested
>>>> with
>>>>
>>>> \usepackage{sectsty}
>>>> 	\sectionfont{\upshape}
>>>>
>>>> but for some reason this never gave me upper case section headings.
>>>
>>> This was the right idea, but the wrong font command.  Change
>>> \upshape to \MakeUppercase and this will also work!  So take your
>>> pick.
>>
>>
>>
>> Wow, 2 solutions instead of one? Thank you, Alan.
>>
>> I like your first solution. Anyway it is not a bad thing I start
>> using such commands.
>
> Actually, I think that, in general, solution 2 is to be preferred.
> (And if you look at other things I've posted here they usually
> involve package recommendations rather than raw code.)  Package
> makers (even RMcD, who wrote sectsty!) usually try to make packages
> that work with other things, and have usually thought of most of
> the potential problems.  This means less problems for us, the end
> user.  The chunk of code that I used in solution 1 was copied
> directly out of article.cls and then modified.  This is by no means
> an obvious solution, and one that would be a pain in the neck to
> recreate, unless you're a TeX wizard (which I'm not; I just have
> good intuitions...) So using a package has many advantages:  the
> commands are (i) less work to type (ii) easier to understand (iii)
> less likely to induce other mysterious errors.
>
> Unfortunately hyperref makes lots of redefinitions of things and so
> it sometimes breaks other good packages.
>
>> As for the second, one example in the sectsty doc did use
>> \itshape, so I thought \upshape was OK. I'll have to read more
>
> If you don't already have a copy, get The LaTeX Companion.  It
> really tells you almost everything you would need to know about
> everything, when it comes to LaTeX.
>
> Alan
> --
> Alan Munn amunn at msu.edu
> Department of Linguistics
> and Germanic, Slavic, Asian and African Languages   Fax.
> +1-517-432-2736
> Michigan State University, East Lansing MI 48824       Tel.
> +1-517-355-7491