章节标题文字和图表

章节标题文字和图表

我希望获得与下面这段代码所获得的结果完全相同的结果,只是我想要第一章标题而不是 1。当我使用以下代码时`

\usepackage{fmtcount}
\renewcommand{\thechapter}{\Numberstring{chapter}}

它确实有效,但它破坏了我的目录,我开始看到一些编号,如一.1、三.4 等等。有什么方法可以保留目录中的图形编号,同时将文档正文中的章节标题更改为文本?如能得到任何帮助,我将不胜感激

\documentclass[a4paper,12pt]{report}
\usepackage[margin=1in, left=3.5cm, top=2.5cm, right=2.5cm, bottom=2.5cm]{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage[titletoc]{appendix}
\usepackage [T1]{fontenc}
\usepackage{titletoc}
\titleformat{\chapter}[display]
{\normalfont\Large\bfseries\centering}{\centering\chaptertitlename\ \thechapter}{0pt}{\Large}
\titlespacing*{\chapter}
{0pt}{-60pt}{10pt}
\begin{document}
\begin{spacing}{1}
\tableofcontents
\end{spacing}
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables
\cleardoublepage
\chapter{Introduction}
\section{Background of Study}
\lipsum[1-2]

\chapter{literature}
\section{Empirical Literature}
\lipsum[1-2]

\end{document}

答案1

不要重新定义,而是在 的论点中\thechapter使用:\Numberstring{chapter}\titleformat

\usepackage{titlesec}
\usepackage{fmtcount}
%\renewcommand{\thechapter}{\Numberstring{chapter}}
\titleformat{\chapter}[display]
  {\normalfont\Large\bfseries\centering}
  {\centering\chaptertitlename\ \Numberstring{chapter}}% <- changed
  {0pt}{\Large}

例子:

\documentclass[a4paper,12pt]{report}
\usepackage[margin=1in, left=3.5cm, top=2.5cm, right=2.5cm, bottom=2.5cm]{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage[titletoc]{appendix}
\usepackage [T1]{fontenc}
\usepackage{setspace}% <- added
\usepackage[nottoc]{tocbibind}% <- added
\usepackage{titletoc}
\usepackage{titlesec}% <- added
\usepackage{fmtcount}% <- added
\titleformat{\chapter}[display]
  {\normalfont\Large\bfseries\centering}
  {\centering\chaptertitlename\ \Numberstring{chapter}}% <- changed
  {0pt}{\Large}
\titlespacing*{\chapter}
{0pt}{-60pt}{10pt}
\begin{document}
\begin{spacing}{1}
\tableofcontents
\end{spacing}
%\addcontentsline{toc}{chapter}{\listtablename}% <- removed
\listoftables
\cleardoublepage
\chapter{Introduction}
\section{Background of Study}
\lipsum[1-2]
\chapter{literature}
\section{Empirical Literature}
\lipsum[1-2]
\end{document}

相关内容