Commit ae3ba7fb authored by Robin Sonnabend's avatar Robin Sonnabend

Use correct TOP number in printed decisions

parent acbfcf58
......@@ -408,6 +408,16 @@ class Fork(Element):
return self
return self.parent.get_top()
def get_top_number(self):
if self.is_root():
return 1
top = self.get_top()
tops = [child
for child in top.parent.children
if isinstance(child, Fork)
]
return tops.index(top) + 1
def get_maxdepth(self):
child_depths = [
child.get_maxdepth()
......
......@@ -37,6 +37,7 @@
\item \VAR{decision.content|escape_tex}
\end{itemize}
\setcounter{section}{\VAR{top.get_top_number() - 1}}
\TOP{\VAR{top.name|escape_tex}}
\VAR{top.render(render_type=render_type, level=0, show_private=show_private, protocol=protocol)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment