I would like to provide an alternative version of only some part of already existing algorithm, using the algorithm2e package. My source looks like:
\begin{algorithm}[t]
\dots \;
\nlset{\ref{alg:previous:ref}} alternative line content \;
\dots \;
\end{algorithm}
This source however result in the following compilation error: ! Argument of \reserved@a has an extra }.
Any help?
EDIT
Minimal document that simulates the error:
\documentclass{article}
\usepackage{algorithm2e}
\usepackage{hyperref}
\begin{document}
\begin{algorithm}
line content \; \label{alg:previous:ref}
\end{algorithm}
\begin{algorithm}
\nlset{\ref{alg:previous:ref}} alternative line content \;
\end{algorithm}
\end{document}
The problem seems to occur when hyperref package is loaded, without it works well.
\nlset
comes from?