报告 - 仅更改或删除一个章节标题

报告 - 仅更改或删除一个章节标题

我的报告文档中有以下代码:

 \pagenumbering{roman} 
 \setcounter{page}{2}
 \include{Abstract}
 \include{Dedication}
 \include{Acknowledgements}
 \tableofcontents
 ......

文件奉献包括

\chapter*{Dedication}
\addcontentsline {toc}{chapter}{Dedication}
To Someone

我正在使用 hyperref

   \hypersetup{
      colorlinks,
      citecolor=black,
      filecolor=black,
      linkcolor=black,
      urlcolor=black}

我的问题是如何才能删除此文件的章节标题,或者更改其设置,同时保留其他章节标题不变。

如果我删除\chapter*{Dedication},TOC 就会出现问题,单击引言不会将我带到正确的页面。另一个选择是如果我写\chapter*{To Someone},但在这种情况下,我只需要更改此页面的章节标题大小,但我不知道该怎么做。

非常感谢您的帮助

[添加代码]

\documentclass{report}

\usepackage{comment} 
\usepackage{amssymb} 
\usepackage{xspace}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{enumerate}
\usepackage{amssymb}
\usepackage{multirow}

\usepackage[letterpaper,left=1in,right=1in,top=1in,bottom=1in]{geometry}
\usepackage{tocbibind}
\usepackage[title,titletoc,toc,page]{appendix}
\usepackage[doublespacing]{setspace}


\usepackage{hyperref}
\hypersetup{
  colorlinks,
  citecolor=black,
  filecolor=black,
  linkcolor=black,
  urlcolor=black}

\setcounter{secnumdepth}{3}

\begin{document}
 \pagenumbering{roman} 
 \setcounter{page}{2}

  \include{Abstract}
  \include{Dedication}
  \include{Acknowledgements}
  \tableofcontents
  \listoffigures

 \clearpage
 \pagenumbering{arabic}
 \setcounter{page}{1}

 \include{someChapter}

 \bibliographystyle{plain}               
 \bibliography{MyLib}                      


  \begin{appendices}
  \include{Ap1}
  \clearpage
  \include{Ap2} 
  \end{appendices}                     

   \end{document}

答案1

请尝试以下操作:

\documentclass{report}

\begin{filecontents}{Dedication.tex}
%\chapter*{Dedication}
\cleardoublepage\phantomsection
\addcontentsline {toc}{chapter}{Dedication}%
To Someone
\end{filecontents}

\usepackage{comment} 
\usepackage{amssymb} 
\usepackage{xspace}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{enumerate}
\usepackage{amssymb}
\usepackage{multirow}

\usepackage[letterpaper,left=1in,right=1in,top=1in,bottom=1in]{geometry}
\usepackage{tocbibind}
\usepackage[title,titletoc,toc,page]{appendix}
\usepackage[doublespacing]{setspace}


\usepackage{hyperref}
\hypersetup{
  colorlinks,
  citecolor=black,
  filecolor=black,
  linkcolor=black,
  urlcolor=black}

\setcounter{secnumdepth}{3}

\begin{document}
 \pagenumbering{roman} 
 \setcounter{page}{2}

  %\include{Abstract}
  \include{Dedication}
  % \include{Acknowledgements}
  \tableofcontents
  \listoffigures

 \clearpage
 \pagenumbering{arabic}
 \setcounter{page}{1}

 % \include{someChapter}

 \bibliographystyle{plain}               
 \bibliography{MyLib}                      


  \begin{appendices}
  % \include{Ap1}
  \clearpage
  % \include{Ap2}
  \end{appendices}                     

   \end{document}

\begin{filecontents}和之间的内容\end{filecontents}应该是您的“Dedication.tex”的内容。

相关内容