Text Formattingchange appendix label

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
kvaso
Posts: 9
Joined: Sun Apr 24, 2011 4:49 pm

change appendix label

Post by kvaso »

Hi,
could you please help me, how to rename appendix label?
e.g.:

Code: Select all

Appendix A This is my appendix chapter
into

Code: Select all

MyAppx A This is my appendix chapter
(there is some weird Slovak translation of word appendix, so I want to change it)

thanks a lot

working example:

Code: Select all

\documentclass[oneside,english]{book}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{babel}

\begin{document}

\chapter{Sample chapter}

some text here

\appendix

\chapter{The first appendix}

some text \#2


\chapter{The second appendix}

some text \#3
\end{document}
Last edited by kvaso on Sun Apr 24, 2011 6:00 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

change appendix label

Post by Stefan Kottwitz »

Hi kvaso,

welcome to the board!

It's great that you post a minimal working example. That makes it easy to help. After loading babel by \usepackage{babel}, use this line for modifying the appendix name:

Code: Select all

\addto{\captionsenglish}{\renewcommand*{\appendixname}{MyAppx}}
A simple \renewcommand* would not be sufficient, at least within the preamble, since babel does modifications at the beginning of a document. Its feature \addto helps to solve such issues.

If English won't be used, a different macro name instead of \captionsenglish would be required, matching the used language.

Stefan
LaTeX.org admin
kvaso
Posts: 9
Joined: Sun Apr 24, 2011 4:49 pm

Re: change appendix label

Post by kvaso »

unfortunately I can't make it work
could you please give a your working example :)

I've put it right after \appendix command
(I am using code I provided earlier, so English is used)
thx
kvaso
Posts: 9
Joined: Sun Apr 24, 2011 4:49 pm

change appendix label

Post by kvaso »

my fault...

I just need to read better - you hava already written that
Stefan_K wrote:After loading babel by \usepackage{babel}, use this line for modifying the appendix name:
thanks again
Post Reply