Ajouter un modèle pour des diapositives de corrigés
This commit is contained in:
parent
68a3d73368
commit
b2f942cd43
|
@ -16,12 +16,15 @@ LICENSES = {'CC-by-sa-2.0': 'license-cc-by-sa-2.0',
|
||||||
TEMPLATES = {
|
TEMPLATES = {
|
||||||
'beamer': {'fragment': 'frame.tex',
|
'beamer': {'fragment': 'frame.tex',
|
||||||
'fragment_pratique': 'frame-pratique.tex',
|
'fragment_pratique': 'frame-pratique.tex',
|
||||||
|
'fragment_corrige': 'frame-corrige.tex',
|
||||||
'master': 'main-beamer.tex'},
|
'master': 'main-beamer.tex'},
|
||||||
'article': {'fragment': 'fragment.tex',
|
'article': {'fragment': 'fragment.tex',
|
||||||
'fragment_pratique': 'fragment-pratique.tex',
|
'fragment_pratique': 'fragment-pratique.tex',
|
||||||
|
'fragment_corrige': 'fragment-corrige.tex',
|
||||||
'master': 'main-article.tex'},
|
'master': 'main-article.tex'},
|
||||||
'questionnaire': {'fragment': 'fragment.tex',
|
'questionnaire': {'fragment': 'fragment.tex',
|
||||||
'fragment_pratique': 'fragment-pratique.tex',
|
'fragment_pratique': 'fragment-pratique.tex',
|
||||||
|
'fragment_corrige': 'fragment-corrige.tex',
|
||||||
'master': 'main-questionnaire.tex'}
|
'master': 'main-questionnaire.tex'}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,6 +259,7 @@ def main():
|
||||||
tex_skbinputs = SKBINPUT_RE.finditer(tex_master)
|
tex_skbinputs = SKBINPUT_RE.finditer(tex_master)
|
||||||
fragment = TEMPLATES[tex_class.group('document_class')]['fragment']
|
fragment = TEMPLATES[tex_class.group('document_class')]['fragment']
|
||||||
fragment_pratique = TEMPLATES[tex_class.group('document_class')]['fragment_pratique']
|
fragment_pratique = TEMPLATES[tex_class.group('document_class')]['fragment_pratique']
|
||||||
|
fragment_corrige = TEMPLATES[tex_class.group('document_class')]['fragment_corrige']
|
||||||
|
|
||||||
for skbinput in tex_skbinputs:
|
for skbinput in tex_skbinputs:
|
||||||
rep = path.dirname(skbinput.group('tex'))
|
rep = path.dirname(skbinput.group('tex'))
|
||||||
|
@ -267,7 +271,12 @@ def main():
|
||||||
print(dest)
|
print(dest)
|
||||||
if not path.isdir(rep):
|
if not path.isdir(rep):
|
||||||
makedirs(rep)
|
makedirs(rep)
|
||||||
template = jinja_env.get_template(fragment_pratique if tex_name.endswith('-pratique') else fragment)
|
if tex_name.endswith('-pratique'):
|
||||||
|
template = jinja_env.get_template(fragment_pratique)
|
||||||
|
elif tex_name.endswith('-corrige'):
|
||||||
|
template = jinja_env.get_template(fragment_corrige)
|
||||||
|
else:
|
||||||
|
template = jinja_env.get_template(fragment)
|
||||||
env = {'title': basename, 'subtitle': '',
|
env = {'title': basename, 'subtitle': '',
|
||||||
'name': dest}
|
'name': dest}
|
||||||
rendered_template = template.render(**env)
|
rendered_template = template.render(**env)
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
\definecolor{UniBlue}{RGB}{83,121,180}
|
\definecolor{UniBlue}{RGB}{83,121,180}
|
||||||
\definecolor{CleanWhite}{RGB}{255,255,255}
|
\definecolor{CleanWhite}{RGB}{255,255,255}
|
||||||
\definecolor{TravauxPratiques}{RGB}{230,230,230}
|
\definecolor{TravauxPratiques}{RGB}{230,230,230}
|
||||||
|
\definecolor{Corrige}{RGB}{255,239,0}
|
||||||
\definecolor{Repos}{RGB}{0,0,0}
|
\definecolor{Repos}{RGB}{0,0,0}
|
||||||
\setbeamercolor{title}{fg=UniBlue}
|
\setbeamercolor{title}{fg=UniBlue}
|
||||||
\setbeamercolor{frametitle}{fg=UniBlue}
|
\setbeamercolor{frametitle}{fg=UniBlue}
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
\skbheading{(((title|escape_tex)))}
|
||||||
|
fichier (((name|escape_tex))) à éditer
|
|
@ -0,0 +1,7 @@
|
||||||
|
{\setbeamercolor{background canvas}{bg=Corrige}
|
||||||
|
\begin{frame}
|
||||||
|
\frametitle{(((title|escape_tex)))}
|
||||||
|
fichier (((name|escape_tex))) à éditer
|
||||||
|
% contenu (pas trop long) de la diapositive
|
||||||
|
\end{frame}
|
||||||
|
}
|
Loading…
Reference in New Issue