[OS X TeX] Re: MacOSX-TeX Digest #1997 - 02/06/07

Alan Munn amunn at msu.edu
Wed Feb 7 13:33:46 EST 2007


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 about font commands...

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

------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list