Document Classestitletoc don't run...

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
silvietta
Posts: 2
Joined: Wed Nov 19, 2008 12:22 pm

titletoc don't run...

Post by silvietta »

Hi
I need to use titletoc package, for an Index that will be like:


1 {Title chapter}

1.1 {Title section}
1.1.1 (title subsection}/1.1.2{title second subsection}

1.2{Title second section}....

The titletoc's package don't help me! It change the section and the chapter but don't change the subsection (that is what I really need to change)

wher's my mistake?


I write:


\usepackage{titletoc}

\titlecontents*{subsection}[4.8em]
{\small}
{\thecontentslabel.}
{}
{,\thecontentspage}[.---][.]


like write Javier Bezos in his package...but nothing!!!

I think that the problem may be that I've renamed \thesection and \thesubsection...bho.

Help me please! (I'm Italian, so exscuse me for my bad english!) :roll:

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

titletoc don't run...

Post by Juanjo »

Consider the following code:

Code: Select all

\documentclass[a4paper]{report}

\usepackage{titletoc}
\titlecontents*{subsection}[1.5em]
{\small}
{\thecontentslabel. }
{}
{, \thecontentspage}
[.---][.]

\usepackage{lipsum} % Just to write blind text. Defines \lipsum

\begin{document} 

\tableofcontents

\chapter{First chapter}
\section{First section}
\subsection{First subsection in first section}
\lipsum[1-3]
\subsection{Second subsection in first section}
\lipsum[2-5]
\subsection{Third subsection in first section}
\lipsum[3-6]

\section{Second section}
\subsection{First subsection in second section}
\lipsum[1]
\subsection{Second subsection in second section}
\lipsum[2]
\subsection{Third subsection in second section}
\lipsum[3]


\chapter{Second chapter}
\lipsum[4]
\end{document}
It works for me as expected. Try it and add as few changes as possible to get the errors you actually see. Then post the code and explain what happens.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
silvietta
Posts: 2
Joined: Wed Nov 19, 2008 12:22 pm

Re: titletoc don't run...

Post by silvietta »

Now it run, but I don't use lipsum, because I need that it typesetting all the document and not only [4-5] (if I understand the package lipsum typeset only the section that you sign with[]).

Probably I've put the command in the document instead in the preamble!

I don't know but now it run!! Thank you very much

Now I need only to adjust the space trought the number of subsection and the text of subsection.

Thank you

Silvia
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

titletoc don't run...

Post by phi »

silvietta wrote:Now it run, but I don't use lipsum, because I need that it typesetting all the document and not only [4-5] (if I understand the package lipsum typeset only the section that you sign with[]).
\lipsum inserts a meaningless placeholder text with words taken out of a Cicero text. It is only intended for examples or for getting an overview about the overall appearance of a typeface and is to be replaced by the real document contents.
Post Reply