create line numbers and justifications/.style={
% sort the nodes top-to-bottom, left-to-right
% the plan is to walk this sorted nodewalk and increase the line number when y changes
sort by={y,-x()}, for sort'={tree}{
% create the first line number & justification manually
% (nodewalk step !back doesn't work on the first node)
tempcounta'=1,
new line number/.process args={RO}{tempcounta}{y},
new justification/.process args={ROO}{tempcounta}{just}{y},
% after the first step, change the every step register to include the conditional