
enumitem を使用する場合、ラベル名を次のように変更します。
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{enumitem}
\begin{document}
\section{First section}
\begin{enumerate}[leftmargin=*,labelindent=\parindent,=itemsep=0pt,label=Part \arabic*.]
\item\label{part:1} append this;
\item\label{part:2} advance that;
\item\label{part:3} advance theother.
\end{enumerate}
Look at \ref{part:1} where we get the extra period. It's particularly bad if I refer to \ref{part:2}. This gives me ".." at the end of the sentence.
\end{document}
\ref{part:1}
Part 1.
私が望む場所が表示されますPart 1
。参照するときにピリオドを削除し、リストに表示されるときにピリオドを保持するにはどうすればよいでしょうか?
答え1
enumitem
この目的のために特別に設計されたキーもありますref
。
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{enumitem}
\begin{document}
\section{First section}
\begin{enumerate}[leftmargin=*,labelindent=
\parindent,=itemsep=0pt,label=Part \arabic*., ref=Part \arabic*]
\item\label{part:1} append this;
\item\label{part:2} advance that;
\item\label{part:3} advance theother.
\end{enumerate}
Look at \ref{part:1} where we get the extra period.
\end{document}