
첫 번째 항목에 대한 참조로 Ai 대신 Ai를 갖고 싶습니다.
\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}
답변1
죄송합니다. 이전 답변은 BS였습니다. 이것은 작동합니다:
그냥 추가하세요\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}
오래된 답변:
그냥 추가하세요\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}
답변2
enumitem
대신 사용하면 키 enumerate
를 사용할 수 있습니다 ref
.
\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}