I'm working on my master thesis and I changed many things in the TOC and chapter/section numbering to decrease depth because I use up until \paragraph and really can't go less. Up until recently, my reference looked like "1.2.3.4.5." (1. is chapter and 5. is paragraph) and now it should look like "I, 2.3.4, (e)" which is more readable (at least I hope). I set my chapters to roman and my paragraphs to alphanumeric.
Before I changed chapter to roman and paragraphs to alphanumeric, my custom command worked great for referencing:
\newcommand{\fullref}[1]{\hyperref[#1]{\ref*{#1} \nameref*{#1} (p. \pageref*{#1})}}
1. ChapterName (p. 1)
1.2. SecName (p. 3)
1.2.3. SubSecName (p. 15)
1.2.3.4. SubSubSecName (p. 17)
1.2.3.4.5. ParagraphName (p. 20)
but now the \ref{#1} part only prints out the same value numbering (only number/only alphanumeric/only roman)
I. ChapterName (p. 1)
2. SecName (p. 3)
2.3. SubSecName (p. 15)
2.3.4. SubSubSecName (p. 17)
(e) ParagraphName (p. 20)
I want it to look like this:
I. ChapterName (p. 1)
I, 2. SecName (p. 3)
I, 2.3. SubSecName (p. 15)
I, 2.3.4. SubSubSecName (p. 17)
I, 2.3.4, (e) ParagraphName (p. 20)
I tried this solution (\newcommand*{\parref}[1]{\hyperref[{#1}]{Section \theparagraph, \nameref*{#1}}}) but the \thechapter gives me the output of the chapter I'm in, not the chapter of the \label.
Here is my "minimal" test, you can jump to !!! to see the command I tried and what I changed.
\documentclass[12pt,a4paper,twoside]{report}
\usepackage{titlesec}
\usepackage[dvipsnames,table]{xcolor}
% table of content formatting
\usepackage{tocloft}
\renewcommand\cftchapaftersnum{.}
\renewcommand\cftsecaftersnum{.}
\renewcommand\thechapter{\Roman{chapter}} % !!! CHANGED NUMBERING STYLE
\renewcommand\thesection{\arabic{section}}
\renewcommand\theparagraph{(\alph{paragraph})}
% Last packages to add
\definecolor{rot}{HTML}{c00000}
\definecolor{bloi}{HTML}{0070c0}
\usepackage{hyperref} % réf à des sections usw
\hypersetup{colorlinks=true,urlcolor=bloi,citecolor=ForestGreen,linkcolor=rot}
% Custom commands
\newcommand{\fullref}[1]{\hyperref[#1]{\ref{#1} \nameref{#1} (p. \pageref{#1})}}
\newcommand{\pgref}[1]{\hyperref[#1]{\ref{#1} (p. \pageref*{#1})}}
% !!! THE COMMAND I'M TRYING TO CREATE
\newcommand{\parref}[1]{\hyperref[{#1}]{\thechapter, \thesubsubsection, \ref{#1} \nameref{#1} (p. \pageref{#1})}}
\begin{document}
\tableofcontents
\clearpage
\chapter{premier}
\label{chap}
\section{first}
\section{second}
\label{sec}
\subsection{subfirst}
\subsection{subsecond}
\label{subsec}
\subsubsection{subsubfirst}
\subsubsection{subsubsecond}
\subsubsection{subsubthird}
\label{subsubsec}
\paragraph{parfirst}
% !!! LABEL
\label{eng}
\chapter{troisième}
\section{itiban}
\subsection{subitiban}
\subsubsection{subsubitiban}
\paragraph{paraitiban}
% !!! THE TEST IS HERE
\parref{eng}
\end{document}
So I wanted to know if it is possible to extract the chapter numbering of the \label (and the (subsubs)sections if my label is a paragraph), to inject this data in the custom command or something. Simply put, is there a way to use \ref with different numbering method, or is there a package that manages it well?
It's my first post here, so don't hesitate to ask me more infos, or tell me if I should have done some things better. Thanks in advance o/
