diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/verifiche/verifiche.sty | 134 |
1 files changed, 81 insertions, 53 deletions
diff --git a/Master/texmf-dist/tex/latex/verifiche/verifiche.sty b/Master/texmf-dist/tex/latex/verifiche/verifiche.sty index d9de04d0226..75dc2b2119a 100644 --- a/Master/texmf-dist/tex/latex/verifiche/verifiche.sty +++ b/Master/texmf-dist/tex/latex/verifiche/verifiche.sty @@ -15,7 +15,7 @@ %% and version 1.3 or later is part of all distributions of %% LaTeX version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{verifiche} [2022/03/10 v4.4 .dtx verifiche file] +\ProvidesPackage{verifiche} [2022/03/10 v5.0 .dtx verifiche file] \RequirePackage{xparse} \RequirePackage{xkeyval} \RequirePackage{amsmath} @@ -28,7 +28,6 @@ \RequirePackage{tikz} \RequirePackage{booktabs} \RequirePackage[normalem]{ulem} -\RequirePackage{xstring} %%Forse si può cancellare questo \usetikzlibrary{calc,shapes.geometric,patterns,positioning,angles,quotes} \sisetup{ @@ -75,39 +74,40 @@ \newlength{\classrulerlength} \newlength{\daterulerlength} \newlength{\ptrulerlength} +\newlength{\columnseparation} \setlength{\candidatenamerulerlength}{.35\textwidth} \setlength{\classrulerlength}{.1\textwidth} \setlength{\daterulerlength}{.15\textwidth} \setlength{\ptrulerlength}{1cm} +\setlength{\columnseparation}{\fill} %%labels -\@ifpackageloaded{babel}{% - \addto\captionsitalian{% - \def\@verifiche@durationlabeldefault{Tempo della prova:}% - \def\@verifiche@asyearlabeldefault{Anno scolastico}% - \def\@verifiche@headercandidatenamelabel{Nome e Cognome}% - \def\@verifiche@headerclasslabel{Classe}% - \def\@verifichhe@headerdatelabel{Data}% - \def\@verifiche@exerciselabel{Quesito}% - \def\@verifiche@solutionlabel{Soluzione}% - }}{% -\@ifpackageloaded{polyglossia}{% - \addto\captionsitalian{% - \def\@verifiche@durationlabeldefault{Tempo della prova:}% - \def\@verifiche@asyearlabeldefault{Anno scolastico}% - \def\@verifiche@headercandidatenamelabel{Nome e Cognome}% - \def\@verifiche@headerclasslabel{Classe}% - \def\@verifichhe@headerdatelabel{Data}% - \def\@verifiche@exerciselabel{Quesito}% - \def\@verifiche@solutionlabel{Soluzione}% - }}{ - \def\@verifiche@durationlabeldefault{Time:}% - \def\@verifiche@asyearlabeldefault{School year}% - \def\@verifiche@headercandidatenamelabel{Name and Surname}% - \def\@verifiche@headerclasslabel{Class}% - \def\@verifichhe@headerdatelabel{Date}% - \def\@verifiche@exerciselabel{Exercise}% - \def\@verifiche@solutionlabel{Solution}% - }}% +\newcommand{\@verifiche@durationlabeldefault}{Time:}% +\newcommand{\@verifiche@asyearlabeldefault}{School year}% +\newcommand{\@verifiche@headercandidatenamelabel}{Name and Surname}% +\newcommand{\@verifiche@headerclasslabel}{Class}% +\newcommand{\@verifichhe@headerdatelabel}{Date}% +\newcommand{\@verifiche@exerciselabel}{Exercise}% +\newcommand{\@verifiche@solutionlabel}{Solution}% +\newcommand{\@verifiche@Tletter}{T}% +\newcommand{\@verifiche@Fletter}{F}% +\newcommand{\italiandictiornary}{% + \renewcommand{\@verifiche@durationlabeldefault}{Tempo della prova:}% + \renewcommand{\@verifiche@asyearlabeldefault}{Anno scolastico}% + \renewcommand{\@verifiche@headercandidatenamelabel}{Nome e Cognome}% + \renewcommand{\@verifiche@headerclasslabel}{Classe}% + \renewcommand{\@verifichhe@headerdatelabel}{Data}% + \renewcommand{\@verifiche@exerciselabel}{Quesito}% + \renewcommand{\@verifiche@solutionlabel}{Soluzione}% + \renewcommand{\@verifiche@Tletter}{V}% + \renewcommand{\@verifiche@Fletter}{F}% +}% +\@ifpackageloaded{babel}{% if babel is loaded + \addto\captionsitalian{\italiandictiornary}% +}{%else if polyglossia is loaded + \@ifpackageloaded{polyglossia}{% + \addto\captionsitalian{\italiandictiornary}% + }{}% +}% \newcommand{\@durationlabeldefault}{\@verifiche@durationlabeldefault}% \newcommand{\@asyearlabeldefault}{\@verifiche@asyearlabeldefault}% \newcommand{\headercandidatenamelabel}{\@verifiche@headercandidatenamelabel}% @@ -202,6 +202,9 @@ \renewcommand{\@rpt@delimiter}{#2}} \newcommand{\ptdelimiters}[1]{% \@defineptdelimiter#1} +%% checkmaker +\newcommand{\checkmarker}{$\checkmark$}% +\newcommand{\verifiche@checkmarker}{\bgroup\ifsolutionscolor\color{\solutionscolor}\fi\checkmarker\egroup}% %% convert ref to num \newcommand*{\convertreftonum}[1]{% \romannumeral @@ -320,13 +323,23 @@ \@rpartialpt@delimiter% \addtocounter{partialpoints}{#1}}% \fi}% -\NewDocumentEnvironment{soluzione}{+b}{% +\define@key{soluzione}{label}[\solutionlabel]{% + \def\verifiche@tempsoluzionelabel{#1}% +} +\newcommand{\verifiche@solutionlabel}{% + \ifdefined\verifiche@tempsoluzionelabel\verifiche@tempsoluzionelabel% + \else\solutionlabel\fi% +}% +\NewDocumentEnvironment{soluzione}{o +b}{% + \IfValueT{#1}{\setkeys{soluzione}{#1}}% \ifsol% \par\addvspace{\baselineskip}% - {\noindent\bfseries \solutionlabel}% + {\noindent\bfseries% + \ifsolutionscolor\color{\solutionscolor}\fi% + \verifiche@solutionlabel}% \par\nobreak\noindent\ignorespaces% \setlength\parindent{0pt}%no parindent - \solutionfont #1% + \solutionfont #2% \fi% }{% \ifsol% @@ -350,16 +363,21 @@ $\overset{\relax}{\underline{\hspace{#1}}}$% \fi}% \newcommand{\truefalse}[1]{% - \tikz[baseline=-.8ex]{% - %true part - \node[draw, rectangle, minimum size=1.5em] {V};% - \ifsol\IfSubStr{#1}{V}{\node[inner sep=0pt, shift={(1pt,1pt)}]{% - $\Large\ifsolutionscolor\color{\solutionscolor}\fi\checkmark$}}{};\fi% - %false part - \node[xshift=1cm, draw, rectangle, minimum size=1.5em]{F};% - \ifsol\IfSubStr{#1}{F}{\node[inner sep=0pt, xshift=1cm, shift={(1pt,1pt)}]{% - $\Large\ifsolutionscolor\color{\solutionscolor}\fi\checkmark$}}{};\fi% - }% + %True + \fbox{\@verifiche@Tletter}% + \ifsol\llap{% + \if#1\@verifiche@Tletter% + \Large\verifiche@checkmarker% + \fi}% + \fi% + \quad% + %False + \fbox{\@verifiche@Fletter}% + \ifsol\llap{% + \if#1\@verifiche@Fletter% + \Large\verifiche@checkmarker% + \fi}% + \fi%% } \newcommand{\finderror}[2]{% \ifsol% @@ -368,20 +386,26 @@ #1% \fi% } -\newlist{crocette}{itemize*}{1}% -\setlist[crocette]{label=\closedquestionitem, itemjoin={\hfill}}% +\newlist{crocette}{itemize}{1}% +\newlist{crocette*}{itemize*}{1}% +\setlist[crocette]{label=\closedquestionitem, leftmargin=*, parsep=0pt }% +\setlist[crocette*]{label=\closedquestionitem, itemjoin={\hfill}}% \newcommand{\checked}{% \ifsol% - \closedquestionitem\tikz[remember picture, overlay, baseline=-1ex, xshift=-.7ex] - {\node{\ifsolutionscolor\color{\solutionscolor}\fi$\checkmark$};} - \else - \closedquestionitem + \closedquestionitem\llap{\verifiche@checkmarker\hspace{-1pt}}% + \else% + \closedquestionitem% \fi} -\NewDocumentEnvironment{closedquestion}{+b}{% - \begin{crocette}#1% +\NewDocumentEnvironment{closedquestion}{O{}+b}{% + \begin{crocette}[#1]#2% }{% - \end{crocette} -} + \end{crocette}% +}% +\NewDocumentEnvironment{closedquestion*}{O{} +b}{% + \begin{crocette*}[#1]#2% +}{% + \end{crocette*}% +}% \define@key{openquestion}{width}[\linewidth]{\def\openquestionwidth{#1}} \define@key{openquestion}{height}[19cm]{\def\openquestionheight{#1}} @@ -434,6 +458,10 @@ {#4} \end{minipage} } +\NewDocumentCommand{\makecolumn}{O{t} m +m}{% + \parbox[#1]{#2}{#3}% + \@ifnextchar\makecolumn{\hspace*{\columnseparation}}{}% +}% \endinput %% %% End of file `verifiche.sty'. |