32 ?Aˆl–ß=¿JJj"T �†ãm©‹Fÿ�þDÑ@³q‰§†&ä�óÓ ƒ}¦�Ø_ˆI|¥�+$¾ÄÖ$àA% skills.sty % % A LaTeX2e package for preparing proficiency tests. %% skills.sty %% Copyright (c) 2020 Pierre-Amiel Giraud % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2003/12/01 or later. % % This work has the LPPL maintenance status "maintained". % % This work consists of the files skills.sty and skillsdoc.tex. % The user's guide for skills.sty is in the file skillsdoc.tex. %%% Pierre-Amiel Giraud %%% History & Geography teacher %%% Chambery Middle School %%% 33140 Villenave d'Ornon %%% pierre-amiel.giraud@ac-bordeaux.fr % The newest version of this package should always be available % from its git repository: https://framagit.org/pagiraud/skills \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{skills}[2020/10/21 Easing the making of proficiency tests] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Different defaults if exam class is used % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \@ifclassloaded{exam}{% \newcommand{\skillcounter}{question}% \newcommand{\putglobalskills}{} %New question function : \skillquestion \usepackage{xparse} \NewDocumentCommand \skillquestion {o o} { \IfNoValueTF{#2} {\IfNoValueTF{#1} {\question} {\question \skills{#1}} } {\question[#2] \skills{#1}} } \NewDocumentEnvironment{skillquestions}{o} { \IfNoValueTF{#1} {\begin{questions}} {\ifthenelse{\equal{before}{\putglobalskills}} {\begin{questions} \globalskills{#1} } {\begin{questions}} } } { \IfNoValueTF{#1} {\end{questions}} { \ifthenelse{\equal{before}{\putglobalskills}} {\end{questions}} {\globalskills{#1} \end{questions}} } } }{% \newcommand{\skillcounter}{section}% } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Build upon the package glossaries functionalities % % to ease skills evaluation. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Allowing to change the default counter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage{iftex} \RequirePackage{kvoptions} \SetupKeyvalOptions{ family=SkillsOpt, prefix=SkillsOpt@ } \DeclareStringOption[]{counter} \ProcessKeyvalOptions* \ifx\SkillsOpt@counter\@empty \else \renewcommand*{\skillcounter}{\SkillsOpt@counter} \fi % Allowing to avoid the making of the glossary %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newif\if@makenoidxglossaries \@makenoidxglossariesfalse \DeclareOption{makenoidxglossaries}{\@makenoidxglossariestrue} \DeclareOption{donotmakenoidxglossaries}{\@makenoidxglossariesfalse} \DeclareOption*{}%Ne pas charger une option inconnue \ExecuteOptions{makenoidxglossaries} \ProcessOptions\relax %\PassOptionsToPackage{counter=\skillcounter}{glossaries} \RequirePackage{glossaries} \newglossary*{skills}{}[\skillcounter] \if@makenoidxglossaries % Make the glossaries with standard compilation \makenoidxglossaries \fi \usepackage{tabularx} %\renewcommand{\tabularxcolumn}[1]{>m{#1}} % Definiton of the skill table (basically, a glossary style) % \renewglossarystyle{skillstable}{def} can be used to custom it. \newglossarystyle{skillstable}{% \renewenvironment{theglossary}% {%\begin{center} \renewcommand{\arraystretch}{1.5} %\begin{tabular}{|rp{.58\linewidth}|>{\centering\arraybackslash}p{.12\linewidth}|>{\centering\arraybackslash}p{.1\linewidth}|}}% \tabularx{\linewidth}{|rX|>{\centering\arraybackslash}p{.15\linewidth}|c|}} {\endtabularx }% \renewcommand*{\glossaryheader}{\hline% \multicolumn{2}{|c|}{\descriptionname} & \pagelistname & \skilllevelname \tabularnewline\hline}% \renewcommand{\glossentry}[2]{% \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & \glossentrydesc{##1}\glspostdescription\space & ##2 &\tabularnewline\hline }% % \renewcom