Page LayoutShow Chapters in ToC

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
fabioled
Posts: 14
Joined: Sat Sep 15, 2012 2:51 am

Show Chapters in ToC

Post by fabioled »

How I can do to that my chapters appear in the ToC?

Another doubt is how I could format just font of the ToC. I would like that were look like with way of body text.

Thanks very much.

My prembule:

Code: Select all

\usepackage[utf8]{inputenc}
\usepackage{geometry}
\geometry{tmargin=20mm,bmargin=20mm,lmargin=30mm,rmargin=20mm}


\newcommand{\capitulo}[1]{\chapter{#1} \thispagestyle{myheadings}}
\renewcommand{\@makechapterhead}[1]{\noindent{\uppercase{\textbf{\thechapter~#1}}}\vspace{1.5\baselineskip}}

% --- Titulo de secao ---

\newcommand{\secao}[1]{\section{#1}}
\renewcommand{\section}{\@startsection
{section} %Nome
{0} %Nivel
{0mm} %Indentacao
{1.5\baselineskip} % Antes do paragrafo
{1.5\baselineskip} % Depois do paragrafo
{\noindent\bfseries}} % Estilo

% --- Titulo de subsecao ---

\newcommand{\subsecao}[1]{\subsection{#1}}
\renewcommand{\subsection}{\@startsection
{subsection} %Nome
{1} %Nivel
{0mm} %Indentacao
{1.5\baselineskip} % Antes do paragrafo
{1.5\baselineskip} % Depois do paragrafo
{\noindent\itshape\bfseries}} % Estilo

% % --- Titulo de subsubsecao ---

\newcommand{\subsubsecao}[1]{\subsubsection{#1}}
\renewcommand{\subsubsection}{\@startsection
{subsubsection}% %Nome
{2} %Nivel
{0mm} %Indentacao
{1.5\baselineskip} % Antes do paragrafo
{1.5\baselineskip} % Depois do paragrafo
{\noindent\bfseries\underline}} % Estilo


%%%%%%%%%%%Título de Seção de 4° nível %%%%%%%%%%%%%%%%
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{3}
\newcounter {subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection .\@arabic\c@subsubsubsection}
\newcommand\subsubsubsection{\@startsection{subsubsubsection}{4}{\z@}%
				     {1.5\baselineskip} % Antes do paragrafo
                                     {0.0\baselineskip}
                                     {\normalsize}}
% \newcommand*{\subsubsubsectionmark}[1]{\\ \par}
%%%%%%%%%%%%%%

%para usar o paragrafo como  nivel
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5} 

%%%%%%%%%%%% SETTINGS MY TABLE OF CONTENTS%%%%%%
%%%%%%%%%%%%SUMÁRIO%%%%%%%%%%%%
% 
%Para personlizar identação
\usepackage[titles]{tocloft}
\cftsetindents{chapter}{0cm}{.3cm}
\cftsetindents{section}{0cm}{.6cm}
\cftsetindents{subsection}{0cm}{.9cm}
\cftsetindents{subsubsection}{0cm}{1.2cm}
\cftsetindents{paragraph}{0cm}{1.5cm}
% \cftsetindents{subsubsubsection}{0cm}{1.4cm}

% Personalizar a fonte e pontilhados do sumário

\setlength{\cftbeforechapskip}{\baselineskip}
%\renewcommand{\cftchapfont}{\upshape\bfseries}
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}

\setlength{\cftsecindent}{0em}
\renewcommand{\cftsecfont}{\bfseries}

\setlength{\cftsubsecindent}{0em}
\renewcommand{\cftsubsecfont}{\bfseries\itshape}

\setlength{\cftsubsubsecindent}{0em}
\renewcommand{\cftsubsubsecfont}{\bfseries}

% \setlength{\cftsubsubsecindent}{0em}
% \renewcommand{\cftsubsubsecfont}{\bfseries}



\renewcommand{\sumario}
{
	\thispagestyle{empty}
	\setlength{\baselineskip}{1.0\baselineskip} % Espacamento: 0.7
	\begin{center}
		\textbf{SUM\'ARIO} \\ [1.5\baselineskip]
	\end{center}
     	\@starttoc{toc}
     	\cleardoublepage
	\newpage
        \setlength{\baselineskip}{1.5\baselineskip} % Espacamento: 1.5
}
Now my document where make calls:

Code: Select all

%tabelas de conteúdo
\documentclass[a4paper,12pt,pagestart=firstchapter,Times]{abnt}
\usepackage{abakos}  % prembule

\include{dados}
\newcommand{\keyword}[1]{\textsf{#1}}
\begin{document}
\listafiguras
\listatabelas
\listadesiglas
% \tableofcontents
\sumario  %my table of content modify
Last edited by localghost on Thu Sep 12, 2013 4:02 pm, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Show Chapters in ToC

Post by localghost »

For an adequate problem description please prepare a self-contained and minimal example in order to avoid speculations and guesswork. I'm afraid that otherwise this question will be left orphaned because code fragments are not helpful.


Thorsten
Post Reply