>> Another problem with LaTeX. I have a few chapters (Abstract, for example)
>> that need to go into the table of contents but without the page numbering.
>> I tried
>>       \addtocontents{toc}{\noindent SOMENAME}
[but \noindent has not effect] (I'm using koma-article class with extra
options, packages and a big preamble)

On Tue, 11 Dec 2001, Herbert Voss wrote:
>\hspace{-1.5em}

I didn't get this to work. It just sets the line in the TOC left-aligned
(weird), same with \hspace*. However, following your advice I read the
classfile and noticed \hskip which does work. This is typographically
perfect:

\addtocontents{toc}{ \hskip -1.5em SOMETEXT \protect \linebreak }

I tried to define a new command to shorten this:

\newcommand{\addtoc}[1]{\addtocontents{toc}{ \protect \hskip -1.5em #1 \protect 
\linebreak }}
\addtoc{SOMETEXT}

But this does NOT work. It looks same as without \hskip, no matter whether
I put \protect or not. This is not so important, I can live without this
new command. But to enhance my understanding of LaTeX, I'd like to hear
what is the problem.

By the way, I got "LaTeX companion" from library so hopefully my
understanding gets better.

Reply via email to