I am using enumerate environment to create a list of answers on tasks in my book where item label is a number of a task. I want to put a page number where the task is located immediately under label item.
This is what I have now:
\documentclass[a4paper,14pt,oneside]{extbook}
\usepackage{enumitem}
\usepackage[many]{tcolorbox}
\usepackage{hyperref}
\hypersetup{unicode = true,colorlinks=true,linkcolor={red},pageanchor = false}
% Defining custom tcolorbox environment
\newtcolorbox[auto counter,number within=chapter]{task}[1][]{%
title=\thetcbcounter,#1
}
\begin{document}
\begin{task}[label={task0.1}]
Task condition
\end{task}
\begin{task}[label={task0.2}]
Task condition
\end{task}
\begin{task}[label={task0.3}]
Task condition
\end{task}
% List with tasks answers
\begin{enumerate}
\item [\textbf{0.1}\\{\small p.\pageref{task0.1}}] Task 0.1 answer
\item [\textbf{0.2}\\{\small p.\pageref{task0.2}}] Task 0.2 answer
\item [\textbf{0.3}\\{\small p.\pageref{task0.3}}] Task 0.3 answer
\end{enumerate}
\end{document}
And how it looks:
As you can see double backslash \\
symbol and also \newline
command do not work here.
How to move p.1 on the next line under task number?
And one more thing. Is there a way to get tcolobox "task" counter by it's label in order not to write task number explicitly?