¿Cómo se puede colocar un punto entre la etiqueta del elemento y del subelemento para referencias a listas anidadas?

¿Cómo se puede colocar un punto entre la etiqueta del elemento y del subelemento para referencias a listas anidadas?

Quiero tener Ai en lugar de Ai como referencia al primer elemento.

\documentclass[twoside]{book}
\usepackage{enumerate}

\begin{document}  
\begin{enumerate}[A.]
  \item\label{FirstItem} First Item
  \begin{enumerate}[i.]
    \item\label{FirstSub} First Subitem
  \end{enumerate}
\end{enumerate}%[A.]
To reference the First Item,  \ref{FirstItem} and the first subitem, \ref{FirstSub}.
\end{document}

Respuesta1

Lo siento, mi antigua respuesta era una tontería. Esto funciona:

Solo agrega\makeatletter\renewcommand{\p@enumii}{\theenumi.}\makeatother

\documentclass[twoside]{book}
\usepackage{enumerate}
\makeatletter\renewcommand{\p@enumii}{\theenumi.}\makeatother
\begin{document}  
\begin{enumerate}[A.]
\item\label{FirstItem}
First Item
\begin{enumerate}[i.]
\item\label{FirstSub}
First Subitem
\end{enumerate}
\end{enumerate}%[A.]
To reference the First Item,  \ref{FirstItem} and the first subitem, \ref{FirstSub}.
\end{document}

ingrese la descripción de la imagen aquí


Antigua respuesta:

Solo agrega\renewcommand{\labelenumii}{\theenumi.\theenumii}

\documentclass[twoside]{book}
\usepackage{enumerate}
\renewcommand{\labelenumii}{\theenumi.\theenumii}
\begin{document}  
\begin{enumerate}[A.]
\item\label{FirstItem}
First Item
\begin{enumerate}[i.]
\item\label{FirstSub}
First Subitem
\end{enumerate}
\end{enumerate}%[A.]
To reference the First Item,  \ref{FirstItem} and the first subitem, \ref{FirstSub}.
\bigskip
I want to have A.i instead of Ai.   I could put the dot myself if I could make the reference to the subitem just print i, which I also can't figure out.
\end{document}

Respuesta2

Usando enumitemen lugar de enumerateusted puede usar la refclave:

\documentclass[twoside]{book}

\usepackage{enumitem}

\begin{document}  



\begin{enumerate}[label=\Alph*.]
\item\label{FirstItem}
First Item

\begin{enumerate}[label=\roman*.,ref=\theenumi\roman*]% \theenumi is the first level counter
\item\label{FirstSub}
First Subitem
\end{enumerate}

\end{enumerate}%[A.]


To reference the First Item,  \ref{FirstItem} and the first subitem,
\ref{FirstSub}.
\bigskip

I want to have A.i instead of Ai.   I could put the dot myself if I could make the reference to the subitem just print i, which I also can't figure out.



\end{document}

ingrese la descripción de la imagen aquí

información relacionada