GeneralSections

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
haac
Posts: 6
Joined: Thu Aug 21, 2008 3:09 am

Sections

Post by haac »

Hi.
I would like to have multiple sections in mi documents, something like this

1 Capitulo
1.1 Algo
1.1.1 Algo
1.1.1.1 Algo
1.1.1.1.1 Algo
...

this is my test

Code: Select all


\documentclass[12pt]{article}
\usepackage{geometry} % see geometry.pdf on how to lay out the page. There's lots.
\geometry{a4paper} % or letter or a5paper or ... etc
% \geometry{landscape} % rotated page geometry

% See the ``Article customise'' template for come common customisations

\title{Documento}
\author{Hugo}
\date{} % delete this line to display the current date

%%% BEGIN DOCUMENT
\begin{document}

\maketitle
\tableofcontents

\section{Capitulo}
\subsection{Algo}
\subsubsection{Algo}

\end{document}

How can i do this?
thanks

Recommended reading 2024:

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

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

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Sections

Post by Stefan Kottwitz »

Hi haac,

welcome to the board!
Use this in your preamble:

Code: Select all

\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
and later in your document

Code: Select all

\paragraph{Algo}
\subparagraph{Algo}
Perhaps look at the document class book or report, it provides \chapter for additional sectioning.

Stefan
LaTeX.org admin
haac
Posts: 6
Joined: Thu Aug 21, 2008 3:09 am

Sections

Post by haac »

Hi Stefan_K, thanks for taking the time to awnser my question
The test i made now looks like this

Code: Select all

\documentclass[12pt]{article}
\usepackage{geometry} % see geometry.pdf on how to lay out the page. There's lots.
\geometry{a4paper} % or letter or a5paper or ... etc
% \geometry{landscape} % rotated page geometry
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
% See the ``Article customise'' template for come common customisations

\title{titulo}
\author{Autor}
\date{} % delete this line to display the current date

%%% BEGIN DOCUMENT
\begin{document}

\maketitle
\newpage
\tableofcontents
\newpage
\section{Capitulo}
\subsection{Algo}
texto
\subsection{Algo}
texto
\subsubsection{Algo}
texto
\paragraph{Algo}
texto
\subparagraph{Algo}
texto
\end{document}
and the genereted document looks like this

1 Capitulo
1.1 Algo
texto
1.2 Algo
texto
1.2.1 Algo
texto
1.2.1.1 Algo texto
(tab space)1.2.1.1.1 Algo texto

i want to format the document like this

1 Capitulo
1.1 Algo
texto
1.2 Algo
texto
1.2.1 Algo
texto
1.2.1.1 Algo
texto
1.2.1.1.1 Algo
texto

if i use the book class or the report class i get this

0.1 Capitulo

instead of

1 Capitulo

if i write this
\setcounter{secnumdepth}{10}
\setcounter{tocdepth}{10}

i assume that i can have 10 sections in my document, but what is the tag after the \subparagraph tag?

Thanks again for taking the time reading this post
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Sections

Post by Stefan Kottwitz »

Hi,
haac wrote:if i use the book class or the report class i get this 0.1 Capitulo instead of 1 Capitulo
use \chapter{Capitulo}, like:

Code: Select all

\documentclass[a4paper,12pt]{book}
\usepackage{geometry}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\title{titulo}
\author{Autor}
\date{}
%%% BEGIN DOCUMENT
\begin{document}
\maketitle
\tableofcontents
\chapter{Capitulo}
\section{Algo}
texto
\section{Algo}
texto
\subsection{Algo}
texto
\subsubsection{Algo}
texto
\paragraph{Algo}
texto
\subparagraph{Algo}
texto
\end{document}
haac wrote:i assume that i can have 10 sections in my document, but what is the tag after the \subparagraph tag?
Do you really need it so deeply nested? At first sight that looks strange to me. The predefined sectioning goes until \subparagraph. What do you think about using enumerate lists at some point?

Stefan
LaTeX.org admin
Post Reply