Tuukka Toivonen wrote:
> 
> tocloft seems to be working fine and my TOC styles are now
> perfect... except that I'd like to have the section headings typesetted in
> CAPITALS (not just small caps) just like inside the article body. However,
> \uppercase doesn't seem to be working (from my preamble):
> 
> % Format TOC
> \usepackage{tocloft}
> \setlength{\cftbeforetoctitleskip}{0cm}
> \renewcommand{\cfttoctitlefont}{\hfill \normalfont \large \bfseries}
> \renewcommand{\cftaftertoctitle}{\hfill}
> \setlength{\cftbeforesecskip}{0pt}
> \renewcommand{\cftsecfont}{\normalfont \uppercase}  % <-- problem
> \renewcommand{\cftsecdotsep}{\cftdotsep}
> \renewcommand{\cftsecaftersnum}{.}
> \renewcommand{\cftsubsecaftersnum}{.}

a solution on the run ... ;-)

in preamble behind \usepackage{tocloft}
%-----start
\renewcommand*{\l@section}[2]{%
  \leftskip \cftsecindent\relax
     \rightskip \@tocrmarg
     \parfillskip -\rightskip
     \parindent \cftsecindent\relax\@afterindenttrue
     \interlinepenalty\@M
     \leavevmode
     \@tempdima \cftsecnumwidth\relax
     \let\@cftasnum \cftsecaftersnum
     \let\@cftasnumb \cftsecaftersnumb
     \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
     {\normalfont\MakeUppercase{#1}\nobreak
     {\cftsecleader}
     \nobreak
     \hb@xt@\@pnumwidth{\hfil\cftsecpagefont #2}\cftsecafterpnum\par}%
}
%-----stop

and delete the line 
\renewcommand{\cftsecfont}{\normalfont \uppercase}  % <-- problem

Herbert

-- 
http://www.educat.hu-berlin.de/~voss/lyx/

Reply via email to