0

What \crefname do I provide for referring to a step of an algorithm (not the algorithm float itself!)? I am able to label the steps of an algorithm and refer them using \ref but how do I use \cref with them?

  • 1
    Welcome to TeX.SE! Please show us, what you try so far. The best in form of complete small document. – Zarko Jun 20 '19 at 17:58
1

Lines of algorithm can be referenced with \cref the same way as with \ref:

\documentclass{article}

\usepackage{algpseudocode} 
\usepackage{cleveref}

\begin{document}

\begin{algorithmic}[1] 
\State\label{foo} test
\end{algorithmic}


\cref{foo}
\end{document}

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.