I use minted for listing Objective-C code and I need to replace the label text from Listing 1. to Source Code #chapter_number#.#subsection_number#.#subsubsection_number#.#label_number#
like "Source Code 2.2.2.1. Starting the accelerometer". Also, I need to refer this like "Source Code 2.2.2.1.".
How can I accomplish this?
I tried:
\usepackage{minted}
\renewcommand\listingscaption{Source Code \thesubsection -}
But it isn't working when I try to use \cref
or \ref
or \autoref
I got "listing 1 1".
Thanks for your time and help!
Best Answer
This seems to be what you want: