# How to refer to a chapter with a word

I would like to refer to my chapters with the notation "First Chapter", "Second Chapter" etc, rather than "Chapter 1", "Chapter 2", etc. How can I do this?

\documentclass{scrreprt}

\usepackage[english]{babel}
\usepackage{classicthesis-preamble}
\usepackage{classicthesis}

% A personalization of description environment
\renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}\small\textsc{#1}}

\begin{document}
\chapter{MyChapter}
\label{ch:first}

\begin{description}
\end{description}

\end{document}

-

The right package to use, along with refcount, is numname:

\usepackage{refcount,numname}
\newcommand{\refc}[1]{\ordinaltoName{\getrefnumber{#1}} Chapter}

In the \refc{ch:first} we do something.


\newcommand{\refc}[1]{\hyperref[#1]{\ordinaltoName{\getrefnumber{#1}} Chapter}}

-
Also here, the text is ok but it doesn't link to the chapter. –  Baduel Dec 14 '11 at 13:35
@Baduel See edited message –  egreg Dec 14 '11 at 13:39
Thanks. How can I have the same result with the Appendix? –  Baduel Dec 14 '11 at 14:25
I've found the answer: \autoref =) –  Baduel Dec 14 '11 at 14:27

You may use something like

\documentclass{scrreprt}

\usepackage[english]{babel}
\usepackage{classicthesis-preamble}
\usepackage{classicthesis}

% A personalization of description environment
\renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}\small\textsc{#1}}

\usepackage{refcount}
\newcommand*{\refc}[1]{%
\setrefcountdefault{0}%

\hyperref[#1]{\ifcase\getrefnumber{#1}
???
\or First
\or Second
\or Third
\else A kind of yellow
\fi Chapter}}

\begin{document}
\chapter{MyChapter}
\label{ch:first}

\begin{description}
\end{description}

\end{document}


to do this. There's also a package engord for english ordinals, that may be used instead of a \ifcase construct.

Alternative you may patch \refstepcounter and redefine \p@chapter to make all \ref to a chapter to be text references:

\documentclass{scrreprt}

\usepackage[english]{babel}
\usepackage{classicthesis-preamble}
\usepackage{classicthesis}

% A personalization of description environment
\renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}\small\textsc{#1}}

\makeatletter
% 1. Allow \p@… to be a command with an argument
\renewcommand*\refstepcounter[1]{\stepcounter{#1}%
\protected@edef\@currentlabel
{\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
}
% Then ignore this argument at \p@chapter and use the completely different
\renewcommand\p@chapter[1]{\ordinalnumbertext{\value{chapter}} \@chapapp}%
\makeatother

\newcommand*{\ordinalnumbertext}[1]{%
\ifcase#1
???
\or First
\or Second
\or Third
\else A kind of yellow
\fi
}

\begin{document}
\chapter{MyChapter}
\label{ch:first}

\begin{description}
\end{description}

\appendix
\chapter{MyChapter}
\label{ch:firsta}

\begin{description}

The text is right, but refc doesn't refer! –  Baduel Dec 14 '11 at 12:25