[texhax] enumerate inconsistency

Victor Ivrii vivrii at gmail.com
Sat Nov 7 11:24:50 CET 2015


If in {enumerate} item does not have a custom "label" then supplying it
with a \label{A} works: \ref{A} returns a value of the standard label.

On the other hand, if item has a custom label then \label{C} fails: \ref{C}
returns either empty (as in the example below) or value of the larger
environment (say, section)

This happens both with/without  enumitem package.



%%%%%%%%%%%%
\documentclass[12pt]{article}
%\usepackage{enumitem}
%\usepackage{hyperref}
\begin{document}

%%%Standard labels%%%
\begin{enumerate}
\item one\label{A}
\item two\label{B}
\end{enumerate}

\ref{A} \ref{B}

%%%Custom labels%%%
\begin{enumerate}
\item[oh] one\label{C}
\item[ah] two\label{D}
\end{enumerate}

\ref{C} \ref{D}
\end{document}

-- 
Victor
Victor Ivrii
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20151107/683c0928/attachment.html>


More information about the texhax mailing list