![获取 ToC 上的所有标题](https://linux22.com/image/404215/%E8%8E%B7%E5%8F%96%20ToC%20%E4%B8%8A%E7%9A%84%E6%89%80%E6%9C%89%E6%A0%87%E9%A2%98.png)
我想要摘要、图表列表、表格列表、声明和致谢出现在目录中,如屏幕截图所示:
我的包裹:
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,spanish]{babel}
\usepackage{graphicx}
\usepackage{amsthm, amsmath, amssymb}
\usepackage{setspace}\onehalfspacing
\usepackage[loose,nice]{units}
\usepackage{DF-MSc-titlepage}
\usepackage{indentfirst}
\usepackage{lipsum}
\usepackage{aas_macros}
\usepackage{hyperref}
\usepackage{bookmark}
\usepackage{fancyhdr}
\usepackage{emptypage}
\usepackage[margin=1in]{geometry}
\graphicspath{{./figures/}}
\usepackage[Sonny]{fncychap}
\renewcommand{\vec}[1]{\mathbf{#1}}
\geometry{bindingoffset=1cm}
\geometry{textwidth=390pt}
\addto\captionsspanish{\renewcommand{\listtablename}{Índice de tablas}}
主特克斯
\documentclass[11pt,a4paper,twoside,openright]{book}
\input{paquetes-y-customizaciones}
\begin{document}
%
% Frontmatter
\frontmatter
% Titlepage
\maketitle
% Dedication
\input{dedication}
\input{abstract}
\input{aknowl}
\input{tabladecontenidos}
\listoffigures
\listoftables
% Mainmatter
\mainmatter
\pagestyle{fancy}
\input{introduccion}
\input{diseno-construccion}
\input{montaje-y-tecnicas}
\input{resultados}
\input{conclusiones-y-perspectivas}
\appendix
\input{apendice-codigos}
\input{apendice-planos}
\backmatter
\input{bibliografia}
\end{document}
平均能量损失
\documentclass[11pt,a4paper,oneside,openright]{book}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage[titles]{tocloft}
\usepackage{minitoc}
\usepackage{theorem}
\newtheorem{theorem}{Theorem}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=blue,
urlcolor=blue,
citecolor=red,
linktoc=page
%pdfpagemode=FullScreen,
}
\begin{document}
\dominitoc
\frontmatter
\tableofcontents
\mainmatter
\chapter{This is the first chapter}
{\hypersetup{linkcolor=black}
\minitoc
}
\section{section}
This is a citation~\cite{ref1}. Theorem~\ref{thm1} provides some interesting information.
\begin{theorem}\label{thm1}
Rain gets you wet.
\end{theorem}
\section{section}
\section{section}
\bibliographystyle{alpha}
\begin{thebibliography}{Smi19}
\bibitem[Smi19]{ref1}
John Smith.
\newblock Citing in red.
\newblock {\em Journal of Hyperlink Colors}, 2019.
\end{thebibliography}
\end{document}
答案1
这可能会为您指明正确的方向。参考书目部分仅用作示例,您可以修改代码以满足您对摘要或要放置在目录中的任何其他部分的需求
\documentclass[11pt,a4paper,oneside,openright]{book}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage[titles]{tocloft}
\usepackage{minitoc}
\usepackage{theorem}
\newtheorem{theorem}{Theorem}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=blue,
urlcolor=blue,
citecolor=red,
linktoc=page
%pdfpagemode=FullScreen,
}
\begin{document}
\dominitoc
\frontmatter
\tableofcontents
\mainmatter
\chapter{This is the first chapter}
{\hypersetup{linkcolor=black}
\minitoc
}
\section{section}
This is a citation~\cite{ref1}. Theorem~\ref{thm1} provides some interesting information.
\begin{theorem}\label{thm1}
Rain gets you wet.
\end{theorem}
\section{section}
\section{section}
\bibliographystyle{alpha}
\setcounter{section}{4}%-------------------------------manual numbering of toc heading--it will not appear on the page 2 where the table is located--but it will appear in the toc%
\addcontentsline{toc}{section}{\protect\numberline{\thesection}{bibliography}}
\begin{thebibliography}{Smi19}
\bibitem[Smi19]{ref1}
John Smith.
\newblock Citing in red.
\newblock {\em Journal of Hyperlink Colors}, 2019.
\end{thebibliography}
\end{document}
`````````````````````````````````````
[![enter image description here][1]][1]
[![enter image description here][2]][2]
[1]: https://i.stack.imgur.com/0Socv.png
[2]: https://i.stack.imgur.com/rgeDD.png