I would like to know if there's a functionality that would give me the chapter's name by referencing a label that I know is defined somewhere in this chapter?
For example:
\chapter{What's it's name?}
\label{chap:whatsItsName}
\section{Party}
\label{sec:party}
\subsection{Going down}
\label{subSec:goingDown}
[...]
\chapter{Second chapter}
[...]
Like said in Section \ref{subSec:goingDown} in the Chapter \chapterNameRef{subSec:goingDown} [...]
Which would result in a something like this:
Chapter What's it's name?
Party
Going down
[...]
Second chapter
[...]
Like said in Section 1.1.1 in the Chapter What's it's name? [...]
I know that there's nameref which could give me the chapter's name, if I reference the chapter's label, but I want to know if it's possible to reference a subsection's label and get the name of the chapter it's located in.