Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
protokollsystem
proto3
Commits
ae3ba7fb
Commit
ae3ba7fb
authored
Mar 14, 2017
by
Robin Sonnabend
Browse files
Use correct TOP number in printed decisions
parent
acbfcf58
Changes
2
Hide whitespace changes
Inline
Side-by-side
parser.py
View file @
ae3ba7fb
...
...
@@ -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
()
...
...
templates/decision.tex
View file @
ae3ba7fb
...
...
@@ -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)
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment