# [texhax] Labels and References with "varioref"

Victor Ivrii vivrii at gmail.com
Sun Dec 29 19:10:02 CET 2013

Is that what you want? (replace \blindtext by the real content)

\documentclass[12pt]{article}

\usepackage{enumitem}
\usepackage{blindtext}
\begin{document}
\begin{enumerate}[label={\arabic*}]
\item\label{boo} \blindtext
\item\label{doo}
\begin{enumerate}[label={\Alph*}]
\item\label{soo} \blindtext
\item\label{too} \blindtext

\end{enumerate}
\item\label{poo} \blindtext

\end{enumerate}

Item \ref{doo}\ref{soo} means that

\end{document}

On Sun, Dec 29, 2013 at 10:31 AM, Jerry <jerry at seibercom.net> wrote:

> I don't know id this is the right place to ask this question, but it is
> as good as any to start with. I am trying to learn how "LaTeX" and use
> it as a possible replacement for MS Word. In the following example, I
> am trying to create proper references to items in numbered lists. I
> don't explain things to well, so I apologize in advance.
>
> I am using the "varioref" package to create labels and references. I
> need to get items create with
>
> \begin{enumerate}
> \item bla bla bla
> \end{enumerate}
>
> referenced correctly.
>
> In the following example I need to get the label named in line 11
> correctly referenced on line 13.
>
> \begin{enumerate}
> \item this is item 1
> \item This is item 2
>   \begin{enumerate}
>   \item this is item 2A
>   \item This is item 2B
>   \end{enumerate}
> \item This is item 3
> \item this is item 4
>   \begin{enumerate}
>   \item This is item 4A \label{itm:4A}
>   \end{enumerate}
> \item This is item 5 which is suppose to reference \vref{itm:4A}
> \end{enumerate}
>
> The problem is that (1) it only prints out "A"  and not "item 4A". I
> added this to the preamble, but it doesn't help.
>
> \labelformat{enumi}{item~#1}
> \labelformat{enumii}{item~#1}
> \labelformat{enumiii}{item~#1}
> \labelformat{enumiiii}{item~#1}
>
> This may not seem like a huge problem, but these lists are used in
> legal documents and can be quite lengthy and several levels deep. I
> need the reference to be more precise than just printing out a vague
> letter or number that can refer to several placed in the section.
>
> --
> Jerry
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>

--

Victor Ivrii
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20131229/255e7c8a/attachment.html>