我的附录标题为章节,如何将其更改为附录?

我的附录标题为章节,如何将其更改为附录?

我有 3 个附录。它们的标题应为附录 A、附录 B 和附录 C。但我看到的却是第 A 章、第 B 章和第 C 章。

我尝试过 \appendix没有appendix包装的和\begin{appendix}......有包装\chapter{Something}的。\end{appendix}appendix

代码:

\documentclass[a4paper,12pt,twoside]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
%---------------------------------------------------------%
%Page Layout

\usepackage{geometry}
\geometry{
    a4paper,
    %total={170mm,257mm},
    left=1in,
    right=1in,
    top=1in,
}
%---------------------------------------------------------%
%Modifying Headings

\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\LARGE\bfseries\centering}{CHAPTER\ \thechapter}{1pt}{\LARGE}
\titlespacing*{\chapter}{0pt}{-50pt}{0pt}
%Paragraph and line spacing
\setlength{\parindent}{4em}
\setlength{\parskip}{1em}
\renewcommand{\baselinestretch}{1.5}
%---------------------------------------------------------%
%Header Footer

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{1pt}
%Remove H-F from empty page
\usepackage{emptypage}
%---------------------------------------------------------%
%Image
\usepackage{graphicx}
\usepackage{color}
\graphicspath{ {images/} }
\usepackage{ float }
\usepackage[export]{adjustbox}
%---------------------------------------------------------%
%caption
\usepackage{caption}
\usepackage{subcaption}
%---------------------------------------------------------%
%Enumerate
\usepackage{enumerate}
\usepackage{enumitem}
%---------------------------------------------------------%
%Quote
\usepackage{epigraph}

\renewcommand{\epigraphsize}{\normalsize}

\setlength{\epigraphwidth}{0.7\textwidth}

\renewcommand{\textflush}{flushright} \renewcommand{\sourceflush}{flushright}

