From ffee07bd7efd5b8cdf09d3d335fd249e8087b035 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 10 Feb 2022 21:19:50 +0000 Subject: verifiche (10feb22) git-svn-id: svn://tug.org/texlive/trunk@61973 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/verifiche/verifiche.dtx | 94 ++++++++++++++++------ .../source/latex/verifiche/verifiche.ins | 4 +- 2 files changed, 71 insertions(+), 27 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/verifiche/verifiche.dtx b/Master/texmf-dist/source/latex/verifiche/verifiche.dtx index dc5a4a9e7ed..a17c5361433 100644 --- a/Master/texmf-dist/source/latex/verifiche/verifiche.dtx +++ b/Master/texmf-dist/source/latex/verifiche/verifiche.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (LPPL) 2020 by Francesco Raccanello +% Copyright (LPPL) 2020 - 2022 by Francesco Raccanello % % This file may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -16,7 +16,7 @@ % % \iffalse %\NeedsTeXFormat{LaTeX2e} -%\ProvidesPackage{verifiche} [2021/08/18 v4.2 .dtx verifiche file] +%\ProvidesPackage{verifiche} [2022/02/10 v4.3 .dtx verifiche file] %<*driver> \documentclass{ltxdoc} \usepackage[utf8]{inputenc} @@ -27,8 +27,8 @@ language=[LaTeX]TeX, morekeywords={\setlength, \institute, \asyear, \testtype, \instruction, \duration, \printheading, \institutefont, \asyearfont, \testtypefont, \instructiondelimiter, \headerfont, \instrunctionfont, - \durationfont, \eserciziolabel, \solutionfont, \diffsymb, \closedquestionitem, - \inlinesol, \completetext, \truefalse, \openquestion, \linedopenquestion, \squaredopenquestion, \headercandidatenamelabel, \checked, \finderror, \textandimage, \partialpt, \ptprefix, \ptlabel, \partialptlabel, \partialptdelimiters, \ptdelimiters}, + \durationfont, \exerciselabel, \solutionfont, \solutionlabel, \diffsymb, \closedquestionitem, + \inlinesol, \completetext, \truefalse, \openquestion, \linedopenquestion, \squaredopenquestion, \headercandidatenamelabel, \checked, \finderror, \textandimage, \partialpt, \ptprefix, \ptlabel, \partialptlabel, \partialptdelimiters, \ptdelimiters, \partialptprefix}, keywordstyle=\color{blue}, escapeinside={*@}{@*}, inputencoding=utf8, @@ -66,7 +66,7 @@ % % \fi % -% \CheckSum{752} +% \CheckSum{801} % \changes{v1.0}{2020/06/14}{Initial version.} % \changes{v2.0}{2020/06/26}{Better performance in exercise environment.} % \changes{v2.1}{2020/06/30}{Introduced closedquestionitem to control |item| symbol.} @@ -75,6 +75,7 @@ % \changes{v4.0}{2021/02/15}{Introduce comando to change the aspect of the exercise score.} % \changes{v4.1}{2021/02/16}{Introduce ptrulerlength to change the aspect of the exercise score.} % \changes{v4.2}{2021/08/18}{Solved truefalse issue in solutionsmode. Add noexercisept global option to hide the score of each exercise.} +% \changes{v4.3}{2022/02/10}{Move |parindent{0pt}| inside the environment.} % \GetFileInfo{verifiche.sty} % \DoNotIndex{\newcommand,\newenvironment,\def,\begin,\end,\par} % \DoNotIndex{\DeclareOption,\ExecuteOptions,\ProcessOptions,\RequirePackage} @@ -707,7 +708,7 @@ dell'esercizio somministrato %<*example> % \fi \example -{\openquestion[type=squared]{ +{\openquestion[type=squares]{ Prova del testo della soluzione della domanda aperta }} @@ -850,7 +851,7 @@ dell'esercizio somministrato % %\fi % -%\DescribeMacro{\headercandidatenamelabel}Quando viene composta l'intestazione principale nella prima pagina, compare una riga in cui il candidato può scrivere il proprio nome e cognome. L'etichetta di questa parte controllata dal comando |\headercandidatenamelabel|, che può essere opportunamente cambiata tramite il comando: +%\DescribeMacro{\headercandidatenamelabel}\DescribeMacro{\headerdatelabel}Quando viene composta l'intestazione principale nella prima pagina, compare una riga in cui il candidato può scrivere il proprio nome e cognome, la data e la classe. L'etichetta della prima voce è determinata dal comando |\headercandidatenamelabel|, che può essere opportunamente cambiata tramite il comando: %\iffalse %<*example> %\fi @@ -860,7 +861,7 @@ dell'esercizio somministrato %\iffalse % %\fi -%Allo stesso modo è possibile modificare la descrizione della classe \DescribeMacro{\headerclasslabel} e della data\DescribeMacro{\headerdatelabel}. +%Allo stesso modo è possibile modificare la descrizione della classe \DescribeMacro{\headerclasslabel}tramite la redefinizione del comando |\headerclasslabel| e della data\DescribeMacro{\headerdatelabel} tramite comando |\headerdatelabel|. % Tutte queste tre voci prevedono, per ciascuna, una riga vuota ove scrivere l'informazione richiesta.\DescribeMacro{\candidatenamerulerlength}\DescribeMacro{\classrulerlength}\DescribeMacro{\daterulerlength} Le lunghezze delle tre righe possono essere modificate impostando le lunghezze desiderate %\iffalse %<*example> @@ -874,12 +875,12 @@ dell'esercizio somministrato %Attraverso questi comandi è possibile anche rimuovere una (o più) delle tre voci. Se ad esempio non si vuole visualizzare la classe d'appartenenza del candidato, sarà sufficiente ridefinire gli opportuni comandi nel seguente modo: |\renewcommand{\headerclasslabel}{}|, così da non visualizzare alcuna scritta, e |\setlength{\classrulerlength}{0pt}| per rimuovere la riga associata. % %\subsection*{Ambiente \texttt{esercizio}} -%\DescribeMacro{\eserciziolabel}Gli esercizi vengono inseriti anteponendo al loro testo la dicitura ‘‘Quesito’’ seguito (eventualmente) da un numero. Per cambiare questa dicitura, a livello globale, ovvero per ogni esercizio, è sufficiente ridefinire il comando |\eserciziolabel|. +%\DescribeMacro{\exerciselabel}Gli esercizi vengono inseriti anteponendo al loro testo la dicitura ‘‘Quesito’’ seguito (eventualmente) da un numero. Per cambiare questa dicitura, a livello globale, ovvero per ogni esercizio, è sufficiente ridefinire il comando |\exerciselabel|. %\iffalse %<*example> %\fi \begin{lstlisting} -\renewcommand{\eserciziolabel}*@\marg{Preambolo dell'esercizio}@* +\renewcommand{\exerciselabel}*@\marg{Preambolo dell'esercizio}@* \end{lstlisting} %\iffalse % @@ -947,6 +948,18 @@ dell'esercizio somministrato % %\fi % +%\subsection*{Ambiente \texttt{soluzione}} +% Per quel che riguarda l'ambiente |soluzione| è possibile cambiare il nome dell'ambente ridefinendo il comando |\solutionlabel|\DescribeMacro{\solutionlabel}. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\renewcommand{\solutionlabel}*@\marg{Preambolo della soluzione}@* +\end{lstlisting} +%\iffalse +% +%\fi +% % % \StopEventually{\clearpage\PrintChanges \clearpage\PrintIndex} % \section{Implementation} @@ -984,10 +997,6 @@ dell'esercizio somministrato separate-uncertainty } % \end{macrocode} -%Finally the indentation is turned off. -% \begin{macrocode} -\setlength\parindent{0pt} -% \end{macrocode} % %\subsection{newif} %Some conditionals are defined and initiated: @@ -1057,6 +1066,41 @@ dell'esercizio somministrato \setlength{\ptrulerlength}{1cm} % \end{macrocode} % +%\subsection{Labels} +%Some labels are define as a variable in order to leave the user the possibility of customization the predefine texts. +% \begin{macrocode} +\newcommand{\@durationlabeldefault}{Time:}% +\newcommand{\@asyearlabeldefault}{School year}% +\newcommand{\headercandidatenamelabel}{Student name}% +\newcommand{\headerclasslabel}{Class}% +\newcommand{\headerdatelabel}{Date}% +\newcommand{\exerciselabel}{Exercise}% +\newcommand{\solutionlabel}{Solution}% +% \end{macrocode} +%If the package \textsf{babel} or \textsf{polyglossia} is loaded with the italian language specify, than the predefine labels are redefine: +% \begin{macrocode} +\@ifpackageloaded{babel}{% + \addto\captionsitalian{% + \renewcommand{\@durationlabeldefault}{Tempo della prova:}% + \renewcommand{\@asyearlabeldefault}{Anno scolastico}% + \renewcommand{\headercandidatenamelabel}{Nome e Cognome}% + \renewcommand{\headerclasslabel}{Classe}% + \renewcommand{\headerdatelabel}{Data}% + \renewcommand{\exerciselabel}{Quesito}% + \renewcommand{\solutionlabel}{Soluzione}% + }}{% +\@ifpackageloaded{polyglossia}{% + \addto\captionsitalian{% + \renewcommand{\@durationlabeldefault}{Tempo della prova:}% + \renewcommand{\@asyearlabeldefault}{Anno scolastico}% + \renewcommand{\headercandidatenamelabel}{Nome e Cognome}% + \renewcommand{\headerclasslabel}{Classe}% + \renewcommand{\headerdatelabel}{Data}% + \renewcommand{\exerciselabel}{Quesito}% + \renewcommand{\solutionlabel}{Soluzione}% + }}{} + }% +% \end{macrocode} %\subsection{Macro and environment} %\iffalse %%macro and environment @@ -1068,13 +1112,13 @@ dell'esercizio somministrato % \begin{macrocode} \newcommand{\institute}[1]{% \gdef\@institute{#1}} -\newcommand{\duration}[2][Tempo della prova:]{% +\newcommand{\duration}[2][\@durationlabeldefault]{% \gdef\@durationpreamble{#1}\gdef\@duration{#2}} \newcommand{\testtype}[1]{% \gdef\@testtype{#1}} \newcommand{\instruction}[1]{% \gdef\@instruction{#1}} -\newcommand{\asyear}[2][Anno scolastico]{% +\newcommand{\asyear}[2][\@asyearlabeldefault]{% \gdef\@asyearpreamble{#1}\gdef\@asyear{#2}} % \end{macrocode} % @@ -1112,10 +1156,7 @@ dell'esercizio somministrato \hspace*{\fill}\@durationpreamble\space\bfseries #1\hspace*{\fill}} % \end{macrocode} % \begin{macrocode} -\newcommand{\headercandidatenamelabel}{Nome e Cognome} -\newcommand{\headerclasslabel}{Classe} -\newcommand{\headerdatelabel}{Data} -\newcommand{\@header@candidatename}{\headercandidatenamelabel\space\underline{\hspace{\candidatenamerulerlength}}} +\newcommand{\@header@candidatename}{\noindent\headercandidatenamelabel\space\underline{\hspace{\candidatenamerulerlength}}} \newcommand{\@header@class}{\headerclasslabel\space\underline{\hspace{\classrulerlength}}} \newcommand{\@header@date}{\headerdatelabel\space\underline{\hspace{\daterulerlength}}} \newcommand{\@header}{\@header@candidatename\hfill\@header@class\hfill\@header@date} @@ -1258,7 +1299,7 @@ dell'esercizio somministrato %%ambiente esercizio %\fi % \begin{macrocode} -\define@key{esercizio}{label}[Quesito]{% +\define@key{esercizio}{label}[\exerciselabel]{% \def\tempeserciziolabel{#1}}% \define@key{esercizio}{diff}[none]{ \def\diffstar{\hfill\foreach \i in {1,..., #1}{\diffsymb}}% @@ -1282,7 +1323,7 @@ dell'esercizio somministrato % \begin{macrocode} \newcommand{\exercisetitle}{% \ifdefined\tempeserciziolabel\tempeserciziolabel% - \else \eserciziolabel\fi% + \else \exerciselabel\fi% } % \end{macrocode} % @@ -1326,7 +1367,8 @@ dell'esercizio somministrato {\noindent\bfseries\exercisetitle\ifexercisesnumbered\space\theexercisenumber\fi}% \ifshowmarginexercise\exercisemargin\fi% \par% newline after label - \nobreak\noindent\ignorespaces#2%body of the environment + \setlength\parindent{0pt}%no parindent + \nobreak\ignorespaces#2%body of the environment }{% \par% \ignorespacesafterend% @@ -1345,7 +1387,8 @@ dell'esercizio somministrato \par\addvspace{\baselineskip}{\noindent\bfseries\exercisetitle}% \ifshowmarginexercise\exercisemargin\fi% \par% newline after label - \nobreak\noindent\ignorespaces#2% body of the environment + \setlength\parindent{0pt}%no parindent + \nobreak\ignorespaces#2% body of the environment }{% \par% \ignorespacesafterend @@ -1371,8 +1414,9 @@ dell'esercizio somministrato \NewDocumentEnvironment{soluzione}{+b}{% \ifsol% \par\addvspace{\baselineskip}% - {\noindent\bfseries Soluzione}% + {\noindent\bfseries \solutionlabel}% \par\nobreak\noindent\ignorespaces% + \setlength\parindent{0pt}%no parindent \solutionfont #1% \fi% }{% diff --git a/Master/texmf-dist/source/latex/verifiche/verifiche.ins b/Master/texmf-dist/source/latex/verifiche/verifiche.ins index de63841f732..9d72f914f23 100644 --- a/Master/texmf-dist/source/latex/verifiche/verifiche.ins +++ b/Master/texmf-dist/source/latex/verifiche/verifiche.ins @@ -1,5 +1,5 @@ %% -%% Copyright (C) 2020 i by Francesco Raccanello +%% Copyright (C) 2020 - 2022 i by Francesco Raccanello %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -16,7 +16,7 @@ \usedir{tex/latex/verifiche} \preamble This is a generated file. -Copyright (C) 2021 by Francesco Raccanello +Copyright (C) 2020 - 2022 by Francesco Raccanello This file 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 -- cgit v1.2.3