Como faço para adicionar um nome de capítulo a esta dedicatória e adicioná-lo ao TOC, por favor?
\newenvironment{dedication}
{\clearpage % we want a new page
\thispagestyle{empty}% no header and footer
\vspace*{\stretch{1}}% some space at the top
\slshape % the text is in italics
\raggedleft % flush to the right margin
}
{\par % end the paragraph
\vspace{\stretch{3}} % space at bottom is three times that at the top
\clearpage % finish off the page
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{dedication}
ABC \\ DEF
\end{dedication}
Estou usando a classe de relatório. Muito obrigado!
Responder1
Você pode usar
\chapter*{Dedication}
\addcontentsline{toc}{chapter}{Dedication}
Código completo:
\documentclass{report}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\newenvironment{dedication}
{%\clearpage % we want a new page %%%<===== Comment this line
\thispagestyle{empty}% no header and footer
\vspace*{\stretch{1}}% some space at the top
\itshape % the text is in italics
\raggedleft % flush to the right margin
}
{\par % end the paragraph
\vspace{\stretch{3}} % space at bottom is three times that at the top
\clearpage % finish off the page
}
\begin{document}
\pagenumbering{roman}
\tableofcontents
\chapter*{Dedication}
\addcontentsline{toc}{chapter}{Dedication}
\begin{dedication}
ABC
\par %% or a blank line
\vspace{2\baselineskip}
DEF
\vspace{\baselineskip}
\usefont{T1}{LobsterTwo-LF}{bx}{it}
John
\end{dedication}
\pagenumbering{arabic}
\end{document}