Commit 1c4a04a9 authored by Julian Rother's avatar Julian Rother
Browse files

Merge branch 'master' into 'master'

Todo und Beschlussdesign in die TeX-Class verschieben

Closes #165

See merge request !7
parents aaa97957 0238c9b2
......@@ -611,7 +611,7 @@ class Todo(DatabaseModel):
return " ".join(parts)
def render_latex(self, current_protocol=None):
return r"\textbf{{{}}}: {}: {} -- {}".format(
return r"\Todo{{{}}}{{{}}}{{{}}}{{{}}}".format(
"Neuer Todo" if self.is_new(current_protocol) else "Todo",
escape_tex(self.who),
escape_tex(self.description),
......
......@@ -221,12 +221,10 @@ class Tag:
return ""
return self.todo.render_latex(current_protocol=protocol)
elif self.name == "beschluss":
parts = [r"\textbf{{Beschluss:}} {}".format(self.decision.content)]
if len(self.decision.categories):
parts.append(
r"\textit{{({})}}".format(self.decision.get_categories_str())
)
return " ".join(parts)
return r"\Beschluss[{}]{{{}}}".format(self.decision.get_categories_str(),self.decision.content)
else:
return r"\Beschluss{{{}}}".format(self.decision.content)
elif self.name == "footnote":
return r"\footnote{{{}}}".format(self.values[0])
return r"\textbf{{{}:}} {}".format(escape_tex(self.name.capitalize()), escape_tex(";".join(self.values)))
......
......@@ -250,3 +250,6 @@
\newcommand{\PE}[2]{\textbf{Persönliche Erklärung von #1:}\\\emph{\glqq{}#2\grqq{}}\\}
% Styling der Todo und Beschlusstags im Protokoll
\newcommand{\Todo}[4]{\textbf{{#1}}: #2: #3 -- #4}
\newcommand{\Beschluss}[2][\empty]{\textbf{Beschluss:} #2 \def\temp{#1}\ifx\temp\empty\else\textit{(#1)}\fi}
Supports Markdown
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