0

From example you can see that red reference is looking different (no space between first two numbers and second two numbers). Color red is irrelevant.

MWE

\documentclass{article}

\usepackage{enumitem}
\usepackage[bookmarksopen,colorlinks,plainpages=false,urlcolor=blue,hypertexnames=false,unicode]{hyperref}

\def\twodigits#1{
  \ifnum#1<10 0\fi
  \number#1}

\begin{document}
\section{Section}
\subsection{subsection}
\subsubsection{Nice Subsection} \label{sss:nice-subsection}
\paragraph{Description}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
\paragraph{Some list}
\begin{enumerate}[label={F~--\protect\twodigits{\arabic{subsubsection}}\protect\twodigits{\theenumi}},leftmargin=*]
    \item \label{item:2} Item text.
    \item \label{item:1} Item text2.
\end{enumerate}
\paragraph{List two}
\begin{enumerate}[label={N~--\protect\twodigits{\arabic{subsubsection}}\protect\twodigits{\theenumi}},leftmargin=*]
    \item Item text.
    \item Look \ref{item:1} to \ref{item:2}.
\end{enumerate}
\end{document}

Produces

enter image description here

4

If you want a space you should add it to your label definition instead of relying on the spurious space in your \twodigits definition:

\documentclass{article}

\usepackage{enumitem}
\usepackage[bookmarksopen,colorlinks,plainpages=false,urlcolor=blue,hypertexnames=false,unicode]{hyperref}

\def\twodigits#1{\ifnum#1<10 0\fi \number#1}

\begin{document}
\section{Section}
\subsection{subsection}
\subsubsection{Nice Subsection} \label{sss:nice-subsection}
\paragraph{Description}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
\paragraph{Some list}
\begin{enumerate}[label={F~--~\protect\twodigits{\arabic{subsubsection}}~\protect\twodigits{\theenumi}},leftmargin=*]
    \item \label{item:2} Item text.
    \item \label{item:1} Item text2.
\end{enumerate}
\paragraph{List two}
\begin{enumerate}[label={N~--~\protect\twodigits{\arabic{subsubsection}}~\protect\twodigits{\theenumi}},leftmargin=*]
    \item Item text.
    \item Look \ref{item:1} to \ref{item:2}.
\end{enumerate}
\end{document}

enter image description here

| improve this answer | |
  • "spurious space in your \twodigits definition" exactly! I could not find the "space" I am blind... thank you. – Kyslik Mar 15 '17 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.