Modifie les noms de variables dans les macros latex pour faciliter la lecture
This commit is contained in:
parent
a2fc801fd2
commit
2549fd6950
@ -70,9 +70,10 @@
|
||||
\addtocounter{cptressource}{1} % Ajoute une ressource (tous semestres confondu)
|
||||
\addtocounter{cptressource\currentsemestre}{1} % Ajoute une ressource au semestre
|
||||
\def\currentressource{\currentsemestre\Alph{cptressource}} % Ressource RAA = A pour semestre 1 puis A pour ressource n°1
|
||||
\expandafter\xdef\csname ressourcecode\currentressource\endcsname{#1} % code
|
||||
\expandafter\xdef\csname ressourcename\currentressource\endcsname{#2} % nom/intitule
|
||||
\expandafter\xdef\csname ressourcesem\currentressource\endcsname{\csname semestrenumero\currentsemestre\endcsname} % nom du semestre
|
||||
|
||||
\expandafter\xdef\csname Rcode\currentressource\endcsname{#1} % code
|
||||
\expandafter\xdef\csname Rname\currentressource\endcsname{#2} % nom/intitule
|
||||
\expandafter\xdef\csname Rsem\currentressource\endcsname{\csname semestrenumero\currentsemestre\endcsname} % nom du semestre
|
||||
|
||||
\newcounter{cptcontenu\currentressource} % le compteur de contenu pour la ressource, mis à 0
|
||||
\newcounter{cptressourcecomp\currentressource} % le compteur de compétences rattachées à la ressource
|
||||
@ -85,15 +86,15 @@
|
||||
% ****************************
|
||||
% Ajout des heures à la ressource courante
|
||||
\def\ajoutRheures#1#2{
|
||||
\expandafter\xdef\csname ressourcetraining\currentressource\endcsname{#1} % heures de formation encadrées
|
||||
\expandafter\xdef\csname ressourcetp\currentressource\endcsname{#2} % heures de projet
|
||||
\expandafter\xdef\csname Rtraining\currentressource\endcsname{#1} % heures de formation encadrées
|
||||
\expandafter\xdef\csname Rtp\currentressource\endcsname{#2} % heures de projet
|
||||
}
|
||||
|
||||
% ****************************
|
||||
% Ajout du descriptif (ancrage)
|
||||
\def\ajoutRancrage#1{
|
||||
\begingroup\let\+\relax
|
||||
\expandafter\gdef\csname ressourceancrage\currentressource\endcsname{\noexpand #1} % descriptif
|
||||
\expandafter\gdef\csname Rancrage\currentressource\endcsname{\noexpand #1} % descriptif
|
||||
\endgroup
|
||||
}
|
||||
|
||||
@ -101,7 +102,7 @@
|
||||
% Ajout des contenus
|
||||
\def\ajoutRcontenudetaille#1{
|
||||
\begingroup\let\+\relax
|
||||
\expandafter\gdef\csname ressourcecontenudetaille\currentressource\endcsname{\noexpand #1} % liste de contenu
|
||||
\expandafter\gdef\csname Rcontenu\currentressource\endcsname{\noexpand #1} % liste de contenu
|
||||
\endgroup
|
||||
}
|
||||
|
||||
@ -113,8 +114,8 @@
|
||||
\xdef\currentcomp{\Alph{cptressourcecomp\currentressource}} % La lettre de la comp dans la ressource
|
||||
|
||||
|
||||
\expandafter\xdef\csname ressourcecomp\currentressource\currentcomp\endcsname{#1} % le nom de la comp
|
||||
\expandafter\xdef\csname ressourcecompniveau\currentressource\currentcomp\endcsname{#2} % le nom de la comp
|
||||
\expandafter\xdef\csname Rcomp\currentressource\currentcomp\endcsname{#1} % le nom de la comp
|
||||
\expandafter\xdef\csname Rniveau\currentressource\currentcomp\endcsname{#2} % le nom de la comp
|
||||
|
||||
\newcounter{cptressourceac\currentressource\currentcomp} % le compteur d'ac pour la compétence rattachées à la ressource
|
||||
}
|
||||
@ -125,15 +126,8 @@
|
||||
\addtocounter{cptressourceac\currentressource\currentcomp}{1} % le compteur de l'ac pour la comp dans la ressource
|
||||
\xdef\currentac{\Alph{cptressourceac\currentressource\currentcomp}} % La lettre de l'ac pour la comp dans la ressource
|
||||
|
||||
\expandafter\xdef\csname ressourceaccode\currentressource\currentcomp\currentac\endcsname{#1} % le nom de la comp
|
||||
\expandafter\xdef\csname ressourceacname\currentressource\currentcomp\currentac\endcsname{#2} % le nom de la comp
|
||||
|
||||
% boucle sur les AC par compétence => plus utilisé
|
||||
\ifnum\value{cptressourceac\currentressource\currentcomp}=1\relax
|
||||
\expandafter\xdef\csname loopressourceac\currentressource\currentcomp\endcsname{\currentac}
|
||||
\else
|
||||
\expandafter\xdef\csname loopressourceac\currentressource\currentcomp\endcsname{\csname loopressourceac\currentressource\currentcomp\endcsname,\currentac}
|
||||
\fi
|
||||
\expandafter\xdef\csname Raccode\currentressource\currentcomp\currentac\endcsname{#1} % le nom de la comp
|
||||
\expandafter\xdef\csname Racname\currentressource\currentcomp\currentac\endcsname{#2} % le nom de la comp
|
||||
}
|
||||
|
||||
% ****************************
|
||||
@ -142,8 +136,8 @@
|
||||
\addtocounter{cptressourcesae\currentressource}{1} % le compteur de la sae dans la ressource
|
||||
\xdef\currentsae{\Alph{cptressourcesae\currentressource}} % La lettre
|
||||
|
||||
\expandafter\xdef\csname ressourcesaecode\currentressource\currentsae\endcsname{#1} %
|
||||
\expandafter\xdef\csname ressourcesaename\currentressource\currentsae\endcsname{#2} %
|
||||
\expandafter\xdef\csname Rsaecode\currentressource\currentsae\endcsname{#1} %
|
||||
\expandafter\xdef\csname Rsaename\currentressource\currentsae\endcsname{#2} %
|
||||
}
|
||||
|
||||
% ****************************
|
||||
@ -152,14 +146,14 @@
|
||||
\addtocounter{cptressourceprerequis\currentressource}{1} % le compteur du prerequis dans la ressource
|
||||
\xdef\currentprerequis{\Alph{cptressourceprerequis\currentressource}} % La lettre
|
||||
|
||||
\expandafter\xdef\csname ressourceprerequiscode\currentressource\currentprerequis\endcsname{#1} %
|
||||
\expandafter\xdef\csname ressourceprerequisname\currentressource\currentprerequis\endcsname{#2} %
|
||||
\expandafter\xdef\csname Rprerequiscode\currentressource\currentprerequis\endcsname{#1} %
|
||||
\expandafter\xdef\csname Rprerequisname\currentressource\currentprerequis\endcsname{#2} %
|
||||
}
|
||||
|
||||
% ****************************
|
||||
% Ajout des mots-clés
|
||||
\def\ajoutRmotscles#1{
|
||||
\expandafter\xdef\csname ressourcemotscles\currentressource\endcsname{#1} % descriptif
|
||||
\expandafter\xdef\csname Rmotscles\currentressource\endcsname{#1} % descriptif
|
||||
}
|
||||
|
||||
|
||||
|
@ -15,7 +15,8 @@
|
||||
\xdef\COMP{#2} % le code de la compétence sous la forme A
|
||||
|
||||
\forLoop{1}{\value{cptressourceac\CODE\COMP}}{noligne}{
|
||||
\xdef\contenu{{\csname ressourceaccode\CODE\COMP\Alph{noligne}\endcsname} | {\csname ressourceacname\CODE\COMP\Alph{noligne}\endcsname}}
|
||||
\xdef\contenu{{\csname Raccode\CODE\COMP\Alph{noligne}\endcsname} |
|
||||
{\csname Racname\CODE\COMP\Alph{noligne}\endcsname}}
|
||||
\contenu
|
||||
\tabularnewline %
|
||||
}
|
||||
@ -30,7 +31,8 @@
|
||||
}{
|
||||
\begin{tabular}[t]{@{}T@{}}%
|
||||
\forLoop{1}{\value{cptressourcesae\CODE}}{noligne}{
|
||||
\xdef\contenu{{\csname ressourcesaecode\CODE\Alph{noligne}\endcsname} | {\csname ressourcesaename\CODE\Alph{noligne}\endcsname}}
|
||||
\xdef\contenu{{\csname Rsaecode\CODE\Alph{noligne}\endcsname} |
|
||||
{\csname Rsaename\CODE\Alph{noligne}\endcsname}}
|
||||
\contenu
|
||||
\tabularnewline %
|
||||
}
|
||||
@ -47,7 +49,8 @@ Aucun
|
||||
\begin{tabular}[t]{@{}T@{}}%
|
||||
|
||||
\forLoop{1}{\value{cptressourceprerequis\CODE}}{noligne}{
|
||||
\xdef\contenu{{\csname ressourceprerequiscode\CODE\Alph{noligne}\endcsname} | {\csname ressourceprerequisname\CODE\Alph{noligne}\endcsname}}
|
||||
\xdef\contenu{{\csname Rprerequiscode\CODE\Alph{noligne}\endcsname} |
|
||||
{\csname Rprerequisname\CODE\Alph{noligne}\endcsname}}
|
||||
\contenu
|
||||
\tabularnewline %
|
||||
}
|
||||
@ -61,10 +64,10 @@ Aucun
|
||||
|
||||
\begin{tabular}[t]{@{}T@{}}
|
||||
% {\bfseries Ancrage et contexte professionnel :} \\
|
||||
\csname ressourceancrage\CODE\endcsname \\
|
||||
\csname Rancrage\CODE\endcsname \\
|
||||
{\bfseries Contenus :} \\
|
||||
%{\setlength{\extrarowheight}{1pt}
|
||||
\csname ressourcecontenudetaille\CODE\endcsname
|
||||
\csname Rcontenu\CODE\endcsname
|
||||
%}
|
||||
\end{tabular}
|
||||
}
|
||||
@ -87,19 +90,19 @@ Aucun
|
||||
\begin{tabular}[t]{|P|Q|P|Q|}
|
||||
\hline % 1ère ligne
|
||||
{\bfseries Ressource}
|
||||
& \multicolumn{3}{l|}{\bfseries \csname ressourcename\CODE\endcsname} \\
|
||||
& \multicolumn{3}{l|}{\bfseries \csname Rname\CODE\endcsname} \\
|
||||
\hline % 2ème ligne
|
||||
{\bfseries Code}
|
||||
& \csname ressourcecode\CODE\endcsname
|
||||
& \csname Rcode\CODE\endcsname
|
||||
& {\bfseries Semestre}
|
||||
& \csname ressourcesem\CODE\endcsname \\
|
||||
& \csname Rsem\CODE\endcsname \\
|
||||
\hline % 3ème ligne Heures
|
||||
{ \setlength{\extrarowheight}{0pt}
|
||||
\begin{tabular}[t]{@{}Q@{}} \bfseries Heures de formation \\ \bfseries encadrées \end{tabular}
|
||||
}
|
||||
& {\csname ressourcetraining\CODE\endcsname}h
|
||||
& {\csname Rtraining\CODE\endcsname}h
|
||||
& {\bfseries dont heures de TP}
|
||||
& {\csname ressourcetp\CODE\endcsname}h \\
|
||||
& {\csname Rtp\CODE\endcsname}h \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
|
||||
@ -108,11 +111,11 @@ Aucun
|
||||
\hline
|
||||
\multicolumn{3}{|c|}{\bfseries Compétence(s) ciblées et apprentissage(s) critique(s) couvert(s)} \\
|
||||
\hline
|
||||
\textit{\csname ressourcecomp\CODE A\endcsname} | {\csname ressourcecompniveau\CODE A\endcsname}
|
||||
\textit{\csname Rcomp\CODE A\endcsname} | {\csname Rniveau\CODE A\endcsname}
|
||||
&
|
||||
\textit{\csname ressourcecomp\CODE B\endcsname} | {\csname ressourcecompniveau\CODE B\endcsname}
|
||||
\textit{\csname Rcomp\CODE B\endcsname} | {\csname Rniveau\CODE B\endcsname}
|
||||
&
|
||||
\textit{\csname ressourcecomp\CODE C\endcsname} | {\csname ressourcecompniveau\CODE C\endcsname}
|
||||
\textit{\csname Rcomp\CODE C\endcsname} | {\csname Rniveau\CODE C\endcsname}
|
||||
\\
|
||||
\hline % AC de RT1
|
||||
{\tableauAC{\CODE}{A}
|
||||
@ -136,7 +139,7 @@ Aucun
|
||||
\hline
|
||||
{\bfseries Descriptif détaillé } & \tableauDescriptif{\CODE} \\
|
||||
\hline
|
||||
{\bfseries Mots-clés} & {\csname ressourcemotscles\CODE\endcsname} \\
|
||||
{\bfseries Mots-clés} & {\csname Rmotscles\CODE\endcsname} \\
|
||||
\hline
|
||||
|
||||
\end{tabular}
|
||||
|
@ -21,17 +21,13 @@ for file in fichiers:
|
||||
sem = "S" + str(r.ressource["semestre"])
|
||||
ressources[sem].append(r)
|
||||
|
||||
# Eléments de tests
|
||||
r1 = ressources["S1"][0]
|
||||
r2 = ressources["S1"][1]
|
||||
|
||||
temp1 = r1.ressource["contenu"]
|
||||
temp2 = r2.ressource["contenu"]
|
||||
|
||||
output1 = pypandoc.convert_text(temp1, 'tex', format='md',
|
||||
extra_args=['--atx-headers'])
|
||||
|
||||
output2 = pypandoc.convert_text(temp2, 'tex', format='md',
|
||||
extra_args=['--atx-headers'])
|
||||
|
||||
print("ici")
|
||||
# Export latex
|
||||
|
Loading…
Reference in New Issue
Block a user