In cryptocode, it is possible to define the first line number of a block using something like lnstart=3. However, most of the time I want to set this number depending on the position of a specific lined (referenced using a label). Is it possible to use a label in lnstart, instead of hardcoding the first line number? It is very practical when I modify often the code.
MWE:
\documentclass[]{article}
\usepackage[colorlinks]{hyperref}
\usepackage [
n,
advantage,
operators,
sets,
adversary,
landau,
probability,
notions,
logic,
ff,
mm,
primitives,
events,
complexity,
asymptotics,
keys
] {cryptocode}
\createprocedureblock{game}{center,boxed}{}{}{}
\begin{document}
\game[linenumbering]{ ${\tt GAME}$ }{
ABC\
DEF\
GHI\
\label{my:line:jkl}JKL\
MNO\
PQR
}
The line \ref{my:line:jkl} is changed, is it possible not to hardcode the first line number in \verb|lnstart=XX| but use the label of the line instead?
\game[linenumbering,lnstart=3]{ ${\tt GAME}$ }{
JKLLLLL
}
\end{document}


-1at the end using simplylnstart=\getrefnumber{my:line:jkl}-1. And thanks for\tt, I was not aware of that deprecation. – tobiasBora Feb 15 '21 at 12:09