Generalmemoir | Get rid of "TABLE OF CONTENTS" in the ToC

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
you2000too
Posts: 4
Joined: Mon Jan 16, 2012 3:09 pm

memoir | Get rid of "TABLE OF CONTENTS" in the ToC

Post by you2000too »

Dear friends,

I am writing a book using Memoir class.

The editor says "A line as 'TABLE OF CONTENTS' must not appear in TOC."

This is the code I'm using:

Code: Select all

\documentclass[12pt]{memoir}
\renewcommand\contentsname{ToC}
\title{MWEToC}

\author{YouToo}
\date{ }
\begin{document}
\maketitle \newpage  \tableofcontents \frontmatter
\chapter{PREFACE}
blah blah Preface
\mainmatter
\chapter{A Title}
\section{Section One.One}
blah blah Section 1.1
\section{Section One.Two}
blah blah Section 1.2

\end{document}

But then, the first entry in ToC I get is

ToC 2

How can I fix it? Thanks a lot, YT.
Last edited by you2000too on Mon Jan 16, 2012 7:09 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

memoir | Get rid of "TABLE OF CONTENTS" in the ToC

Post by Stefan Kottwitz »

Welcome to the board!

You can fix it by using the KeepFromToc environment, provided by memoir:

Code: Select all

\begin{KeepFromToc}
  \tableofcontents
\end{KeepFromToc}
Stefan
LaTeX.org admin
you2000too
Posts: 4
Joined: Mon Jan 16, 2012 3:09 pm

Re: memoir | Get rid of "TABLE OF CONTENTS" in the ToC

Post by you2000too »

Thank you Stefan, it certainly worked! And sorry for the double post.

Mods, can you please delete my double post?

Thank you!

YT
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: memoir | Get rid of "TABLE OF CONTENTS" in the ToC

Post by Stefan Kottwitz »

No problem, I removed the other post. As the problem is solved, it would be great if you would mark the question as solved then. This helps us to see the still open questions. Just edit your first post in this thread (the question) and choose the checkmark symbol as topic icon.

Stefan
LaTeX.org admin
Post Reply