TransWikia.com

How to change Appendix chapter name

TeX - LaTeX Asked by user6212 on April 8, 2021

I have a long appendix which includes a lot of equations and figures.
My document class is report.
In order to have a separate appendix section, I used:

appendix
chapter{The first appendix} 

The outcome shows like this

Chapter A

The first appendix

How can I change it to:

Appendix A

The first appendix

I also tried

chapter*{Appendix: The First Appendix}
addcontentsline{toc}{chapter}{Appendix: The First Appendix}

But in this way, my equation number does not start with A.1. This will not work for me.

5 Answers

I do not really understand your problem. However, maybe that you are looking fro something like this:

documentclass{report}
usepackage[english]{babel}
usepackage{blindtext}

makeatletter
defsetChapterprefix#1{gdef@Prefix{#1}}
setChapterprefix{}
renewcommand*l@chapter[2]{%
  ifnum c@tocdepth >m@ne
    addpenalty{-@highpenalty}%
    vskip 1.0em @plusp@
    setlength@tempdima{1.5em}%
    begingroup
      parindent z@ rightskip @pnumwidth
      parfillskip -@pnumwidth
      leavevmode bfseries
      advanceleftskip@tempdima
      hskip -leftskip
      @Prefix 
      #1nobreakhfil nobreakhb@xt@@pnumwidth{hss #2}par
      penalty@highpenalty
    endgroup
  fi}
    makeatother
begin{document}
    tableofcontents
    chapter{Introduction to Quantum Electrodynamics}
        blindtext
    appendix
    addtocontents{toc}{protectsetChapterprefix{Appendix }}
    chapter{Calculus of Variations}
        blindtext
    chapter{Digital Signal Processing}
        blindtext
end{document}

enter image description here

Answered by user2478 on April 8, 2021

As xport noted, you probably have an old (very old) version of TeX. Newer version don't have this problem. The best solution is to update; you probably have a lot of other since-corrected misfeatures in addition to this one. If you can't update, try the following:

appendix
renewcommandchaptername{Appendix}
chapter{The first appendix} 

Answered by David Hammen on April 8, 2021

Use the following code within the chapter not the preamble:

setcounter{chapter}{0}
appendix
makeatletter
renewcommand{@chapapp}{Appendix}
makeatother

Answered by Mori on April 8, 2021

Before starting the chapter that will be your appendix insert the following commands:

renewcommandchaptername{Appendix}                      % hereafter, chapters are called "Appendix"
renewcommandthechapter{Alph{chapter}}                % chapter number in alph letters
renewcommandthesection{Alph{chapter}.Roman{section}} % make sections "A.I"
setcounter{chapter}{0}                                  % start numbering chapters from 1 on again

Answered by kmsdev on April 8, 2021

This might be a corner case but for me, none of the answers works. Because I'm using titlesec to change all other title formats, the chapter name is fixed by me using titleformat in the preamble. Adding the following command right before the appendix can change the title name for me

appendix % change numbering
titleformat{chapter}{normalfontlarge}{Appendix thechapter:}{1em}{} % change keyword
input{../maintext/AppendixA} % load appendix (starting with chapter)

Answered by Yvon on April 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP