
다음 코드를 사용할 때 1. 대신 1장 제목을 원한다는 점을 제외하고는 아래 이 코드로 얻은 결과를 정확하게 복제하고 싶습니다.
\usepackage{fmtcount}
\renewcommand{\thechapter}{\Numberstring{chapter}}
효과가 있었지만 목차가 손상되어 1.1, 3과 같은 번호가 표시되기 시작했습니다. 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}