格式化章节和目录

格式化章节和目录

我希望章节标题使用罗马字母。我已经这样做了,但这会导致目录也包含罗马字母和阿拉伯字母的混合。我希望目录采用默认格式。有人可以提供实现此目的的链接或参考吗?谢谢。我正在添加示例代码

\documentclass[12pt,twoside]{report}
\usepackage[dvips]{graphicx}
\usepackage[cmex10]{amsmath}
\usepackage{setspace}
\usepackage{float}
%\usepackage{showframe}
%\usepackage{etoolbox}
\usepackage[margin=1.25in]{geometry}
 \usepackage{subcaption}
\usepackage{cite}
\usepackage{caption}
\usepackage{etoolbox}
\usepackage{tabularx}
\usepackage{titletoc}


 \usepackage[compact]{titlesec}
   \makeatletter
   \patchcmd{\@makechapterhead}{50\p@}{0pt}{}{}
   \patchcmd{\@makeschapterhead}{50\p@}{0pt}{}{}
   \makeatother 





    \titleformat{\chapter}[display]
       {\normalfont\large\bfseries\centering}{\chaptertitlename\ \thechapter}      {0pt}{\large\bfseries}

   \titleformat*{\section}{\normalsize\bfseries}
   \titleformat*{\subsection}{\small\bfseries}
   \titleformat*{\subsubsection}{\small\bfseries}
   \setcounter{tocdepth}{5}
   \setcounter{secnumdepth}{5}
   \renewcommand\thesection{\arabic{chapter}}

    \begin{document}
  %\cleardoublepage% 
    enter image description here
         \clearpage
         %\pagenumbering{roman}
       \renewcommand{\contentsname}{Table of Contents}
  \tableofcontents
  %%
  %%
  %\newpage
  %\addcontentsline{toc}{section}{List of Figures} 
  %\listoffigures
  %%
  %\newpage
  %\addcontentsline{toc}{section}{List of Tables}
  %\listoftables





  %
  \renewcommand{\thechapter}{\Roman{chapter}}
  \titleformat{\chapter}[display]
     {\normalfont\large\bfseries\centering}{\chaptertitlename\   \thechapter} {12pt}{\large}

  %\renewcommand{\thechapter}{\arabic{chapter}}

   \onehalfspacing
   \clearpage 
   \chapter{Test Chapter}

     \section{Test Chapter Section}
     \subsection{test subsection b}
      \chapter{Test Chapter b}
      \section{test Chapter section c}
     \subsection{test subsection c}
     \end{document}

相关内容