Referencing items in list with varioref

Jerry Seibert jerry at
Fri Nov 5 14:54:05 CET 2021

I have been pulling my hair out, trying to figure out what I am doing
wrong. I need to create a document that strictly follows the numbering
style used by the municipality I work for. This is casing a problem when
I try to reference items.

The code I am using is shown below. It works fine up to the forth level,
then it breaks down. I am hoping someone can assist me.




% !TeX TS-program =
% !TeX encoding = UTF-8
% !TeX spellcheck = en_US
\RequirePackage{silence} \WarningFilter{fixltx2e}{} %
\usepackage[verbose=silent]{microtype} %Subliminal refinements towards typographical perfection%
\usepackage[letterpaper, left=0.50in, right=0.50in, top=1.0in, bottom=1.00in]{geometry} %add ``showframe'' to see the margins%
\usepackage{fontenc} % Allows the user to select font encodings%
\usepackage[dvipsnames,svgnames,x11names,table,hyperref,fixpdftex]{xcolor} % Driver independent access to several kinds of colors, tints, etcetera%
\usepackage[full]{textcomp} % Font families with sub-encoding%
\usepackage[inline]{enumitem} % Control layout of itemize, enumerate, description - use enumerate* for inline lists}%
\usepackage[parfill]{parskip} % Adjust paragraph spacing%
\usepackage{calc} % Simple arithmatic in latex commands%
\usepackage{fancyhdr} % Custom page headers and footers%
\usepackage{graphicx} % Enhanced support for graphics % Driver independent color extentions for latex and pdflatex%
\usepackage{lastpage} % If the hyperref package is used, the references are hyperlinked to their aims. If these hyperlinks shall be suppressed, \pageref*{...} instead of \pageref{...}can be used.%
\usepackage{anyfontsize} % Lets the user select any font size i.e. \fontsize {}{}\selectfont%
\usepackage[nospace]{varioref} % This package defines the commands \vref, \vpageref, \vrefrange, and \vpagerefrange for LATEX2".%
\usepackage[hidelinks]{hyperref} % Must be loaded last. It extends the functionality of all the LATEX cross-referencing commands (including the table of contents, bibliographies etc) to produce \special commands which a driver can turn into hypertext links%

\put(0,-\paperheight){\tikz[overlay]\draw[line width=2pt](10pt,10pt) rectangle (\paperwidth-10pt,\paperheight-10pt);}}

%% Needed to allow the use of \pdfcreationdate to work correctly
\edef\dtm at pdfcreationdate{\pdfcreationdate}%
	\edef\dtm at pdfcreationdate{\pdffeedback creationdate}%
} %


%% enumerate list

\pagestyle{fancy} % set page style to fancy%
\fancyfoot{} % clear the footers%
\fancyhead{} % clear the headers%
\renewcommand{\headrulewidth}{0pt} % Eliminate the head rule line%
\renewcommand{\footrulewidth}{2.0pt} % Create a separator line between the document and the footer 2.0pt wide%
\fancyfoot[l]{{\footnotesize \textbf{City of Creedmoor}}}%
\fancyfoot[c]{{\footnotesize \textbf{Creedmoor Community Development}}}%
\fancyfoot[r]{{\footnotesize \textbf{Page \thepage\ of~\pageref*{LastPage}}}}%

%% Setting main front to Lucida Bright
\setmainfont{Lucida Bright} %


\author{Gerard E. Seibert}%
\title{Certificate of Zoning Compliance}%


\item This is item one.
	\item This is item two, one level down, with a label. \label{ThisWorks}
	\item End of list


	\item \textbf{This works as expected:} See \vref*{ThisWorks}
	\item \textbf{This one works:} \vref*{first}
	\item \textbf{Or this one:} \vref*{second}
	\item \textbf{Or the third one:} \vref*{three}
	\item \textbf{this one gives an incorrect reference:} \vref*{four}


	\item Example \#1 \label{first}
		\item Example \#2 \label{second}
			\item Example \#3 \label{three}
				\item Example \#4 \label{four}


More information about the texhax mailing list.