I am trying to output a number relative to the current step of my proof instead of being hard coded. I'll try and explain what I mean with this proof:
\documentclass[11pt]{article}
\usepackage[a4paper,total={6in,8in},textwidth=496pt]{geometry}
\usepackage{amsmath}
\usepackage{amstext}
\usepackage{flagderiv}
\usepackage{calc}
\usepackage[nomessages]{fp}
\begin{document}
\begin{flagderiv}
\step{}{P}{}
\step{}{P\implies Q}{}
\conclude{}{Q}{1&2}
\end{flagderiv}
\end{document}
Instead of having to write 1\&2 in the conclusion section I would like to find some way of using the step counter to get just say the line above this one.
I know that flagderiv has a \thestepcounter variable but that gives me the number in this format: (n). I was also thinking of using fp (which I found in this answer) to do the maths in some way like this: \FPeval{\result}{clip(\thestepcounter-1)}. I have yet to find a variation of this that works though.
This feels possible, but I'm quite new to latex and manipulating variables in this way is beyond me. After reading parts of the Implementation section in this pdf I think \thefd@stepcount might be the variable I'm looking for, but it seems to be internal and I don't know how to access it.
Any help is much appreciated. Thank you in advance!



\refs they are like hyperref boxes (but red) and yet the correct number is inside them. – Non808 Nov 26 '20 at 14:54