TOC section number in memoir

TOC section number in memoir

Post by Leo » Tue, 15 Dec 2009 02:13:43


Hi,

I am using the memoir class. I have \thechapter redefined to
\Roman{chapter} and also by default chapter numbers in the appendix
are in uppercase letters too.

In the toc, how to set up so that the section letters are in lowercase
smallcaps?

I tried this setting:
\renewcommand*\cftsectionpresnum{\scshape\MakeLowercase}
\renewcommand*\cftsectionaftersnum{\space}

but only the first letter is in lower smallcaps, i.e. section III.1
will be typeset like \scshape\MakeLowercase{I}II.1.

Many thanks.

Leo
 
 
 

TOC section number in memoir

Post by Lars Madse » Wed, 16 Dec 2009 00:22:36


it is a bit difficult because the text is not given to is as an
argument, it is executed as

\cftsectionpresnum given text ...

You might get away with redefining \numberline, though I cannot garantee
this will not cause other problems

\documentclass[a4paper]{memoir}

\usepackage{lmodern}
\makeatletter
\renewcommand*{\numberline}[1]{%
\hb@xt@\@tempdima{\@cftn@me\@cftbsnum{#1}\@cftasnum\hfil}\@cftasnumb}

\makeatother

\renewcommand\cftsectionpresnum{\scshape\MakeLowercase}
\renewcommand\cftsectionaftersnum{\space}

\renewcommand\thechapter{\Roman{chapter}}


\begin{document}


\tableofcontents*


\setcounter{chapter}{3}

\chapter{test}

\section{test1}

\end{document}











--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.yqcomputer.com/
LaTeX book: http://www.yqcomputer.com/ (in Danish)
Remember to post minimal examples, see URL below
http://www.yqcomputer.com/
http://www.yqcomputer.com/

 
 
 

TOC section number in memoir

Post by Leo » Wed, 16 Dec 2009 02:21:23


[code]

Many thanks for this.

Leo