Necesito producir un documento PDF en el que necesito algunos "capítulos" (junto con sus secciones y subsecciones) para ser no numerados pero aún incluido en el ToC.Cómo hacer que el capítulo *, la sección * y la subsección * aparezcan en la tabla de contenido
Esto es para mi tesis de maestría. Estoy usando la clase de documento del libro, porque no me gustan los valores predeterminados de las memorias.
Si uso \chapter*
, entonces LaTeX elimina el capítulo del ToC. Pero estoy obligado a tener esos también en el ToC. Además, los títulos (fantasía) no se cambian con \chapter*
.
La estructura general de la tesis es:
\maketitle %% A custom one
\frontmatter
\tableofcontents
\listoftables
\listoffigures
\chapter*{Abstract}
\chapter*{Introduction} %% This "chapter" presents the whole thesis
\mainmatter
%% Here the real chapters are written
\appendix
%% Appendixes here
%% bibliography
¿Cómo puedo hacer \chapter*
, \section*
y \subsection*
a aparecer en el ToC y modificar las cabeceras?
Recuerdos, Manuel.
ACTUALIZACIÓN: Creo que puedo estar utilizando algunos paquetes que interfieren con la forma en que se generan encabezados y pies de página. La respuesta de smilingthax responde a la primera parte de la pregunta: ahora tengo mis \ chapter * s en el TOC.
Ésta es mi preámbulo completo:
\usepackage[sort&compress,round,semicolon]{natbib}
\usepackage{babel}
\usepackage{setspace}
%% inputenc so we can write in spanish
\usepackage[utf8]{inputenc}
\usepackage{fixltx2e} % LaTeX patches, \textsubscript
\usepackage{cmap} % fix search and cut-and-paste in PDF
\usepackage{ifthen}
%% \usepackage{float} % float configuration
%% \floatplacement{figure}{TH} % place figures here definitely
%% fontenc so we can use TrueType fonts
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{garamond}
\usepackage{graphicx}
\usepackage{titlesec}
\usepackage[table]{xcolor}
%% Custom colors
\definecolor{blue}{rgb}{0.2,0.2,0.95}
\definecolor{green}{rgb}{0.2,0.95,0.2}
\definecolor{red}{rgb}{0.95,0.2,0.2}
\definecolor{cyan}{rgb}{0,0,0.95}
\definecolor{ligthred}{rgb}{1, 0, 0}
\definecolor{black}{rgb}{0, 0, 0}
\definecolor{shade}{HTML}{D4D7FE} %light blue shade
% Margins
\usepackage[left=0.9in,top=1in,right=0.7in,bottom=1in]{geometry}
\usepackage[pdftex, colorlinks=true, citecolor=ligthred,
urlcolor=blue]{hyperref}
\widowpenalty9000
\clubpenalty7000
\usepackage{titlesec}
\newcommand{\bigrule}{\titlerule[0.5mm]}
\renewcommand{\rmdefault}{bch}
\titleformat{\chapter}[display]
{\bfseries\Huge}
{\garamond
% DESCOMENTAR PARA SUBIR LOS CAPITULOS
\vspace{-1.125in} \titlerule \filleft
\Large\chaptertitlename\ \Large\thechapter}{0mm}
{\filleft}[\vspace{0.5mm} \bigrule]
\let\cite=\citep
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} %% Clears all headers
% admonition (specially marked topic)
\providecommand{\DUadmonition}[2][class-arg]{%
% try \DUadmonition#1{#2}:
\ifcsname DUadmonition#1\endcsname%
\csname DUadmonition#1\endcsname{#2}%
\else
\begin{center}
\fbox{\parbox{0.9\textwidth}{#2}}
\end{center}
\fi
}
% title for topics, admonitions and sidebar
\providecommand*{\DUtitle}[2][class-arg]{%
% call \DUtitle#1{#2} if it exists:
\ifcsname DUtitle#1\endcsname%
\csname DUtitle#1\endcsname{#2}%
\else
\smallskip\noindent\textbf{#2}\smallskip%
\fi
}
% error admonition title
\providecommand*{\DUtitleerror}[1]{\DUtitle{\color{red}#1}}
% fieldlist environment
\ifthenelse{\isundefined{\DUfieldlist}}{
\newenvironment{DUfieldlist}%
{\quote\description}
{\enddescription\endquote}
}{}
% legend
\ifthenelse{\isundefined{\DUlegend}}{
\newenvironment{DUlegend}{\small}{}
}{}
%%% Fallback definitions for Docutils-specific commands
% numeric or symbol footnotes with hyperlinks
\providecommand*{\DUfootnotemark}[3]{%
\hyperlink{#2}{\textsuperscript{#3}}\raisebox{1em}{\label{#1}}%
}
\providecommand{\DUfootnotetext}[4]{%
\begingroup%
\renewcommand{\thefootnote}{%
\protect\hyperlink{#2}{#3}}%
\protect\raisebox{1em}{\protect\label{#1}}%
\footnotetext{#4}%
\endgroup%
}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{longtable}
\newlength{\DUtablewidth} % internal use in tables
\usepackage{tikz}
\usepackage{bbding}
\usetikzlibrary{arrows,fit}
\usepackage{amsmath,bm,times}
\newcommand{\mx}[1]{\mathbf{\bm{#1}}} % Matrix command
\newcommand{\vc}[1]{\mathbf{\bm{#1}}} % Vector command
Esto funciona casi como se esperaba. Tengo los capítulos en el TOC, pero los encabezados no están actualizados. Tengo un \ chap {Introducción}, pero las páginas de ese capítulo obtienen el encabezado "Lista de figuras". – manu
Intenta agregar \ chaptermark {# 1} resp. \ leftmark/\ rightmark. Ver también: http://en.wikibooks.org/wiki/LaTeX/Page_Layout#Customising_with_fancyhdr – smilingthax
Gracias a todos. Resolví todos mis problemas con \ chaptermark y también con \ phantomsection. – manu