I'm trying to reference a label's parent so it outputs something like "Section, Subsection" or "Section, Subsection, Subsubsection". I've come close with smartref
by doing the following:
\usepackage{smartref}
\addtoreflist{section}
\newcommand{\breadref}[1]{\sectionref{#1}, \fullref{#1}}
but this unfortunately only outputs the number of the section and not the name of the section. The documentation of smartref
alludes to a \byname
option but doesn't seem to actually provide a working example of it, making it difficult to implement.
It seems like this should be an easy thing to do, and a useful thing at that, especially if subsections might move between sections making hard-coded references to parents a pain.
Any ideas would be appreciated.
Mike
EDIT:
Ideally, it would look like this:
nameref
andcleveref
. – egreg Dec 10 '18 at 12:54