mattp: (tux)
[personal profile] mattp
I'm trying to change major-section headings to be white text on a black panel. I'd like the panel to be as long as the text, rather than automatically filling the width of the page/column.

Maybe I'm going about it the wrong way, but I've got:


\renewcommand\section{\@startsection{section}{1}{\z@}
{24pt plus 2pt minus 2pt} % preskip
{12pt plus 2pt minus 2pt} % postskip
{\Huge\textcolor{white}\colorbox{black} }
} % style
between \makeatletter and \makeatother

but I get

! Argument of \colorbox has an extra }.
<inserted text>
\par
l.46 \section*{Section Heading}


Removing that re-definition, there is no syntax error, and the command is well-formed. Google has found me http://www.tex.ac.uk/cgi-bin/texfaq2html?label=extrabrace but I have no idea what makes a command robust nor how to preserve parameters (i.e. the section name) if I make use of \protect

Does anyone have any suggestions?
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

October 2010

S M T W T F S
     12
3456789
10111213141516
1718192021 2223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 30th, 2025 03:12 am
Powered by Dreamwidth Studios