From 137431bbbbc6199c0fedc068fa825e9005930906 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Sun, 16 Jan 2022 17:28:19 +0100 Subject: [PATCH] Feat: font parameter and listexercise --- tools/style/base.sty | 24 +++++++++++++++--------- tools/style/myXsim.sty | 15 +++++++++++---- tools/style/shortcuts.sty | 2 +- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/tools/style/base.sty b/tools/style/base.sty index 9265fb0..a7d8cac 100755 --- a/tools/style/base.sty +++ b/tools/style/base.sty @@ -1,13 +1,12 @@ \NeedsTeXFormat{LaTeX2e} % extensions -\RequirePackage[utf8x]{inputenc} +%\RequirePackage[utf8x]{inputenc} \RequirePackage[french]{babel} %\usepackage[babel=true,kerning=true]{microtype} -\RequirePackage[T1]{fontenc} -\RequirePackage{amssymb} -\RequirePackage{amsmath} -\RequirePackage{amsfonts} +%\RequirePackage{amssymb} +%\RequirePackage{amsmath} +%\RequirePackage{amsfonts} \PassOptionsToPackage{table,usenames,dvipsnames}{xcolor} \RequirePackage{hyperref} %\RequirePackage{subfig} @@ -15,6 +14,7 @@ \RequirePackage{graphicx} \graphicspath{{./}{\string~/.Clipart/}} +\RequirePackage{textcomp} \RequirePackage{gensymb} \RequirePackage{ifthen, calc} \RequirePackage{tabularx} @@ -53,10 +53,16 @@ \RequirePackage{shortcuts} %Polices -%% l'option nomath fait que la police du mode mathématique n'est pas affectée -\RequirePackage[nomath]{kpfonts} -\renewcommand*\familydefault{\sfdefault} -\RequirePackage[T1]{fontenc} +\RequirePackage{kpfonts-otf} +\RequirePackage{fontspec} +\setmainfont{KpSans} +\setsansfont{KpSans} +\setmonofont{KpMono} + +% \RequirePackage[nomath]{kpfonts} +% \renewcommand*\familydefault{\sfdefault} +% \RequirePackage[T1]{fontenc} + % Les tableaux \renewcommand{\arraystretch}{1.5} diff --git a/tools/style/myXsim.sty b/tools/style/myXsim.sty index c90585d..ba74023 100644 --- a/tools/style/myXsim.sty +++ b/tools/style/myXsim.sty @@ -104,16 +104,23 @@ } \newcommand\listsectionexercises{% - \begin{itemize} + + \begin{itemize}[label={$\square$}] \ForEachUsedExerciseByType{% - \ifnum\ExercisePropertyGet{##1}{##2}{step}=\value{section} - \item + \ifnum\ExercisePropertyGet{##1}{##2}{step}=\value{section}% + \item % \XSIMmixedcase{\GetExerciseName}\nobreakspace \GetExerciseProperty{counter}% {{\PropertyValue}}: % \GetExerciseProperty{subtitle}% {{\PropertyValue}}% - + \dotfill + %Auto-évaluation + \begin{tikzpicture} + \foreach \k in {0,1,...,4}{ + \draw (\k*0.5, 0) node[draw, star, star points=5, star point ratio=0.5]{}; + } + \end{tikzpicture} \fi }% \end{itemize} diff --git a/tools/style/shortcuts.sty b/tools/style/shortcuts.sty index a27e1f5..91d0f41 100755 --- a/tools/style/shortcuts.sty +++ b/tools/style/shortcuts.sty @@ -97,7 +97,7 @@ % Pour l'évaluation par compétence \usepackage{tikzsymbols} -\usetikzlibrary{babel} +\usetikzlibrary{babel, shapes, snakes} \RequirePackage{xstring} \newcommand{\RepLevel}[1]{%