\let\originalepigraph\epigraph 
\renewcommand\epigraph[2]{\originalepigraph{\textit{#1}}{\textsc{#2}}}
%---------------------------------------------------------%
%To insert blank page
\usepackage{afterpage}
\def\blankpage{%
    \clearpage%
    \thispagestyle{empty}%
    \addtocounter{page}{-1}%
    \null%
    \clearpage}
%---------------------------------------------------------%
%ToC Name Change
\addto\captionsenglish{\renewcommand*\contentsname{TABLE OF CONTENTS}}
%LoT, LoT Name change
\addto\captionsenglish{\renewcommand{\listfigurename}{LIST OF FIGURES}}
\addto\captionsenglish{\renewcommand{\listtablename}{LIST OF TABLES}}


%---------------------------------------------------------%
%Linked ToC
\usepackage[linktocpage=true]{hyperref}
%---------------------------------------------------------%
%nominclature
\usepackage[intoc]{nomencl}
\makenomenclature
%---------------------------------------------------------%
%Table Itemize
\usepackage{tabularx}
%---------------------------------------------------------%
%Table formatting array
\usepackage{array}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
%Longable
\usepackage{longtable}
%---------------------------------------------------------%
%Citation
\usepackage{cite}
\usepackage{url}
\usepackage{natbib}
\usepackage{apalike}
%---------------------------------------------------------%
%Acronyms
%Slash Frac 
\usepackage{xfrac}

%---------------------------------------------------------%
%Appendices
%\usepackage[title,titletoc]{appendix}
\addto\captionsenglish{\renewcommand*\appendixname{APPENDIX}}
%---------------------------------------------------------%
\titlespacing*{\chapter}{0pt}{-50pt}{0pt}
\chapter{INTRODUCTION}
\pagenumbering{arabic}
\fancyhead[LE,RO]{\leftmark}
\fancyfoot[RE,LO]{\rightmark}
\fancyfoot[LE,RO]{\thepage}

write ups of the chapter

\chapter{THEORY AND FORMULATION}

More write ups

\chapter{RESULTS}

bla bla bla

\appendix
\chapter{33 Node RDN}
Data
\chapter{34 Node RDN}
Data
\chapter{69 Node RDN}
Data

\bibliographystyle{agsm1}
[![Appendix appears as Chapter A][1]][1]\bibliography{reffinale}

答案1

您应该使用在和之间自动切换\chaptertitlename的。titlesec\chaptername\appendixname

\titleformat{\chapter}[display]
  {\normalfont\LARGE\bfseries\centering}
  {\chaptertitlename\ \thechapter}
  {1pt}
  {\LARGE}

我建议修改你的前言,先加载软件包,然后再进行设置。这样可以更容易地修复可能的冲突。例如,hyperref应该加载最后的enumerate不应该与一起加载enumitem(最好是后者)。

\documentclass[a4paper,12pt,twoside]{report}
%\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{geometry}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{color}
\usepackage{titlesec}
\usepackage{fancyhdr}
\usepackage{emptypage}
\usepackage{float}
\usepackage[export]{adjustbox}
\usepackage{caption}
\usepackage{subcaption}
%\usepackage{enumerate} % not along with enumitem
\usepackage{enumitem}
\usepackage{epigraph}
\usepackage{afterpage}
\usepackage[intoc]{nomencl}
\usepackage{tabularx}
\usepackage{array}
\usepackage{longtable}
\usepackage{cite}
\usepackage{url}
\usepackage{natbib}
\usepackage{apalike}
\usepackage{xfrac}
%\usepackage[title,titletoc]{appendix}

\usepackage[linktocpage=true]{hyperref}

%Page Layout

\geometry{
    a4paper,
    %total={170mm,257mm},
    left=1in,
    right=1in,
    top=1in,
}

%Modifying Headings
\titleformat{\chapter}[display]
  {\normalfont\LARGE\bfseries\centering}
  {\chaptertitlename\ \thechapter}
  {1pt}
  {\LARGE}
\titlespacing*{\chapter}{0pt}{-50pt}{0pt}

%Paragraph and line spacing
\setlength{\parindent}{4em}
\setlength{\parskip}{1em}
\renewcommand{\baselinestretch}{1.5}

%Header Footer
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\leftmark}
\fancyfoot[RE,LO]{\rightmark}
\fancyfoot[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{1pt}

%Image
\graphicspath{ {images/} }

\renewcommand{\epigraphsize}{\normalsize}
\setlength{\epigraphwidth}{0.7\textwidth}
\renewcommand{\textflush}{flushright}
\renewcommand{\sourceflush}{flushright}
\let\originalepigraph\epigraph 
\renewcommand\epigraph[2]{\originalepigraph{\textit{#1}}{\textsc{#2}}}

%To insert blank page
\newcommand\blankpage{%
    \clearpage
    \thispagestyle{empty}%
    \addtocounter{page}{-1}%
    \mbox{}%
    \clearpage}

%ToC Name Change
\addto\captionsenglish{\renewcommand*\contentsname{TABLE OF CONTENTS}}

%LoT, LoT Name change
\addto\captionsenglish{\renewcommand{\listfigurename}{LIST OF FIGURES}}
\addto\captionsenglish{\renewcommand{\listtablename}{LIST OF TABLES}}

%nomenclature
\makenomenclature

%Table formatting array
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}

%---------------------------------------------------------%
%Appendices
\addto\captionsenglish{\renewcommand*\appendixname{APPENDIX}}
%---------------------------------------------------------%

\begin{document}

\chapter{THEORY AND FORMULATION}

More write ups

\appendix
\chapter{33 Node RDN}
Data

\end{document}

在此处输入图片描述

答案2

Latex 使用\chaptername\appendixname来存储Chapter和,Appendix以便它们可以被 Babel 等修改。因为它将附录实现为章节,所以它还使用\@chapapp在两者之间切换。

这是我在您的代码中发现的唯一地方chapter。我还没有测试过这一点。

\makeatletter
\titleformat{\chapter}[display]
{\normalfont\LARGE\bfseries\centering}{\MakeUppercase\@chapapp~\thechapter}{1pt}{\LARGE}
\makeatother

相关内容