Мне нужно создать PDF-документ, в котором мне нужно, чтобы некоторые «главы» (вместе с разделами и подразделами) не были пронумерованы, но при этом были включены в ToC.
Это для моей магистерской диссертации,Я использую класс документа книги, потому что мне не нравятся мемуары по умолчанию.
Если я использую \chapter*
, то LaTeX удалит главу из ToC.Но я тоже должен иметь их в ToC.Кроме того, заголовки (фантазии) не изменяются с \chapter*
.
Общая структура диссертации:
\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
Как я могу сделать \chapter*
, \section*
,и \subsection*
появиться в ToC и изменить заголовки?
С наилучшими пожеланиями, Мануэль.
ОБНОВЛЕНИЕ: Я думаю, что я могу использовать некоторые пакеты, которые мешают способу верхних и нижних колонтитуловгенерируются.Ответ Smilingthax дает ответ на первую часть вопроса: теперь у меня есть мои \ главы * по оглавлению.
Это моя полная преамбула:
\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