How is it possible a cross-reference a range of lines in an algorithm? I can cross-reference a single line easily using the simple \label(...) and then \ref(...) to cross-reference it.
For example in the MWE below, how can cite from line 3 to line 5?
\documentclass{article}
\usepackage{algorithm}
\usepackage{algpseudocode}
\begin{document}
\begin{algorithm}
\caption{Test Algo}\label{Test Algo}
\begin{algorithmic}[1]
\Procedure{Test Algo}{inputs} %line1
\State $n \gets$ \textsc{BestApproach}(Inputs) \label{algo1:bestmetric} %line2
\For{$f \in $ inputs} %line3
\State x $\gets$ 1 %line4
\EndFor %line5
\EndProcedure %line6
\end{algorithmic}
\end{algorithm}
\end{document}
\usepackage{cleveref}. Label\label{algo1}%(line3),\label{algo2}%(line4) and\label{algo3}%(line5) and thenSee~\cref{algo1,algo2,algo3}below\end{algorithm}=> result "See lines 3 to 5". See: Is there a standard way to refer to a range of equations?. – Bobyandbob Jul 22 '17 at 09:16