add line_statement_prefix to texenv
This commit is contained in:
parent
0f56ca6477
commit
a2c8e67ccd
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\Block{for e in students}
|
%- for e in students
|
||||||
\maketitle
|
\maketitle
|
||||||
|
|
||||||
\begin{minipage}{0.5\linewidth}
|
\begin{minipage}{0.5\linewidth}
|
||||||
@ -39,32 +39,32 @@
|
|||||||
\scriptsize
|
\scriptsize
|
||||||
\begin{multicols}{3}
|
\begin{multicols}{3}
|
||||||
|
|
||||||
\Block{for exo in e["Exercices"]}
|
%- for exo in e["Exercices"]
|
||||||
\begin{tabular}{|p{2cm}|c|}
|
\begin{tabular}{|p{2cm}|c|}
|
||||||
|
|
||||||
\Block{if exo["Nom"] in ["Bonus", "Malus", "Presentation"]}
|
%- if exo["Nom"] in ["Bonus", "Malus", "Presentation"]
|
||||||
\Block{for _,q in exo["Questions"].iterrows()}
|
%- for _,q in exo["Questions"].iterrows()
|
||||||
\Block{if q["Mark"]}
|
%- if q["Mark"]
|
||||||
\hline
|
\hline
|
||||||
\rowcolor{highlightbg}
|
\rowcolor{highlightbg}
|
||||||
\Var{exo["Nom"]} (\Var{q["Question"]}) & \Var{q["Latex_rep"]} \\
|
\Var{exo["Nom"]} (\Var{q["Question"]}) & \Var{q["Latex_rep"]} \\
|
||||||
\Block{endif}
|
%- endif
|
||||||
\Block{endfor}
|
%- endfor
|
||||||
\Block{else}
|
%- else
|
||||||
|
|
||||||
\hline
|
\hline
|
||||||
\rowcolor{highlightbg}
|
\rowcolor{highlightbg}
|
||||||
Exerice \Var{exo["Nom"]} & \Var{exo["Total"]["Mark"]} / \Var{exo["Total"]["Bareme"]} \\
|
Exerice \Var{exo["Nom"]} & \Var{exo["Total"]["Mark"]} / \Var{exo["Total"]["Bareme"]} \\
|
||||||
\Block{for _,q in exo["Questions"].iterrows()}
|
%- for _,q in exo["Questions"].iterrows()
|
||||||
\hline
|
\hline
|
||||||
\Var{q["Question"]} \newline \Var{q["Commentaire"]} & \Var{q["Latex_rep"]} \\
|
\Var{q["Question"]} \newline \Var{q["Commentaire"]} & \Var{q["Latex_rep"]} \\
|
||||||
\Block{endfor}
|
%- endfor
|
||||||
\Block{endif}
|
%- endif
|
||||||
|
|
||||||
|
|
||||||
\hline
|
\hline
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\Block{endfor}
|
%- endfor
|
||||||
\end{multicols}
|
\end{multicols}
|
||||||
\vfill
|
\vfill
|
||||||
|
|
||||||
@ -77,7 +77,7 @@
|
|||||||
\end{center}
|
\end{center}
|
||||||
\normalsize
|
\normalsize
|
||||||
\pagebreak
|
\pagebreak
|
||||||
\Block{endfor}
|
%- endfor
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
||||||
|
@ -12,6 +12,10 @@ texenv = jinja2.Environment(
|
|||||||
block_end_string = '}',
|
block_end_string = '}',
|
||||||
variable_start_string = '\Var{',
|
variable_start_string = '\Var{',
|
||||||
variable_end_string = '}',
|
variable_end_string = '}',
|
||||||
|
comment_start_string = '\#{',
|
||||||
|
comment_end_string = '}',
|
||||||
|
line_statement_prefix = '%-',
|
||||||
|
line_comment_prefix = '%#',
|
||||||
loader = jinja2.PackageLoader("notes_tools.generate_bilan", "templates"),
|
loader = jinja2.PackageLoader("notes_tools.generate_bilan", "templates"),
|
||||||
extensions = ['jinja2.ext.do']
|
extensions = ['jinja2.ext.do']
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user