diff --git a/figures/logos/missing.png b/figures/logos/missing.png new file mode 100644 index 0000000..f797950 Binary files /dev/null and b/figures/logos/missing.png differ diff --git a/presentations/modules_EOLE_envole/tronc_commun_1.tex b/presentations/modules_EOLE_envole/tronc_commun_1.tex index 38825e1..3338fd4 100644 --- a/presentations/modules_EOLE_envole/tronc_commun_1.tex +++ b/presentations/modules_EOLE_envole/tronc_commun_1.tex @@ -18,12 +18,20 @@ \skbinput[from=sli]{style/preambule} +\newlength{\logospacing} +\setlength{\logospacing}{(\textwidth - 2cm*2)/1} + +\logo{ + \skbfigure[width=2cm]{logos/MENJ.jpg}~ \hspace{\logospacing} + \skbfigure[width=2cm]{logos/Cadoles.png}~ +} + \title[]{Formation tronc commun niveau 1} \subtitle{XXX CLIENT XXX} \author[Equipe Auteur]{Cadoles} -\institute[Cadoles]{\skbfigure[width=2cm]{cadoles/logo_01.png}} +\institute[Cadoles]{\skbfigure[width=2cm]{logos/Cadoles.png}} \date{{\small \today}} diff --git a/presentations/modules_EOLE_envole/tronc_commun_2.tex b/presentations/modules_EOLE_envole/tronc_commun_2.tex index aa1e965..0670f36 100644 --- a/presentations/modules_EOLE_envole/tronc_commun_2.tex +++ b/presentations/modules_EOLE_envole/tronc_commun_2.tex @@ -18,12 +18,20 @@ \skbinput[from=sli]{style/preambule} +\newlength{\logospacing} +\setlength{\logospacing}{(\textwidth - 2cm*2)/1} + +\logo{ + \skbfigure[width=2cm]{logos/MENJ.jpg}~ \hspace{\logospacing} + \skbfigure[width=2cm]{logos/Cadoles.png}~ +} + \title[]{Formation tronc commun niveau 2} \subtitle{XXX CLIENT XXX} \author[Equipe Auteur]{Cadoles} -\institute[Cadoles]{\skbfigure[width=2cm]{cadoles/logo_01.png}} +\institute[Cadoles]{\skbfigure[width=2cm]{logos/Cadoles.png}} \date{{\small \today}} diff --git a/setup_main_tex_file.py b/setup_main_tex_file.py index 64aba7c..7b4c2ec 100755 --- a/setup_main_tex_file.py +++ b/setup_main_tex_file.py @@ -5,7 +5,7 @@ import argparse import re import random import time -from os import path, makedirs +from os import path, makedirs, listdir from jinja2 import Environment, FileSystemLoader LICENSES = {'CC-by-sa-2.0': 'license-cc-by-sa-2.0', @@ -49,6 +49,20 @@ def main(): """ init function """ + def get_institutes_logos(institutes_list=None): + if not institutes_list: + return [] + institutes_logos = [] + known_logos = {path.splitext(path.basename(l))[0]:l for l in listdir('./figures/logos')} + for institute in institutes_list: + if institute in known_logos: + institutes_logos.append(known_logos[institute]) + else: + print(f'Unknown institute {institute}') + print(f'Replacing with missing.png') + institutes_logos.append('missing.png') + return institutes_logos + root = '../' if args.directory: root = root + re.sub(r'[\w-]+/?', '../', args.directory) @@ -80,6 +94,9 @@ def main(): else: client = client + institutes = get_institutes_logos(args.institutes) + logos_count = len(institutes) + 1 + directory = args.directory if not directory: directory = '' @@ -95,7 +112,9 @@ def main(): 'title': title, 'author': author, 'client': client, - 'license': license} + 'license': license, + 'institutes': institutes, + 'logos_count': logos_count} master = TEMPLATES[document_class]['master'] master_dir = path.join('presentations', directory) programme_dir = path.join(master_dir, 'programme') @@ -189,6 +208,7 @@ def main(): parser_init.add_argument('-t', '--title', help="Titre de la formation") parser_init.add_argument('-l', '--license', help="Termes de mise à disposition de la formation") parser_init.add_argument('-d', '--directory', help="Sous-répertoires où créer le fichier", required=True) + parser_init.add_argument('-i', '--institutes', nargs='*', help="Instituts dont les logos sont requis") parser_init.set_defaults(func=init) parser_update = subparsers.add_parser('update', help='Mise à jour des fichiers inclus') parser_update.add_argument('-m', '--master', help="Emplacement du fichier maître", required=True) diff --git a/slides/licences/license-cc-by-sa-2.0.tex b/slides/licences/license-cc-by-sa-2.0.tex index 7758b94..a113619 100644 --- a/slides/licences/license-cc-by-sa-2.0.tex +++ b/slides/licences/license-cc-by-sa-2.0.tex @@ -12,5 +12,4 @@ ou écrivez à Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. \end{block} -\pnote{test des notes standard} \end{frame} diff --git a/slides/style/preambule.tex b/slides/style/preambule.tex index 69d6556..4732051 100644 --- a/slides/style/preambule.tex +++ b/slides/style/preambule.tex @@ -16,6 +16,7 @@ \usepackage{xcolor} \usepackage{hyperref} \usepackage{hyperxmp} +\usepackage{calc} %\usepackage{pdfpcnotes} % Indisponible dans les paquets, installation manuelle requise \hypersetup{% @@ -47,8 +48,6 @@ {\skbinput[from=fig]{cadoles/simple_dash}} -\institute[Cadoles]{\skbfigure[width=2cm]{cadoles/logo-01.png}} -\institute[MENJ]{\skbfigure[width=2cm]{en/logo_MENJ.jpg}} \date{{\small \today}} @@ -84,11 +83,6 @@ \end{frame} } -\logo{ - \skbfigure[width=2cm]{en/logo_MENJ.jpg}~ \hspace{220pt} - \skbfigure[width=2cm]{cadoles/logo_01.png}~ -} - \addtobeamertemplate{frametitle}{% \begin{tikzpicture}[remember picture,overlay] \node[anchor=north west,yshift=2pt,text opacity=0.5, scale=0.8] at (current page.north west) {\insertsubsection}; diff --git a/templates/main-beamer.tex b/templates/main-beamer.tex index 576d592..04f6ed2 100644 --- a/templates/main-beamer.tex +++ b/templates/main-beamer.tex @@ -16,15 +16,25 @@ \newcommand{\pdftitle}{(((title)))} \newcommand{\pdfkeywords}{EOLE} + \skbinput[from=(((content)))]{style/preambule} +\newlength{\logospacing} +\setlength{\logospacing}{(\textwidth - 2cm*(((logos_count))))/(((logos_count - 1)))} + +\logo{ +((* for institute in institutes *)) + \skbfigure[width=2cm]{logos/(((institute)))}~ \hspace{\logospacing} +((* endfor *)) + \skbfigure[width=2cm]{logos/Cadoles.png}~ +} + \title[]{(((title)))} \subtitle{(((client)))} \author[Equipe Auteur]{(((author)))} -\institute[Cadoles]{\skbfigure[width=2cm]{cadoles/logo_01.png}} - +\institute[Cadoles]{\skbfigure[width=2cm]{logos/Cadoles.png}} \date{{\small \today}}