diff options
author | Norbert Preining <norbert@preining.info> | 2020-01-03 03:00:55 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-01-03 03:00:55 +0000 |
commit | 7e18665e4aef9a8a3a8e42eac34504a9914b15cf (patch) | |
tree | 40a90e8c80f0b6a9e0f8c298ef515f97504fbc3b /macros/latex/contrib | |
parent | af7bc18edca6890fb1addbeb6a34672275532e3b (diff) |
CTAN sync 202001030300
Diffstat (limited to 'macros/latex/contrib')
43 files changed, 3772 insertions, 526 deletions
diff --git a/macros/latex/contrib/chess-problem-diagrams/README b/macros/latex/contrib/chess-problem-diagrams/README index a9573ef1dc..6e9503a16e 100644 --- a/macros/latex/contrib/chess-problem-diagrams/README +++ b/macros/latex/contrib/chess-problem-diagrams/README @@ -1,5 +1,5 @@ diagram --- A package for typesetting chessproblems -Version v1.12 / Stefan Hoening 2015 +Version v1.15 / Stefan Hoening 1994-2019 CONTENTS diff --git a/macros/latex/contrib/chess-problem-diagrams/diagram.dtx b/macros/latex/contrib/chess-problem-diagrams/diagram.dtx index 8213e7b453..249d14058b 100644 --- a/macros/latex/contrib/chess-problem-diagrams/diagram.dtx +++ b/macros/latex/contrib/chess-problem-diagrams/diagram.dtx @@ -13,9 +13,9 @@ %% %% % \fi -% \def\fileversion{v1.12} -% \def\docdate{2016/01/06} -% \CheckSum{4288} +% \def\fileversion{v1.15} +% \def\docdate{2019/12/28} +% \CheckSum{4545} % \changes{v0.1}{15 Februar 2004}{First Version} % \changes{v0.2}{23 Februar 2004}{Added the documentation for the % {\itshape information collecting} macros which may be used @@ -72,6 +72,10 @@ % \changes{v1.11.1}{16 March 2015}{Fixed issue 03f/b31:om: diagram.sty: label and ref don't respect diagnum prefix or diagnumbering setting.} % \changes{v1.12}{06 January 2016}{Implemented issue: 03f/fc0:om: diagram.dtx: change def x to newcommand.\\ % Changed name of internal commands ds@left, ds@right, ds@upsidedown due to a naming collising with options from eurosym.sty.} +% \changes{v1.13}{04 April 2019}{Implemented issue: 03f/99b:om: diagram.dtx: added new command fen to allow entering forsyth-edwards-notation} +% \changes{v1.14}{02 September 2019}{Fixed issue with stereo- and space-diagrams.} +% \changes{v1.15}{28 December 2019}{Fixed frame issue with stereo- and space-diagrams.\\ +% Added hook commands for begin/end diagram.} % % \DoNotIndex{\@arabic,\def,\@idxitem,\@ifnextchar,\@ifstar, % \@ne,\@ptsize,\ ,\advance,\AtEndOfPackage,\begin,\begingroup, @@ -100,7 +104,7 @@ % \begin{abstract} % It have been more than ten years now, since we last published a documented % version of the {\ttfamily diagram.sty}, which is mainly intended to -% be used for typesetting chess problems. Since 1994 I (Stefan H"oning) made a +% be used for typesetting chess problems. Since 1994 I (Stefan H\"oning) made a % couple of enhancements to the sourcecode of the style, without publishing and % putting this into the documentation. We also needed to upgrade to \LaTeXe. % The major change is the documentation language, which is english now. @@ -147,7 +151,7 @@ % \setboolean{legend}{true} % \author{Brand, Thomas} % \source{Problemkiste} \year{1992} -% \pieces[3+2]{wKa4, wLb5, wSh3, sKb7, sBh4} +% \fen{8/1k6/8/1B6/K6p/7N/8/8} % \stip{h\#5} % \sol{1.Ka8 Sg1, 2.h3 Ka5, 3.h2 Kb6, 4.h\x g1L+ Kc7, 5.La7 Lc6\#} % \end{diagram} @@ -256,6 +260,17 @@ % displayed as a black filled circle. So {\ttfamily sCf4} will % produce the symbol of an imitator. This is shown in % diagram~\ref{bigdia}. +% \item \DescribeMacro{\fen} +% As an alternative notation it is possible to enter the position in +% \textit{Forsyth-Edwards-Notation}. This is possible for 8\,$\times$\,8 boards +% only. +% +% As an example: The position in diagram~\ref{BSP2} was created via\newline +% |\fen{8/1k6/8/1B6/K6p/7N/8/8}|. +% +% +% As with the |\pieces| command, you may provide the number of white and +% black pieces as an optional parameter. % \item \DescribeMacro{\stipulation} \DescribeMacro{\stip} % is used to specify the stipulation of the problem, e.\,g.\ % |\stipulation{\#2}| may be used to specify a \explained{mate in @@ -970,7 +985,7 @@ % Specifies the preamble of our style file. % \begin{macrocode} %<*style> -\ProvidesPackage{diagram}[2016/01/06] +\ProvidesPackage{diagram}[2019/12/28] % \end{macrocode} % % \begin{macro}{\DefaultDiagramSize} @@ -1071,6 +1086,9 @@ \newcounter{cpd@blackPieces} \newcounter{cpd@neutralPieces} +\newcounter{cpd@row} +\newcounter{cpd@line} + \newcommand{\cpd@stepcounterWhite}{\stepcounter{cpd@whitePieces}} \newcommand{\cpd@stepcounterBlack}{\stepcounter{cpd@blackPieces}} \newcommand{\cpd@stepcounterNeutral}{\stepcounter{cpd@neutralPieces}} @@ -1148,6 +1166,7 @@ \newtoks\fieldframe@tk\fieldframe@tk={\relax} \newtoks\gridlines@tk\gridlines@tk={\relax} \newtoks\pieces@tk\pieces@tk={\relax} +\newtoks\fen@tk\fen@tk={\relax} \newtoks\fieldtext@tk\fieldtext@tk={\relax} \newtoks\text@tk\text@tk={\relax} \newtoks\stipulation@tk\stipulation@tk={\relax} @@ -1184,6 +1203,7 @@ \newif\if@judgement\@judgementfalse \newif\if@comment\@commentfalse \newif\if@pieces\@piecesfalse +\newboolean{@cpd@fen}\setboolean{@cpd@fen}{false}% \newif\if@fieldtext\@fieldtextfalse \newif\if@nofields\@nofieldsfalse \newif\if@gridlines\@gridlinesfalse @@ -1248,6 +1268,16 @@ \newif\ifds@label % \end{macrocode} % +% \begin{macro}{\cpd@begindiagram@hook} +% \begin{macro}{\cpd@enddiagram@hook} +% We define hooks to be executed in |\begin{diagram}| and |\end{diagram}|. +% \begin{macrocode} +\newcommand{\cpd@begindiagram@hook}{} +\newcommand{\cpd@enddiagram@hook}{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macro}{\diagram} % \begin{macro}{\@diagram} % Defines the code executed in |\begin{diagram}|. In case no @@ -1258,12 +1288,16 @@ \@ifnextchar [{\@diagram}{\@diagram[\@ight x\@ight]}% } -\def\@diagram[#1x#2]{% - \lines@max=#1% - \rows@max=#2% +\def\@cpd@initsize#1#2{% \setcounter{cpd@linesmax}{#1}% \setcounter{cpd@rowsmax}{#2}% \setcounter{cpd@maxsquare}{\value{cpd@rowsmax}*\value{cpd@linesmax}}% +} + +\def\@diagram[#1x#2]{% + \lines@max=#1% + \rows@max=#2% + \@cpd@initsize{#1}{#2}% \pl@ne=\z@% \current@plane=\z@% \let\put@sqs=\put@sqs@normal% @@ -1278,13 +1312,16 @@ % \begin{macrocode} \def\stereodiagram{% \begingroup% + \inner@frame=0.6pt% \@stereotrue% + \@cpd@initsize{8}{8}% \let\put@sqs=\put@sqs@stereo% \let\read@plane=\read@plane@stereo% \@start@diagram% } \def\spacediagram{% \begingroup% + \inner@frame=0.6pt% \@spacetrue% \@ifnextchar [{\@spacediagram}{\@spacediagram[5x5x5]}% } @@ -1293,6 +1330,7 @@ \lines@max=#1% \rows@max=#2% \planes@max=#3% + \@cpd@initsize{#1}{#2}% \let\put@sqs=\put@sqs@space% \let\read@plane=\read@plane@space% \@start@diagram% @@ -1304,6 +1342,7 @@ \let\month=\ds@month% \let\year=\ds@year% \let\label=\ds@label% + \cpd@begindiagram@hook% \ignorespaces% } @@ -1470,6 +1509,7 @@ }% }}% End of \dia@box \do@dia@job% + \cpd@enddiagram@hook% \endgroup% } @@ -1856,6 +1896,16 @@ \pieces@tk={#1}\@piecestrue% \ignorespaces% } +\newcommand{\fen}[2][]{% + \ifthenelse{\equal{#1}{}}% + {}% Do nothing + {% + \setboolean{cpd@checkPieceCounts}{true}% + \@parseWhiteAndBlackCount#1+\e@list + }% + \fen@tk={#2}\setboolean{@cpd@fen}{true}% + \ignorespaces% +} \def\fieldtext#1{% \fieldtext@tk={#1}\@fieldtexttrue% \ignorespaces% @@ -2749,6 +2799,18 @@ \fi% \l@@k% } +\def\cpd@fen@setpiece{% + \ifnum\pl@ne=\current@plane% + \cpd@stepcounterPieces% + \set@current@square@index{\value{cpd@line}}{\value{cpd@row}}% + \get@current@square@value% + \ifthenelse{\value{cpd@current@square@value}=\m@ne} + {\set@current@square@value{\the\help@a}}% + {\ifthenelse{\value{cpd@current@square@value}=144}% + {\set@current@square@value{\the\help@a+18}}% + {\errmessage{Trying to set a piece to an occupied square}}}% + \fi% +} \def\set@nofield, {% \ifnum\pl@ne=\current@plane% \set@current@square@index\lin@\r@w% @@ -2782,6 +2844,95 @@ \fi% \nextpr@c% } +\def\@cpd@handle@fen#1{% + \ifx#1/\relax% + \ifthenelse{\value{cpd@line}=8}% + {% + \setcounter{cpd@line}{0}% + \addtocounter{cpd@row}{\m@ne}% + }% + {% + \errmessage{FEN: there is now row to end here}% + }% + \else\ifx#1K\relax% + \let\cpd@stepcounterPieces\cpd@stepcounterWhite% + \help@a=5% + \cpd@fen@setpiece% + \addtocounter{cpd@line}{\@ne}% + \else\ifx#1Q\relax% + \let\cpd@stepcounterPieces\cpd@stepcounterWhite% + \help@a=4% + \cpd@fen@setpiece% + \addtocounter{cpd@line}{\@ne}% + \else\ifx#1R\relax% + \let\cpd@stepcounterPieces\cpd@stepcounterWhite% + \help@a=3% + \cpd@fen@setpiece% + \addtocounter{cpd@line}{\@ne}% + \else\ifx#1B\relax% + \let\cpd@stepcounterPieces\cpd@stepcounterWhite% + \help@a=2% + \cpd@fen@setpiece% + \addtocounter{cpd@line}{\@ne}% + \else\ifx#1N\relax% + \let\cpd@stepcounterPieces\cpd@stepcounterWhite% + \help@a=1% + \cpd@fen@setpiece% + \addtocounter{cpd@line}{\@ne}% + \else\ifx#1P\relax% + \let\cpd@stepcounterPieces\cpd@stepcounterWhite% + \help@a=0% + \cpd@fen@setpiece% + \addtocounter{cpd@line}{\@ne}% + \else\ifx#1k\relax% + \let\cpd@stepcounterPieces\cpd@stepcounterBlack% + \help@a=17% + \cpd@fen@setpiece% + \addtocounter{cpd@line}{\@ne}% + \else\ifx#1q\relax% + \let\cpd@stepcounterPieces\cpd@stepcounterBlack% + \help@a=16% + \cpd@fen@setpiece% + \addtocounter{cpd@line}{\@ne}% + \else\ifx#1r\relax% + \let\cpd@stepcounterPieces\cpd@stepcounterBlack% + \help@a=15% + \cpd@fen@setpiece% + \addtocounter{cpd@line}{\@ne}% + \else\ifx#1b\relax% + \let\cpd@stepcounterPieces\cpd@stepcounterBlack% + \help@a=14% + \cpd@fen@setpiece% + \addtocounter{cpd@line}{\@ne}% + \else\ifx#1n\relax% + \let\cpd@stepcounterPieces\cpd@stepcounterBlack% + \help@a=13% + \cpd@fen@setpiece% + \addtocounter{cpd@line}{\@ne}% + \else\ifx#1p\relax% + \let\cpd@stepcounterPieces\cpd@stepcounterBlack% + \help@a=12% + \cpd@fen@setpiece% + \addtocounter{cpd@line}{\@ne}% + \else\ifx1#1\relax% + \addtocounter{cpd@line}{1}% + \else\ifx2#1\relax% + \addtocounter{cpd@line}{2}% + \else\ifx3#1\relax% + \addtocounter{cpd@line}{3}% + \else\ifx4#1\relax% + \addtocounter{cpd@line}{4}% + \else\ifx5#1\relax% + \addtocounter{cpd@line}{5}% + \else\ifx6#1\relax% + \addtocounter{cpd@line}{6}% + \else\ifx7#1\relax% + \addtocounter{cpd@line}{7}% + \else\ifx8#1\relax% + \addtocounter{cpd@line}{8}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi +} +\def\@cpd@parse@fen#1{\@cpd@handle@fen#1\l@@klist} \def\p@rsepieces#1, {\getc@lor#1\e@list\l@@klist} \def\p@rsetext#1, {\get@text#1\e@list\l@@klist} \def\set@text{% @@ -3017,6 +3168,14 @@ % Now we should clear the board \clear@board% % Let us now parse the list of pieces + \ifthenelse{\boolean{@cpd@fen}}{% + \ifthenelse{\value{cpd@rowsmax}=8}{}{\errmessage{FEN is only allowed for 8x8 boards.}} + \ifthenelse{\value{cpd@linesmax}=8}{}{\errmessage{FEN is only allowed for 8x8 boards.}} + \setcounter{cpd@row}{7}% + \setcounter{cpd@line}{0}% + \let\@action\@cpd@parse@fen% + \@parseTokenlist\fen@tk\e@list% + }{}% \if@pieces% \let\@action\p@rsepieces% \let\piece@job\l@@k\let\plane@job\set@piece% diff --git a/macros/latex/contrib/chess-problem-diagrams/diagram.pdf b/macros/latex/contrib/chess-problem-diagrams/diagram.pdf Binary files differindex 18407045fd..0fe72da32d 100644 --- a/macros/latex/contrib/chess-problem-diagrams/diagram.pdf +++ b/macros/latex/contrib/chess-problem-diagrams/diagram.pdf diff --git a/macros/latex/contrib/covington/README b/macros/latex/contrib/covington/README index 106dddc26d..640a732583 100644 --- a/macros/latex/contrib/covington/README +++ b/macros/latex/contrib/covington/README @@ -3,7 +3,7 @@ The covington package LaTeX macros for Linguistics -Copyright 1991--2019 Michael A. Covington +Copyright 1991--2020 Michael A. Covington Robin Fairbairns Juergen Spitzmueller @@ -31,6 +31,9 @@ The package consists of the following files: == CHANGES == +* Version 2.4 (2020-01-02): + - Fix definition of covexercise if no subsection counter exists. + * Version 2.3 (2019-06-21): - Add preamble option to subexamples environment. - Allow to use covington together with the drs package. diff --git a/macros/latex/contrib/covington/covington.pdf b/macros/latex/contrib/covington/covington.pdf Binary files differindex 059afc1af7..601f8b4b9a 100644 --- a/macros/latex/contrib/covington/covington.pdf +++ b/macros/latex/contrib/covington/covington.pdf diff --git a/macros/latex/contrib/covington/covington.sty b/macros/latex/contrib/covington/covington.sty index 3d1b8fc1a3..70edc42fb4 100644 --- a/macros/latex/contrib/covington/covington.sty +++ b/macros/latex/contrib/covington/covington.sty @@ -42,8 +42,8 @@ %%% Metadata %%% -\def\filedate{2019/06/21} -\def\fileversion{2.3} +\def\filedate{2020/01/02} +\def\fileversion{2.4} \def\filename{covington.sty} % Force redefinition of environments? @@ -951,7 +951,7 @@ % % New in 1.1 (2016-07-06): % We provide a covexercise environment and only (re)define -% example if it does not yet exist or if redefinition is +% exercise if it does not yet exist or if redefinition is % forced by the "force" option. This prevents clashes % with packages/classes that roll their own exercise environment. @@ -968,7 +968,11 @@ % large curly brackets. Good for alternatives % within sentences or PS-rules. -\newtheorem{covexercise}{Exercise}[subsection] +\ifcsname c@subsection\endcsname + \newtheorem{covexercise}{Exercise}[subsection] +\else + \newtheorem{covexercise}{Exercise} +\fi % Exercise numbering resets to 0 not only at the start of % a subsection, but also at the start of a section or chapter diff --git a/macros/latex/contrib/covington/covington.tex b/macros/latex/contrib/covington/covington.tex index 21eefc3562..4ae0682007 100644 --- a/macros/latex/contrib/covington/covington.tex +++ b/macros/latex/contrib/covington/covington.tex @@ -94,8 +94,8 @@ % % Titling % -\def\pversion{Version 2.3} -\def\pdate{June 21, 2019} +\def\pversion{Version 2.4} +\def\pdate{January 2, 2020} \title{\textbf{The \cvt\ Package\\Macros for Linguistics}} \author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer. @@ -1095,6 +1095,12 @@ it. \section{Release history} +\subsection*{2.4 (2020 January 2)} + +\begin{itemize} + \item Fix definition of covexercise theorem when no subsection counter is defined. +\end{itemize} + \subsection*{2.3 (2019 June 21)} \begin{itemize} @@ -1248,7 +1254,7 @@ it. by morpheme glosses}. Revised version of February 2008. Department of Linguistics, Max Plank Institute for Evolutionary Anthropology. \url{http://www.eva.mpg.de/lingua/resources/glossing-rules.php}. - \bibitem{drs} Dimitradis, Alexis: \emph{drs -- Typeset Discourse Representation Structures (DRS)}. + \bibitem{drs} Dimitriadis, Alexis: \emph{drs -- Typeset Discourse Representation Structures (DRS)}. June 10, 2010. \url{https://ctan.org/pkg/drs}. \bibitem{sdrt} Isambert, Paul: \emph{sdrt -- Macros for Segmented Discourse Representation Theory}. May 13, 2007. \url{https://ctan.org/pkg/sdrt}. diff --git a/macros/latex/contrib/epigraph/README b/macros/latex/contrib/epigraph/README.md index fa639ba1c2..e5a7ff4849 100644 --- a/macros/latex/contrib/epigraph/README +++ b/macros/latex/contrib/epigraph/README.md @@ -1,13 +1,20 @@ -____________________ -The EPIGRAPH package +# The EPIGRAPH package - The epigraph package is designed for typesetting epigraphs --- the +The epigraph package is designed for typesetting epigraphs --- the pithy quotations often found at the start (or end) of a chapter. Both -single epigraphs and lists of epigraphs are catered for. Various aspects +single epigraphs and lists of epigraphs are catered for. Various aspects are easily configurable. -______________ -Change History +## Change History + +Version 1.5e (2020/01/02) +- Try to prevent breaks after epigraphs +- Add \epigraphnoindent to automatically suppress indentation + after all \epigraph commands + +Version 1.5d (2011/08/07) +- Load the nextpage package for \cleartoevenpage + (this avoids loading order conflicts) Version 1.5c (2009/09/02) - New maintainer (Will Robertson) @@ -32,34 +39,39 @@ Changes in Version 1.2 (1999/09/12) Changes in Version 1.1: (1998/11/29) - Added support for epigraphs above chapter titles. ------------------------------------------------------------------ - Author: Peter Wilson, Herries Press - Maintainer: Will Robertson (will dot robertson at latex-project dot org) - Copyright 1998--2004 Peter R. Wilson - - This work may be distributed and/or modified under the - conditions of the LaTeX Project Public License, either - version 1.3c of this license or (at your option) any - later version: <http://www.latex-project.org/lppl.txt> - - This work has the LPPL maintenance status "maintained". - The Current Maintainer of this work is Will Robertson. - - This work consists of the files: -README (this file) -epigraph.dtx -epigraph.ins -epigraph.pdf (user manual) - and the derived files: -epigraph.sty +## Copyright + + Author: Peter Wilson, Herries Press + Maintainer: Will Robertson + will dot robertson at latex-project dot org + Copyright 1998--2004 Peter R. Wilson + 2009--2020 Will Robertson + + This work may be distributed and/or modified under the + conditions of the LaTeX Project Public License, either + version 1.3c of this license or (at your option) any + later version: <http://www.latex-project.org/lppl.txt> + + This work has the LPPL maintenance status "maintained". + The Current Maintainer of this work is Will Robertson. + +## Manifest + +This work consists of the files: +* README (this file) +* epigraph.dtx +* epigraph.ins +* epigraph.pdf (user manual) +and the derived files: +* epigraph.sty The distribution consists of the files: -README (this file) -epigraph.dtx -epigraph.ins -epigraph.pdf (user manual) +* README (this file) +* epigraph.dtx +* epigraph.ins +* epigraph.pdf (user manual) ------------------------------------------------------------------ +## Installation To install the package: - run: latex epigraph.ins (which will generate epigraph.sty) @@ -67,12 +79,11 @@ To install the package: (typically in a local texmf tree at tex/latex/***) and refresh the file database. See the FAQ on CTAN at help/uk-tex-faq or http://www.tug.ac.uk/faq for more information on this. +- (or `l3build install`) To process the user manual: - run: latex epigraph.dtx - run: makeindex -s gind.ist epigraph - run: latex epigraph.dtx -- Print epigraph.dvi for a hardcopy of the package manual +- (or `l3build doc`) -2004/04/22 -Peter Wilson diff --git a/macros/latex/contrib/epigraph/epigraph.dtx b/macros/latex/contrib/epigraph/epigraph.dtx index baec16b14d..046530f5a5 100644 --- a/macros/latex/contrib/epigraph/epigraph.dtx +++ b/macros/latex/contrib/epigraph/epigraph.dtx @@ -3,6 +3,7 @@ % Author: Peter Wilson, Herries Press % Maintainer: Will Robertson (will dot robertson at latex-project dot org) % Copyright 1998--2004 Peter R. Wilson +% Copyright 2011 Will Robertson % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -27,7 +28,7 @@ % % \fi % -% \CheckSum{242} +% \CheckSum{244} % % \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} % \DoNotIndex{\@centercr,\@cite} @@ -80,12 +81,15 @@ % \changes{v1.5a}{2002/10/22}{Fixed class with ccaption package} % \changes{v1.5b}{2004/04/22}{Updated license and contact details} % \changes{v1.5c}{2009/09/02}{New maintainer (Will Robertson)} +% \changes{v1.5d}{2011/08/07}{Load package `nextpage' for \cs{cleartoevenpage}} % % \def\dtxfile{epigraph.dtx} % \def\fileversion{v1.5} \def\filedate{2000/02/20} % \def\fileversion{v1.5a} \def\filedate{2002/10/22} % \def\fileversion{v1.5b} \def\filedate{2004/04/22} % \def\fileversion{v1.5c} \def\filedate{2009/09/02} +% \def\fileversion{v1.5d} \def\filedate{2011/08/07} +% \def\fileversion{v1.5e} \def\filedate{2020/01/02} % \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package % \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option % \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file @@ -111,7 +115,7 @@ % Maintainer: Will Robertson\\ % \texttt{will dot robertson at latex-project dot org} % } -% \date{\filedate} +% \date{\fileversion\qquad\filedate} % \maketitle % \begin{abstract} % The \Lpack{epigraph} package can be used to typeset a relevant @@ -151,7 +155,7 @@ % The \Lpack{epigraph} package provides commands for typesetting % a single epigraph and environments for typesetting a list of epigraphs. % Epigraphs can be typeset at either the left, the center or the right of -% the typeblock. A few example eipgraphs are exhibited here, and +% the typeblock. A few example epigraphs are exhibited here, and % others can be found in an article by % Christina Thiele~\cite{TTC199}. % @@ -181,7 +185,7 @@ % % \DescribeMacro{\qitem} % Each epigraph in the list is specified by a -% |\qitem{|\meta{text}|}{|\meta{source}|}| command (analagous to the |\item| +% |\qitem{|\meta{text}|}{|\meta{source}|}| command (analogous to the |\item| % command in ordinary list environments). % By default, the \meta{source} is typeset at the bottom right of the % \meta{text}. @@ -194,22 +198,30 @@ % {\textit{Letters on a Regicide Peace}\\ \textsc{Edmund Burke}} % % The commands described in this section apply to both the |\epigraph| -% command and the |epigraphs| environment. But first of all, note that an -% epigraph immediately after a heading will cause the first paragraph -% of the following text to be indented. If you want the initial paragraph -% to have no indentation, then start it with the |\noindent| command. +% command and the |epigraphs| environment. +% +% An epigraph immediately after a heading will cause the first paragraph +% of the following text to be indented. +% If you want the initial paragraph +% to have no indentation, then start it with the |\noindent| command, or +% \DescribeMacro{\epigraphnoindent} +% add |\epigraphnoindent| to your document preamble. +% (|\epigraphnoindentfalse| will reverse the setting.) +% This command only affects the |\epigraph| command; for the |epigraphs| environment +% the |\noindent| approach must still be used. % % \DescribeMacro{\epigraphwidth} -% \DescribeMacro{\textflush} % The epigraphs are typeset in a minipage of width |\epigraphwidth|. The default % value for this can be changed using the |\setlength| command. Typically, -% epigraphs are typset in a measure much less than the width of the textblock. +% epigraphs are typeset in a measure much less than the width of the textblock. +% +% \DescribeMacro{\textflush} % In order to avoid bad line breaks, the \meta{text} is normally typeset -% raggedright. +% ragged right. % The |\textflush| command controls the \meta{text} typesetting style, % and it can be redefined from its default value of -% \texttt{flushleft} (which produces raggedright). The sensible values -% are \texttt{center} for centered text, \texttt{flushright} for raggedleft +% \texttt{flushleft} (which produces ragged right). The sensible values +% are \texttt{center} for centered text, \texttt{flushright} for ragged left % text, and \texttt{flushepinormal} for normal justified text. % % If by any chance you want the \meta{text} to be typeset in some @@ -261,7 +273,7 @@ % \DescribeMacro{\afterepigraphskip} % The two |...skip| commands specify the amount of vertical space inserted % before and after typeset epigraphs. Again, these can be changed by -% |\setlength|. It is desireable that the sum of their values should be an +% |\setlength|. It is desirable that the sum of their values should be an % integer multiple of the |\baselineskip|. % % Note that you can use normal \LaTeX{} commands in the \meta{text} and @@ -288,8 +300,8 @@ % for printing at \meta{distance} below the header on a page. % \meta{text} can be ordinary text or, more likely, can be either an % |\epigraph| command or an |epigraphs| environment. By default, the -% epigraph will be typeset at the righthand margin. -% If the command is immediately preceeded by a |\chapter| or |\chapter*| +% epigraph will be typeset at the right-hand margin. +% If the command is immediately preceded by a |\chapter| or |\chapter*| % command, the epigraph is typeset on the chapter title page. % % The default value for the optional \meta{distance} argument is set so @@ -347,12 +359,13 @@ % of a chapter, where the something belongs to the chapter that is about to % start rather than the chapter that has just ended. In order to do this % in a document that is going to be printed -% doublesided, the chapter must start on an odd numbered page and the -% pre-chapter material put on the immediately preceeding even numbered page. +% double-sided, the chapter must start on an odd numbered page and the +% pre-chapter material put on the immediately preceding even numbered page. % The |\cleartoevenpage| command is like the |\cleardoublepage| except % that the page following the command will be an even numbered page, and the % command takes an optional argument, i.e., |\cleartoevenpage{|[arg|]|, % which is applied to the skipped page (if any). +% This command is provided by the \texttt{nextpage} package. % % Here is an example: % \begin{verbatim} @@ -421,7 +434,7 @@ % The value of the optional argument may need changing to vertically adjust % the position of the epigraph. If there is any |\part| that does not have an % epigraph then an empty |\epigraphhead| command (i.e., |\epigraphhead{}|) -% must be placed immediately befor the |\part| command. +% must be placed immediately before the |\part| command. % % \end{itemize} % @@ -484,7 +497,8 @@ % \begin{macrocode} %<*usc> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{epigraph}[2009/09/02 v1.5c typesetting epigraphs] +\ProvidesPackage{epigraph}[2020/01/02 v1.5e typesetting epigraphs] +\RequirePackage{nextpage} % \end{macrocode} % % \begin{macro}{\beforeepigraphskip} @@ -515,6 +529,16 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\epigraphnoindent} +% \begin{macro}{\ifepigraphnoindent} +% Whether to add \cs{noindent} (false by default for backwards compatibility). +% \begin{macrocode} +\newif\ifepigraphnoindent +\newcommand\epigraphnoindent{\epigraphnoindenttrue} +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macro}{\epigraphflush} % \begin{macro}{\textflush} % \begin{macro}{\sourceflush} @@ -596,11 +620,21 @@ % for a single epigraph. This is set in a minipage to prevent breaking % across a page. Position it according to |\epigraphflush|. % \begin{macrocode} -\newcommand{\epigraph}[2]{\vspace{\beforeepigraphskip} - {\epigraphsize\begin{\epigraphflush}\begin{minipage}{\epigraphwidth} - \@epitext{#1}\\ \@episource{#2} - \end{minipage}\end{\epigraphflush} - \vspace{\afterepigraphskip}}} +\newcommand{\epigraph}[2]{% + \vspace{\beforeepigraphskip} + \vbox{% + \epigraphsize + \begin{\epigraphflush} + \begin{minipage}{\epigraphwidth} + \@epitext{#1}\\ + \@episource{#2}% + \end{minipage}% + \end{\epigraphflush}% + }% + \nointerlineskip + \vspace*{\afterepigraphskip}% + \ifepigraphnoindent\@afterheading\fi +} % \end{macrocode} % \end{macro} % @@ -643,25 +677,13 @@ \leftmargin\z@ \rightmargin\z@ \let\makelabel\qitemlabel}}% {\endlist\end{minipage}\end{\epigraphflush} - \vspace{\afterepigraphskip}} + \vspace{\afterepigraphskip}% +} % \end{macrocode} % \end{environment} % % \subsection{Epigraphs before a chapter title} % -% \begin{macro}{\cleartoevenpage} -% Like |\cleardoublepage| except that it skips pages until an even one, and -% its optional argument is applied to the skipped page, if any. -% The code is based on the kernel |\cleardoublepage| in \file{ltoutput.dtx}. -% \changes{v1.2}{1999/09/12}{Added \cs{cleartoevenpage} command} -% \changes{v1.5}{2000/02/20}{Added optional arg to \cs{cleartoevenpage}} -% \begin{macrocode} -\providecommand{\cleartoevenpage}[1][\@empty]{% - \clearpage% - \ifodd\c@page\hbox{}#1\clearpage\fi} -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\@epichapapp} % \begin{macro}{\dropchapter} % \begin{macro}{\undodrop} diff --git a/macros/latex/contrib/epigraph/epigraph.pdf b/macros/latex/contrib/epigraph/epigraph.pdf Binary files differindex 6b8773e03b..7de33cf197 100644 --- a/macros/latex/contrib/epigraph/epigraph.pdf +++ b/macros/latex/contrib/epigraph/epigraph.pdf diff --git a/macros/latex/contrib/geometry-de/README b/macros/latex/contrib/geometry-de/README deleted file mode 100644 index 8ca697a7e3..0000000000 --- a/macros/latex/contrib/geometry-de/README +++ /dev/null @@ -1,53 +0,0 @@ -This package, geometry-de.dtx, is a modified version of the geometry package -in version 5.6 2010/09/12 -by Hideo Umeki. - -With the file you can create a documentation in german language but it's possible -to build all other geometry files. - -Files: - * README-DE - this file - * geometry.ins - for installation to get .sty from .dtx - * geometry-de.dtx - including sources and documentation - * geometry-de.pdf - print-ready german documentation - -Use - tex geometry-de.tex -to get the geometry.ins, the geometry-de.drv and the geometry.sty files. - -Use - latex geometry-de.dtx or - latex geometry-de.drv or - pdflatex geometry-de.dtx or - pdflatex geometry-de.drv -to create the german documentation. - -The geometry.sty is the same which is provided by the original .dtx file from -Hideo Ukmeki. - -How to install geometry: -Quoted from Hideo Umeki's README file. Little modifications by Hans-Martin Haase. -"Installation: -[manual installation] - * To get geometry.sty out of geometry.dtx - $ tex geometry-de.dtx - or $ (la)tex geometry.ins - * To build documentation - $ latex geometry-de.dtx - or $ latex geometry-de.drv - * Put the derived files in the proper directories: - - tex/latex/geometry/geometry.sty - - doc/latex/geometry/geometry-de.pdf - - source/latex/geometry/geometry-de.dtx - -[TeXLive] - * Use 'tlmgr' command - $ tlmgr show geometry -- to check the package info - $ sudo tlmgr update geometry -- to update the package - * You can use 'TeX Live Utility' instead of 'tlmgr', if on MacOSX. - -[MikTeX] - * Use the MikTeX Update Wizard to update geometry package." - - -The translation was create by Hans-Martin Haase.
\ No newline at end of file diff --git a/macros/latex/contrib/geometry-de/README-DE b/macros/latex/contrib/geometry-de/README-DE deleted file mode 100644 index 855c355eb6..0000000000 --- a/macros/latex/contrib/geometry-de/README-DE +++ /dev/null @@ -1,53 +0,0 @@ -Dieses Paket, geometry-de.dtx, ist eine geänderte Version des geometry Pakets -in Version 5.6 2010/09/12 -von Hideo Umeki. - -Mit der Datei können Sie eine deutsche Dokumentation erzeugen, es ist aber -auch möglich alle anderen geometry Dateien zu kompilieren. - -Dateien: - * README-DE - diese Datei - * geometry.ins - für die Installation, um die .sty Datei aus der .dtx zu erzeugen - * geometry-de.dtx - beinhaltet den Quelltext und die Dokumentation - * geometry-de.pdf - druckfertige deutsche Dokumentation - -Benutzen sie - tex geometry-de.tex -um die geometry.ins, die geometry-de.drv und die geometry.sty Dateien zu kompilieren. - -Benutzen sie - latex geometry-de.dtx oder - latex geometry-de.drv oder - pdflatex geometry-de.dtx oder - pdflatex geometry-de.drv -um die deutsche Dokumentation zu erzeugen. - -Die geometry.sty ist die gleiche, wie sie von der originalen .dtx Datei von -Hideo Ukmeki angeboten wird. - -Wie man geometry installiert: -Partielle Übersetzung der README Datei von Hideo Umeki -Installation: -[manuelle Installation] - * Um geometry.sty aus geometry.dtx zu bekommen - $ tex geometry-de.dtx - oder $ (la)tex geometry.ins - * Um die Dokumentation zu erzeugen - $ latex geometry-de.dtx - oder $ latex geometry-de.drv - * Platzieren sie die abgeleiteten Dateien in den folgenden Verzeichnissen: - - tex/latex/geometry/geometry.sty - - doc/latex/geometry/geometry-de.pdf - - source/latex/geometry/geometry-de.dtx - -[TeXLive] - * Benutzen sie das 'tlmgr' Kommando - $ tlmgr show geometry -- um die Paketinformationen zu prüfen - $ sudo tlmgr update geometry -- um das Paket zu aktualisieren - * Sie können das 'TeX Live Utility' anstelle von 'tlmgr' benutzen, wenn sie mit MacOSX arbeiten. - -[MikTeX] - * Benutzen sie den MikTeX Update Wizard, um das geometry Paket zu aktualisieren. - - -Die Übersetzung wurde von Hans-Martin Haase angefertigt.
\ No newline at end of file diff --git a/macros/latex/contrib/geometry-de/geometry-de.pdf b/macros/latex/contrib/geometry-de/geometry-de.pdf Binary files differdeleted file mode 100644 index 34a5e9c158..0000000000 --- a/macros/latex/contrib/geometry-de/geometry-de.pdf +++ /dev/null diff --git a/macros/latex/contrib/geometry-de/geometry.ins b/macros/latex/contrib/geometry-de/geometry.ins deleted file mode 100644 index 59633898f2..0000000000 --- a/macros/latex/contrib/geometry-de/geometry.ins +++ /dev/null @@ -1,81 +0,0 @@ -%% -%% This is file `geometry.ins', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% geometry-de.dtx (with options: `install') -%% -%% Copyright (C) 1996-2010 -%% by Hideo Umeki <latexgeometry@gmail.com> -%% -%% This work may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This work is "maintained" (as per the LPPL maintenance status) -%% by Hideo Umeki. -%% -%% This work consists of the files geometry.dtx and -%% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. -%% -\input docstrip.tex -\Msg{************************************************************************} -\Msg{* Installation} -\Msg{* Package: geometry 2010/09/12 v5.6 Page Geometry} -\Msg{************************************************************************} - -\keepsilent -\askforoverwritefalse -\preamble - -Copyright (C) 1996-2010 -by Hideo Umeki <latexgeometry@gmail.com> - -This work may be distributed and/or modified under the conditions of -the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX -version 2005/12/01 or later. - -This work is "maintained" (as per the LPPL maintenance status) -by Hideo Umeki. - -This work consists of the files geometry.dtx and -the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. - -\endpreamble - -\generate{% - \file{geometry.ins}{\from{geometry-de.dtx}{install}}% - \file{geometry-de.drv}{\from{geometry-de.dtx}{driver}}% - \usedir{tex/latex/geometry}% - \file{geometry.sty}{\from{geometry-de.dtx}{package}}% - \file{geometry.cfg}{\from{geometry-de.dtx}{config}}% - \file{geometry-samples-de.tex}{\from{geometry-de.dtx}{samples}}% -} - -\obeyspaces -\Msg{************************************************************************} -\Msg{*} -\Msg{* To finish the installation you have to move the following} -\Msg{* file into a directory searched by LaTeX:} -\Msg{*} -\Msg{* \space\space geometry.sty} -\Msg{*} -\Msg{* To produce the documentation run the file `geometry.drv'} -\Msg{* through LaTeX.} -\Msg{*} -\Msg{* Happy TeXing!} -\Msg{*} -\Msg{************************************************************************} -\endbatchfile -\endinput -%% -%% End of file `geometry.ins'. diff --git a/macros/latex/contrib/geometry/README.md b/macros/latex/contrib/geometry/README.md index ebdb25bf4d..1b88d80647 100644 --- a/macros/latex/contrib/geometry/README.md +++ b/macros/latex/contrib/geometry/README.md @@ -1,10 +1,10 @@ -LaTeX Package: Geometry 2010/09/12 v5.6 +LaTeX Package: Geometry 2020/01/02 v5.9 ---------------------------------------- Flexible and complete interface to document dimensions. Copyright (C) 1996-2010 by Hideo Umeki <latexgeometry@gmail.com> -Copyright (C) 2018 +Copyright (C) 2018-202 Hideo Umeki and David Carlisle https://github.com/davidcarlisle/geometry Abstract: @@ -18,6 +18,10 @@ CTAN: macros/latex/contrib/geometry Recent changes: +[Release 5.9] +Do not load ifxetex and ifpdf packages (use combined iftex package) +Include German translation of the documentation. + [Release 5.8] Add xdvipdfmx and dvipdfmx alias for dvipdfm option. @@ -28,9 +32,11 @@ Add support for luatex (with new comand names introduced in luatex 0.85) Files: * README.md - this file - * changes.txt - history of changes - * geometry.dtx - including sources and documentation - * geometry.pdf - print-ready documentation + * changes.txt - history of changes + * geometry.dtx - including sources and documentation + * geometry.pdf - print-ready documentation + * geometry-de.dtx - German translation + * geometry-de.pdf - German translation Installation: [manual installation] diff --git a/macros/latex/contrib/geometry/changes.txt b/macros/latex/contrib/geometry/changes.txt index c463344438..75efb2d6b2 100644 --- a/macros/latex/contrib/geometry/changes.txt +++ b/macros/latex/contrib/geometry/changes.txt @@ -1,3 +1,7 @@ +2020-01-02 Release 5.9 + * Include German translation (previously distributed as geometry-de on ctan) + * Use iftex versions of \ifxetex, \ifpdf + 2018-04-16 Release 5.8 * Documentation fixes. * (x)dvipdfmx alias for dvipdfm otion. diff --git a/macros/latex/contrib/geometry-de/geometry-de.dtx b/macros/latex/contrib/geometry/geometry-de.dtx index 2a69683ac1..56079df68e 100644 --- a/macros/latex/contrib/geometry-de/geometry-de.dtx +++ b/macros/latex/contrib/geometry/geometry-de.dtx @@ -1,6 +1,7 @@ % \iffalse meta-comment % % Copyright 1996-2010 by Hideo Umeki <latexgeometry@gmail.com> +% Copyright 2018 Hideo Umeki and David Carlisle % % LaTeX Package: Geometry % ----------------------- @@ -14,17 +15,19 @@ % version 2005/12/01 or later. % % This work is "maintained" (as per the LPPL maintenance status) -% by Hideo Umeki. +% by David Carlisle % % This work consists of the files geometry.dtx and % the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. % % * Distribution -% CTAN: macros/latex/contrib/geometry/README +% CTAN: macros/latex/contrib/geometry/README.md % CTAN: macros/latex/contrib/geometry/changes.txt % CTAN: macros/latex/contrib/geometry/geometry.ins % CTAN: macros/latex/contrib/geometry/geometry.dtx % CTAN: macros/latex/contrib/geometry/geometry.pdf +% CTAN: macros/latex/contrib/geometry/geometry-de.dtx +% CTAN: macros/latex/contrib/geometry/geometry-de.pdf % % * See README for installation. % @@ -39,12 +42,12 @@ %</ignore> %<package|driver>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{geometry} -%<package> [2010/09/12 v5.6 Page Geometry] +%<package> [2020/01/02 v5.9 Page Geometry] %<*install> \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: geometry 2010/09/12 v5.6 Page Geometry} +\Msg{* Package: geometry 2020/01/02 v5.9 Page Geometry} \Msg{************************************************************************} \keepsilent @@ -53,6 +56,8 @@ Copyright (C) 1996-2010 by Hideo Umeki <latexgeometry@gmail.com> +Copyright (C) 2018-2020 +by Hideo Umeki and David Carlisle https://github.com/davidcarlisle/geometry This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license @@ -63,7 +68,7 @@ and version 1.3c or later is part of all distributions of LaTeX version 2005/12/01 or later. This work is "maintained" (as per the LPPL maintenance status) -by Hideo Umeki. +by David Carlisle. This work consists of the files geometry.dtx and the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. @@ -71,11 +76,11 @@ the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. \endpreamble \generate{% - \file{geometry.ins}{\from{geometry-de.dtx}{install}}% + \file{geometry-de.ins}{\from{geometry-de.dtx}{install}}% \file{geometry-de.drv}{\from{geometry-de.dtx}{driver}}% \usedir{tex/latex/geometry}% - \file{geometry.sty}{\from{geometry-de.dtx}{package}}% - \file{geometry.cfg}{\from{geometry-de.dtx}{config}}% +% \file{geometry-de.sty}{\from{geometry-de.dtx}{package}}% +% \file{geometry-de.cfg}{\from{geometry-de.dtx}{config}}% \file{geometry-samples-de.tex}{\from{geometry-de.dtx}{samples}}% } @@ -120,29 +125,12 @@ the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. %</driver> % \fi % -% \CheckSum{2680} -% -% \CharacterTable -% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -% Digits \0\1\2\3\4\5\6\7\8\9 -% Exclamation \! Double quote \" Hash (number) \# -% Dollar \$ Percent \% Ampersand \& -% Acute accent \' Left paren \( Right paren \) -% Asterisk \* Plus \+ Comma \, -% Minus \- Point \. Solidus \/ -% Colon \: Semicolon \; Less than \< -% Equals \= Greater than \> Question mark \? -% Commercial at \@ Left bracket \[ Backslash \\ -% Right bracket \] Circumflex \^ Underscore \_ -% Grave accent \` Left brace \{ Vertical bar \| -% Right brace \} Tilde \~} % % \GetFileInfo{geometry.sty} % % \title{Das \textsf{geometry} Paket} % \date{\filedate\ \fileversion} -% \author{Hideo Umeki\\\texttt{latexgeometry@gmail.com}\\\begin{small}Die Übersetzung wurde angefertigt von Hans-Martin Haase +% \author{Hideo Umeki\\\url{https://github.com/davidcarlisle/geometry}\\\begin{small}Die Übersetzung wurde angefertigt von Hans-Martin Haase % (\texttt{hmhaase@pclinuxosusers.de})\end{small}} % % \MakeShortVerb{|} @@ -1138,7 +1126,7 @@ the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. % % \subsection{Treiber}\label{sec:drivers} % -% Dieses Paket unterstützt die Treiber |dvips|, |dvipdfm|, |pdftex|, |xetex| und +% Dieses Paket unterstützt die Treiber |dvips|, |dvipdfm|, |pdftex|, |luatex|, |xetex| und % |vtex|. Sie können auch |dvipdfm| für \textsf{dvipdfmx} einstellen und % \textsf{xdvipdfmx}. |pdftex| für \textsf{pdflatex}, und |vtex| für die % V\TeX{} Umgebung. @@ -1804,12 +1792,10 @@ the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. %<*package> % \end{macrocode} % This package requires the following packages: -% \textsf{keyval}, \textsf{ifpdf}, \textsf{ifvtex} and \textsf{ifxetex}. +% \textsf{keyval}, \textsf{ifvtex}. % \begin{macrocode} \RequirePackage{keyval}% -\RequirePackage{ifpdf}% \RequirePackage{ifvtex}% -\RequirePackage{ifxetex}% % \end{macrocode} % % Internal switches are declared here. @@ -1926,6 +1912,7 @@ the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. % \begin{macro}{\Gm@dvips}% % \begin{macro}{\Gm@dvipdfm}% % \begin{macro}{\Gm@pdftex}% +% \begin{macro}{\Gm@luatex}% % \begin{macro}{\Gm@xetex}% % \begin{macro}{\Gm@vtex}% % The driver names. @@ -1933,10 +1920,11 @@ the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. \def\Gm@dvips{dvips}% \def\Gm@dvipdfm{dvipdfm}% \def\Gm@pdftex{pdftex}% +\def\Gm@luatex{luatex}% \def\Gm@xetex{xetex}% \def\Gm@vtex{vtex}% % \end{macrocode} -% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro} +% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro} % \begin{macro}{\Gm@true}% % \begin{macro}{\Gm@false}% % The macros for |true| and |false|. @@ -2897,25 +2885,32 @@ the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. % \end{macrocode} % \end{key} % \begin{key}{Gm}{dvips} -% \begin{key}{Gm}{dvipdfm} +% \begin{key}{Gm}{dvipdfm}\begin{key}{Gm}{dvipdfmx}\begin{key}{Gm}{xdvipdfmx} % \begin{key}{Gm}{pdftex} +% \begin{key}{Gm}{luatex} % \begin{key}{Gm}{xetex} % \begin{key}{Gm}{vtex} % The \Gm\ package supports |dvips|, |dvipdfm|, -% |pdflatex| and |vtex|. |dvipdfm| works like |dvips|. +% |pdflatex|, |luatex| and |vtex|. |dvipdfm| works like |dvips|. % \begin{macrocode} \define@key{Gm}{dvips}[true]{\ifGm@preamble{dvips}{% \Gm@doifelse{dvips}{#1}{\Gm@setdriver{dvips}}{\Gm@unsetdriver{dvips}}}}% \define@key{Gm}{dvipdfm}[true]{\ifGm@preamble{dvipdfm}{% \Gm@doifelse{dvipdfm}{#1}{\Gm@setdriver{dvipdfm}}{\Gm@unsetdriver{dvipdfm}}}}% +\define@key{Gm}{dvipdfmx}[true]{\ifGm@preamble{dvipdfm}{% + \Gm@doifelse{dvipdfm}{#1}{\Gm@setdriver{dvipdfm}}{\Gm@unsetdriver{dvipdfm}}}}% +\define@key{Gm}{xdvipdfmx}[true]{\ifGm@preamble{dvipdfm}{% + \Gm@doifelse{dvipdfm}{#1}{\Gm@setdriver{dvipdfm}}{\Gm@unsetdriver{dvipdfm}}}}% \define@key{Gm}{pdftex}[true]{\ifGm@preamble{pdftex}{% \Gm@doifelse{pdftex}{#1}{\Gm@setdriver{pdftex}}{\Gm@unsetdriver{pdftex}}}}% +\define@key{Gm}{luatex}[true]{\ifGm@preamble{luatex}{% + \Gm@doifelse{luatex}{#1}{\Gm@setdriver{luatex}}{\Gm@unsetdriver{luatex}}}}% \define@key{Gm}{xetex}[true]{\ifGm@preamble{xetex}{% \Gm@doifelse{xetex}{#1}{\Gm@setdriver{xetex}}{\Gm@unsetdriver{xetex}}}}% \define@key{Gm}{vtex}[true]{\ifGm@preamble{vtex}{% \Gm@doifelse{vtex}{#1}{\Gm@setdriver{vtex}}{\Gm@unsetdriver{vtex}}}}% % \end{macrocode} -% \end{key}\end{key}\end{key}\end{key}\end{key} +% \end{key}\end{key}\end{key}\end{key}\end{key}\end{key}\end{key}\end{key} % \begin{key}{Gm}{verbose} % The verbose mode. % \begin{macrocode} @@ -3282,7 +3277,11 @@ the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. % \cs{ifpdf} is defined in \textsf{ifpdf} package in `oberdiek' bundle. % \begin{macrocode} \ifpdf - \Gm@setdriver{pdftex}% + \ifx\pdfextension\@undefined + \Gm@setdriver{pdftex}% + \else + \Gm@setdriver{luatex}% + \fi \else \Gm@setdriver{dvips}% \fi @@ -3610,6 +3609,28 @@ the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. \fi \fi % \end{macrocode} +% If |luatex| is set to |true|, pdf-commands are set properly. +% To avoid |luatex| magnification problem, \cs{horigin} and +% \cs{vorigin} are adjusted for \cs{mag}. +% \begin{macrocode} + \ifx\Gm@driver\Gm@luatex + \setlength\pagewidth{\Gm@pw}% + \setlength\pageheight{\Gm@ph}% + \ifnum\mag=\@m\else + \@tempdima=\mag sp + \edef\Gm@horigin{\pdfvariable horigin}% + \edef\Gm@vorigin{\pdfvariable vorigin}% + \divide\Gm@horigin\@tempdima + \multiply\Gm@horigin\@m + \divide\Gm@vorigin\@tempdima + \multiply\Gm@vorigin\@m + \ifx\Gm@truedimen\Gm@true + \setlength\paperwidth{\Gm@pw}% + \setlength\paperheight{\Gm@ph}% + \fi + \fi + \fi +% \end{macrocode} % With V\TeX{} environment, V\TeX{} variables are set here. % \begin{macrocode} \ifx\Gm@driver\Gm@vtex diff --git a/macros/latex/contrib/geometry/geometry-de.pdf b/macros/latex/contrib/geometry/geometry-de.pdf Binary files differnew file mode 100644 index 0000000000..d3b6408dd2 --- /dev/null +++ b/macros/latex/contrib/geometry/geometry-de.pdf diff --git a/macros/latex/contrib/geometry/geometry-samples.tex b/macros/latex/contrib/geometry/geometry-samples.tex deleted file mode 100644 index 7425041e29..0000000000 --- a/macros/latex/contrib/geometry/geometry-samples.tex +++ /dev/null @@ -1,73 +0,0 @@ -%% -%% This is file `geometry-samples.tex', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% geometry.dtx (with options: `samples') -%% -%% Copyright (C) 1996-2010 -%% by Hideo Umeki <latexgeometry@gmail.com> -%% Copyright (C) 2018 -%% by Hideo Umeki and David Carlisle https://github.com/davidcarlisle/geometry -%% -%% This work may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This work is "maintained" (as per the LPPL maintenance status) -%% by David Carlisle. -%% -%% This work consists of the files geometry.dtx and -%% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. -%% -\documentclass[12pt]{article}% uses letterpaper by default -% \documentclass[12pt,a4paper]{article}% for A4 paper -%--------------------------------------------------------------- -% Edit and uncomment one of the settings below -%--------------------------------------------------------------- -% \usepackage{geometry} -% \usepackage[centering]{geometry} -% \usepackage[width=10cm,vscale=.7]{geometry} -% \usepackage[margin=1cm, papersize={12cm,19cm}, resetpaper]{geometry} -% \usepackage[margin=1cm,includeheadfoot]{geometry} -\usepackage[margin=1cm,includeheadfoot,includemp]{geometry} -% \usepackage[margin=1cm,bindingoffset=1cm,twoside]{geometry} -% \usepackage[hmarginratio=2:1, vmargin=2cm]{geometry} -% \usepackage[hscale=0.5,twoside]{geometry} -% \usepackage[hscale=0.5,asymmetric]{geometry} -% \usepackage[hscale=0.5,heightrounded]{geometry} -% \usepackage[left=1cm,right=4cm,top=2cm,includefoot]{geometry} -% \usepackage[lines=20,left=2cm,right=6cm,top=2cm,twoside]{geometry} -% \usepackage[width=15cm, marginparwidth=3cm, includemp]{geometry} -% \usepackage[hdivide={1cm,,2cm}, vdivide={3cm,8in,}, nohead]{geometry} -% \usepackage[headsep=20pt, head=40pt,foot=20pt,includeheadfoot]{geometry} -% \usepackage[text={6in,8in}, top=2cm, left=2cm]{geometry} -% \usepackage[centering,includemp,twoside,landscape]{geometry} -% \usepackage[mag=1414,margin=2cm]{geometry} -% \usepackage[mag=1414,margin=2truecm,truedimen]{geometry} -% \usepackage[a5paper, landscape, twocolumn, twoside, -% left=2cm, hmarginratio=2:1, includemp, marginparwidth=43pt, -% bottom=1cm, foot=.7cm, includefoot, textheight=11cm, heightrounded, -% columnsep=1cm,verbose]{geometry} -%--------------------------------------------------------------- -% No need to change below -%--------------------------------------------------------------- -\geometry{verbose,showframe}% the options appended. -\usepackage{lipsum}% for dummy text of 150 paragraphs -\newcommand\mynote{\marginpar[\raggedright -A sample margin note in the left side.]% -{\raggedright A sample margin note.}}% -\newcommand\myfootnote{\footnote{This is a sample footnote text.}} -\begin{document} -\lipsum[1-2]\mynote\lipsum[3-4]\mynote -\lipsum[5-11]\mynote\lipsum[12]\myfootnote -\lipsum[13-22]\mynote\lipsum[23-32] -\end{document} -\endinput -%% -%% End of file `geometry-samples.tex'. diff --git a/macros/latex/contrib/geometry/geometry.dtx b/macros/latex/contrib/geometry/geometry.dtx index 964b901888..aea76ff55b 100644 --- a/macros/latex/contrib/geometry/geometry.dtx +++ b/macros/latex/contrib/geometry/geometry.dtx @@ -26,6 +26,8 @@ % CTAN: macros/latex/contrib/geometry/geometry.ins % CTAN: macros/latex/contrib/geometry/geometry.dtx % CTAN: macros/latex/contrib/geometry/geometry.pdf +% CTAN: macros/latex/contrib/geometry/geometry-de.dtx +% CTAN: macros/latex/contrib/geometry/geometry-de.pdf % % * See README for installation. % @@ -40,12 +42,12 @@ %</ignore> %<package|driver>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{geometry} -%<package> [2018/04/16 v5.8 Page Geometry] +%<package> [2020/01/02 v5.9 Page Geometry] %<*install> \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: geometry 2018/04/16 v5.8 Page Geometry} +\Msg{* Package: geometry 2020/01/02 v5.9 Page Geometry} \Msg{************************************************************************} \keepsilent @@ -54,7 +56,7 @@ Copyright (C) 1996-2010 by Hideo Umeki <latexgeometry@gmail.com> -Copyright (C) 2018 +Copyright (C) 2018-2020 by Hideo Umeki and David Carlisle https://github.com/davidcarlisle/geometry This work may be distributed and/or modified under the conditions of @@ -125,7 +127,7 @@ the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. % % \title{The \textsf{geometry} package} % \date{\filedate\ \fileversion} -% \author{Hideo Umeki\\\texttt{latexgeometry@gmail.com}} +% \author{Hideo Umeki\\\url{https://github.com/davidcarlisle/geometry}} % % \MakeShortVerb{|} % @@ -1118,7 +1120,9 @@ the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. % % The package supports drivers |dvips|, |dvipdfm|, |pdftex|, |luatex|, % |xetex| and |vtex|. You can also set |dvipdfm| for \textsf{dvipdfmx} and -% \textsf{xdvipdfmx}. |pdftex| for \textsf{pdflatex}, and |vtex| for +% \textsf{xdvipdfmx} The options |dvipdfmx| and |xdvipdfmx| are also supported +% as aliases for the |dvipdfm| option. +% |pdftex| for \textsf{pdflatex}, and |vtex| for % V\TeX{} environment. % The driver options are exclusive. The driver can be set by either % |driver=|\meta{driver name} or any of the drivers directly like |pdftex|. @@ -1785,12 +1789,10 @@ the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. %<*package> % \end{macrocode} % This package requires the following packages: -% \textsf{keyval}, \textsf{ifpdf}, \textsf{ifvtex} and \textsf{ifxetex}. +% \textsf{keyval}, \textsf{ifvtex}. % \begin{macrocode} \RequirePackage{keyval}% -\RequirePackage{ifpdf}% \RequirePackage{ifvtex}% -\RequirePackage{ifxetex}% % \end{macrocode} % % Internal switches are declared here. @@ -3591,7 +3593,7 @@ the derived files: geometry.{sty,ins,drv}, geometry-samples.tex. \setlength\pdfpagewidth{\Gm@pw}% \setlength\pdfpageheight{\Gm@ph}}% \ifnum\mag=\@m\else - \@tempdima=\mag sp + \@tempdima=\mag sp% \@ifundefined{pdfhorigin}{}{% \divide\pdfhorigin\@tempdima \multiply\pdfhorigin\@m diff --git a/macros/latex/contrib/geometry/geometry.pdf b/macros/latex/contrib/geometry/geometry.pdf Binary files differindex 66f3c55c4e..8bb0d97210 100644 --- a/macros/latex/contrib/geometry/geometry.pdf +++ b/macros/latex/contrib/geometry/geometry.pdf diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf Binary files differindex a9c1b2a350..02b227ed0d 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.pdf +++ b/macros/latex/contrib/nicematrix/nicematrix-french.pdf diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex index 12d403c379..883a1acf69 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.tex +++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex @@ -1,3 +1,4 @@ +% -*- coding: utf-8 ; -*- \documentclass[dvipsnames]{article}% dvipsnames is for xcolor (loaded by Tikz, loaded by nicematrix) \usepackage{xltxtra} \usepackage[french]{babel} @@ -1191,6 +1192,10 @@ $\begin{pNiceMatrix} \section{Les matrices par blocs} +Cette partie, qui introduit une commande |\Block|, n'a pas de rapport direct avec l'environnement +|{NiceMatrixBlock}| présenté dans la section précédente. + +\smallskip Dans les environnements de \pkg{nicematrix}, on peut utiliser la commande |\Block| pour placer un élément au centre d'un rectangle de cases fusionnées. @@ -1661,8 +1666,10 @@ obsolètes : \end{itemize} \medskip -Une message est affiché dans le fichier |log| à chaque fois que l'un d'entre eux est utilisé. Néanmoins, il faut -avoir conscience que ces environnements seront sans doute supprimés dans une version future de \pkg{nicematrix}. +Depuis la version 3.8 de \pkg{nicematrix}, une erreur est levée dès qu'un de ces environnements est utilisé. +Néanmoins, pour le moment, il reste possible de les utiliser si on charge l'extension \pkg{nicematrix} avec +l'option |obsolete-environments|. Il faut toutefois avoir conscience que ces environnements seront sans doute +supprimés dans une version future de \pkg{nicematrix}. diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx index 5aa6211092..3b0f3fcad4 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.dtx +++ b/macros/latex/contrib/nicematrix/nicematrix.dtx @@ -15,8 +15,8 @@ % % \fi % \iffalse -\def\myfileversion{3.7} -\def\myfiledate{2019/11/11} +\def\myfileversion{3.8} +\def\myfiledate{2020/01/02} % % %<*batchfile> @@ -1240,6 +1240,9 @@ c & c & b & a & e % % \section{Block matrices} % +% This section has no direct link with the previous one where an environment +% |{NiceMatrixBlock}| was introduced. +% % In the environments of \pkg{nicematrix}, it's possible to use the command % |\Block| in order to place an element in the center of a rectangle of merged % cells of the array. @@ -1364,7 +1367,7 @@ c & c & b & a & e % In the cells of the array, it's possible to use the LaTeX counters |iRow| and % |jCol| which represent the number of the current row and the number of the % current col\footnote{We recall that the first row (if it exists) has the -% number~$0$ and that the first col (if it exists) has also the number~$0$).}. +% number~$0$ and that the first col (if it exists) has also the number~$0$.}. % Of course, the user must not change the value of these counters which are used % internally by \pkg{nicematrix}. % @@ -1740,7 +1743,12 @@ c & c & b & a & e % |{VNiceArrayRC}|. % \end{itemize} % -% They might be deleted in a future version of \pkg{nicematrix}. +% Since the version 3.8, an error is raised when one of these environments is +% used. It's still possible to use these environments by loading +% \pkg{nicematrix} with the option |obsolete-environments|. +% +% However, these environments will probably be completely deleted in future +% version of \pkg{nicematrix}. % % \section{Examples} % @@ -2401,9 +2409,7 @@ c & c & b & a & e % |expl3| code fails.\footnote{cf. % |tex.stackexchange.com/questions/57424/using-of-usetikzlibrary-in-an-expl3-package-fails|} % -% \begin{macrocode} -%<@@=nm> -% \end{macrocode} +%<@@=nicematrix> % % \begin{macrocode} \RequirePackage{tikz} @@ -2970,13 +2976,9 @@ c & c & b & a & e \keys_define:nn { NiceMatrix / Global } { code-for-first-col .tl_set:N = \l_@@_code_for_first_col_tl , - code-for-first-col .value_required:n = true , code-for-last-col .tl_set:N = \l_@@_code_for_last_col_tl , - code-for-last-col .value_required:n = true , code-for-first-row .tl_set:N = \l_@@_code_for_first_row_tl , - code-for-first-row .value_required:n = true , code-for-last-row .tl_set:N = \l_@@_code_for_last_row_tl , - code-for-last-row .value_required:n = true , small .bool_set:N = \l_@@_small_bool , hlines .bool_set:N = \l_@@_hlines_bool , parallelize-diags .bool_set:N = \l_@@_parallelize_diags_bool , @@ -2988,7 +2990,7 @@ c & c & b & a & e % |\Vdots| and |\Ddots|. % \begin{macrocode} renew-dots .bool_set:N = \l_@@_renew_dots_bool , - renew-dots .value_forbidden:n = true , + nullify-dots .bool_set:N = \l_@@_nullify_dots_bool , % \end{macrocode} % @@ -3009,6 +3011,20 @@ c & c & b & a & e extra-right-margin .dim_set:N = \l_@@_extra_right_margin_dim , extra-margin .meta:n = { extra-left-margin = #1 , extra-right-margin = #1 } , +% \end{macrocode} +% The following lines are the properties |.value_required:n| and +% |.value_forbidden:n| or the keys. These properties have no effect because they +% are not transmitted by inheritance (unfortunately). We maintain these lines in +% the \textsc{dtx} only for the case of a modification of |l3keys|. +% +% \begin{macrocode} +%<*comment> + code-for-first-col .value_required:n = true , + code-for-last-col .value_required:n = true , + code-for-first-row .value_required:n = true , + code-for-last-row .value_required:n = true , + renew-dots .value_forbidden:n = true , +%</comment> } % \end{macrocode} % @@ -3022,7 +3038,6 @@ c & c & b & a & e \str_if_eq:nnTF { #1 } { auto } { \bool_set_true:N \l_@@_auto_columns_width_bool } { \dim_set:Nn \l_@@_columns_width_dim { #1 } } , - columns-width .value_required:n = true , name .code:n = \unless \ifmeasuring@ \str_set:Nn \l_tmpa_str { #1 } @@ -3031,13 +3046,23 @@ c & c & b & a & e { \seq_gput_left:NV \g_@@_names_seq \l_tmpa_str } \str_set_eq:NN \l_@@_name_str \l_tmpa_str \fi , - name .value_required:n = true , code-after .tl_gset:N = \g_@@_code_after_tl , - code-after .value_required:n = true , first-col .code:n = \int_zero:N \l_@@_first_col_int , first-row .code:n = \int_zero:N \l_@@_first_row_int , last-row .int_set:N = \l_@@_last_row_int , last-row .default:n = -1 , +% \end{macrocode} +% The following lines are the properties |.value_required:n| and +% |.value_forbidden:n| or the keys. These properties have no effect because they +% are not transmitted by inheritance (unfortunately). We maintain these lines in +% the \textsc{dtx} only for the case of a modification of |l3keys|. +% +% \begin{macrocode} +%<*comment> + columns-width .value_required:n = true , + name .value_required:n = true , + code-after .value_required:n = true , +%</comment> } % \end{macrocode} % @@ -5124,10 +5149,7 @@ c & c & b & a & e { \begin { tikzpicture } [ remember~picture ] \tikz@parse@node \pgfutil@firstofone - ( - nm - \int_use:N \g_@@_env_int - col - - \int_use:N \c@jCol - ) + ( nm - \int_use:N \g_@@_env_int - col - \int_use:N \c@jCol ) \dim_gset:Nn \g_@@_x_final_dim \pgf@x \end { tikzpicture } } @@ -6477,13 +6499,12 @@ c & c & b & a & e % has no direct link with the environment |{NiceMatrixBlock}|. % % The following command will be linked to |\Block| in the environments of -% \pkg{nicematrix}. We define it with |\NewExpandableDocumentCommand| of -% \pkg{xparse} because it has an optionnal argument between |<| and |>| (for TeX -% instructions put before the math mode of the label) and because it must be -% expandable since it reduces (in the case of a block of only one row) to a -% command |\multicolumn|. +% \pkg{nicematrix}. We define it with |\NewDocumentCommand| of \pkg{xparse} +% because it has an optionnal argument between |<| and |>| (for TeX instructions +% put before the math mode of the label) +% % \begin{macrocode} -\NewExpandableDocumentCommand \@@_Block: { m D < > { } m } +\NewDocumentCommand \@@_Block: { m D < > { } m } { \@@_Block_i #1 \q_stop { #2 } { #3 } } % \end{macrocode} % @@ -6507,25 +6528,20 @@ c & c & b & a & e % \end{macrocode} % % \medskip -% In the case of a block of only one row, we use a |\multicolumn| and not the -% general technique because, in this case, we want the label perfectly aligned -% with the base line of that row of the array. +% In the case of a block of only one row, we create a special node of shape +% |coordinate| in order to remember the $y$-value of the baseline of the current +% row. % \begin{macrocode} - \int_compare:nNnTF { #1 } = 1 + \int_compare:nNnT { #1 } = 1 { - \multicolumn { #2 } { C } { \hbox:n { #3 $#4$ } } - \@@_gobble_ampersands:n { #2 - 1 } + \begin { tikzpicture } [ remember~picture , baseline ] + \coordinate + ( nm - \int_use:N \g_@@_env_int + - Block + - \int_use:N \c@iRow + - \int_use:N \c@jCol ) ; + \end { tikzpicture } } - { \@@_Block_iii:nnnn { #1 } { #2 } { #3 } { #4 } } - } -% \end{macrocode} -% -% \medskip -% The command |\@@_Block_iii:nnnn| is for the case of a block of $n$~rows with -% $n>1$. -% \begin{macrocode} -\cs_new_protected:Npn \@@_Block_iii:nnnn #1 #2 #3 #4 - { \bool_gset_true:N \g_@@_extra_nodes_bool % \end{macrocode} % We write an instruction in the |code-after|. We write the instruction in the @@ -6536,7 +6552,7 @@ c & c & b & a & e % \begin{macrocode} \tl_gput_left:Nx \g_@@_code_after_tl { - \@@_Block_iv:nnnnn + \@@_Block_iii:nnnnn { \int_use:N \c@iRow } { \int_use:N \c@jCol } { \int_eval:n { \c@iRow + #1 - 1 } } @@ -6546,31 +6562,12 @@ c & c & b & a & e } % \end{macrocode} % -% \medskip -% The command |\@@_gobble_ampersands:n| will gobble $n$ ampersands (and also the -% spaces) where $n$ is the argument of the command. This command is fully -% expandable and we need this feature. -% \begin{macrocode} -\group_begin: - \char_set_catcode_letter:N \& - \cs_new:Npn \@@_gobble_ampersands:n #1 - { - \int_compare:nNnT { #1 } > 0 - { - \peek_charcode_remove_ignore_spaces:NT & - { \@@_gobble_ampersands:n { #1 - 1 } } - } - } -\group_end: -% \end{macrocode} -% +% % % \medskip % The following command |\@@_Block_iii:nnnnn| will be used in the |code-after|. -% It's necessary to create two Tikz nodes because we want the label |#5| really -% drawn in the \emph{center} of the node. % \begin{macrocode} -\cs_new_protected:Npn \@@_Block_iv:nnnnn #1 #2 #3 #4 #5 +\cs_new_protected:Npn \@@_Block_iii:nnnnn #1 #2 #3 #4 #5 { \bool_if:nTF { @@ -6579,23 +6576,59 @@ c & c & b & a & e } { \msg_error:nnnn { nicematrix } { Block~too~large } { #1 } { #2 } } { - \begin{tikzpicture} - \node - [ - fit = ( #1 - #2 - medium . north~west ) - ( #3 - #4 - medium . south~east ) , - inner~sep = 0 pt , - ] +% \end{macrocode} +% If the block has only one row, we have to do a special work in order to have +% the contains of the node aligned with the contents of the other rows of the array. +% +% \begin{macrocode} + \int_compare:nNnTF { #1 } = { #3 } + { + \begin { tikzpicture } +% \end{macrocode} +% First, we compute in |\l_tmpa_dim| the $y$-value of the baseline of the row. +% We have constructed a special node of shape |coordinate| in this order. +% \begin{macrocode} + \tikz@parse@node \pgfutil@firstofone (Block-#1-#2) + \dim_set:Nn \l_tmpa_dim \pgf@y + \node + [ + fit = ( #1 - #2 - medium . north~west ) + ( #3 - #4 - medium . south~east ) , + inner~sep = 0 pt , + ] + (#1-#2) { } ; +% \end{macrocode} +% With the following instruction, we retrieve the $x$-value and the $y$-value of +% the center of the block. We will only use the $x$-value, available in |\pgf@x|. +% \begin{macrocode} + \tikz@parse@node \pgfutil@firstofone (#1-#2) + \path (\pgf@x,\l_tmpa_dim) node [ anchor = base ] { #5 } ; + \end { tikzpicture } + } +% \end{macrocode} +% If the number of rows is different of $1$, it's necessary to create two Tikz +% nodes because we want the label |#5| really drawn in the \emph{center} of the node. +% \begin{macrocode} + { + \begin { tikzpicture } + \node + [ + fit = ( #1 - #2 - medium . north~west ) + ( #3 - #4 - medium . south~east ) , + inner~sep = 0 pt , + ] % \end{macrocode} % We don't forget the name of the node because the user may wish to use it. % \begin{macrocode} - (#1-#2) { } ; - \node at (#1-#2.center) { #5 } ; - \end{tikzpicture} + (#1-#2) { } ; + \node at (#1-#2.center) { #5 } ; + \end { tikzpicture } + } } } % \end{macrocode} % +% % \subsection{How to draw the dotted lines transparently} % \begin{macrocode} \cs_set_protected:Npn \@@_renew_matrix: @@ -6678,7 +6711,7 @@ c & c & b & a & e \AutoNiceMatrixWithDelims { #2 } { #3 } } } -% \end{document} +% \end{macrocode} % \begin{macrocode} \@@_define_com:nnn p ( ) \@@_define_com:nnn b [ ] @@ -6708,6 +6741,8 @@ c & c & b & a & e renew-matrix .value_forbidden:n = true , transparent .meta:n = { renew-dots , renew-matrix } , transparent .value_forbidden:n = true, + obsolete-environments .code:n = + \@@_msg_redirect_name:nn { Obsolete~environment } { none } } \ProcessKeysOptions { NiceMatrix / Package } % \end{macrocode} @@ -6973,15 +7008,17 @@ c & c & b & a & e % \begin{macrocode} \@@_msg_new:nn { Obsolete~environment } { - The~environment~\{\@currenvir\}~is~obsolete~and~will~be~deleted~in~future~version.~ - We~should~use~#1~instead. + The~environment~\{\@currenvir\}~is~obsolete.~We~should~use~#1~instead.~ + However,~you~can~go~on~for~this~time.~ + If~you~don't~want~to~see~this~error~again,~you~should~load~'nicematrix'~ + with~the~option~'obsolete-environments'. } % \end{macrocode} % % \begin{macrocode} \NewDocumentEnvironment { pNiceArrayC } { } { - \msg_info:nnn { nicematrix } { Obsolete~environment } + \@@_error:nn { Obsolete~environment } { the~option~'last-col' } \int_set:Nn \l_@@_last_col_int \c_zero_dim \pNiceArray @@ -6992,7 +7029,7 @@ c & c & b & a & e % \begin{macrocode} \NewDocumentEnvironment { bNiceArrayC } { } { - \msg_info:nnn { nicematrix } { Obsolete~environment } + \@@_error:nn { Obsolete~environment } { the~option~'last-col' } \int_set:Nn \l_@@_last_col_int \c_zero_dim \bNiceArray @@ -7003,7 +7040,7 @@ c & c & b & a & e % \begin{macrocode} \NewDocumentEnvironment { BNiceArrayC } { } { - \msg_info:nnn { nicematrix } { Obsolete~environment } + \@@_error:nn { Obsolete~environment } { the~option~'last-col' } \int_set:Nn \l_@@_last_col_int \c_zero_dim \BNiceArray @@ -7014,7 +7051,7 @@ c & c & b & a & e % \begin{macrocode} \NewDocumentEnvironment { vNiceArrayC } { } { - \msg_info:nnn { nicematrix } { Obsolete~environment } + \@@_error:nn { Obsolete~environment } { the~option~'last-col' } \int_set:Nn \l_@@_last_col_int \c_zero_dim \vNiceArray @@ -7025,7 +7062,7 @@ c & c & b & a & e % \begin{macrocode} \NewDocumentEnvironment { VNiceArrayC } { } { - \msg_info:nnn { nicematrix } { Obsolete~environment } + \@@_error:nn { Obsolete~environment } { the~option~'last-col' } \int_set:Nn \l_@@_last_col_int \c_zero_dim \VNiceArray @@ -7036,7 +7073,7 @@ c & c & b & a & e % \begin{macrocode} \NewDocumentEnvironment { pNiceArrayRC } { } { - \msg_info:nnn { nicematrix } { Obsolete~environment } + \@@_error:nn { Obsolete~environment } { the~options~'last-col'~and~'first-row' } \int_set:Nn \l_@@_last_col_int \c_zero_dim \int_set:Nn \l_@@_first_row_int \c_zero_int @@ -7048,7 +7085,7 @@ c & c & b & a & e % \begin{macrocode} \NewDocumentEnvironment { bNiceArrayRC } { } { - \msg_info:nnn { nicematrix } { Obsolete~environment } + \@@_error:nn { Obsolete~environment } { the~options~'last-col'~and~'first-row' } \int_set:Nn \l_@@_last_col_int \c_zero_dim \int_set:Nn \l_@@_first_row_int \c_zero_int @@ -7060,7 +7097,7 @@ c & c & b & a & e % \begin{macrocode} \NewDocumentEnvironment { BNiceArrayRC } { } { - \msg_info:nnn { nicematrix } { Obsolete~environment } + \@@_error:nn { Obsolete~environment } { the~options~'last-col'~and~'first-row' } \int_set:Nn \l_@@_last_col_int \c_zero_dim \int_set:Nn \l_@@_first_row_int \c_zero_int @@ -7072,7 +7109,7 @@ c & c & b & a & e % \begin{macrocode} \NewDocumentEnvironment { vNiceArrayRC } { } { - \msg_info:nnn { nicematrix } { Obsolete~environment } + \@@_error:nn { Obsolete~environment } { the~options~'last-col'~and~'first-row' } \bool_set_true:N \l_@@_last_col_bool \int_set:Nn \l_@@_first_row_int \c_zero_int @@ -7084,7 +7121,7 @@ c & c & b & a & e % \begin{macrocode} \NewDocumentEnvironment { VNiceArrayRC } { } { - \msg_info:nnn { nicematrix } { Obsolete~environment } + \@@_error:nn { Obsolete~environment } { the~options~'last-col'~and~'first-row' } \int_set:Nn \l_@@_last_col_int \c_zero_dim \int_set:Nn \l_@@_first_row_int \c_zero_int @@ -7096,7 +7133,7 @@ c & c & b & a & e % \begin{macrocode} \NewDocumentEnvironment { NiceArrayCwithDelims } { } { - \msg_info:nnn { nicematrix } { Obsolete~environment } + \@@_error:nn { Obsolete~environment } { the~option~'last-col' } \int_set:Nn \l_@@_last_col_int \c_zero_dim \NiceArrayWithDelims @@ -7107,7 +7144,7 @@ c & c & b & a & e % \begin{macrocode} \NewDocumentEnvironment { NiceArrayRCwithDelims } { } { - \msg_info:nnn { nicematrix } { Obsolete~environment } + \@@_error:nn { Obsolete~environment } { the~options~'last-col'~and~'first-row' } \int_set:Nn \l_@@_last_col_int \c_zero_dim \int_set:Nn \l_@@_first_row_int \c_zero_int @@ -7324,7 +7361,18 @@ c & c & b & a & e % codes: |code-for-first-col|, |code-for-last-col|, |code-for-first-row| and % |code-for-last-row|. % -% New command |\pAutoNiceMatrix| and its variants (suggestion of Christophe Bal). +% New command |\pAutoNiceMatrix| and its variants (suggestion of Christophe +% Bal). +% +% \subsection*{Changes between version 3.7 and 3.8} +% +% New programmation for the command |\Block| when the block has only one row. +% With this programmation, the vertical rules drawn by the specifier +% ``\verb+|+'' at the end of the block is actually drawn. In previous versions, +% they were not because the block of one row was constructed with +% |\multicolumn|. +% +% An error is raised when an obsolete environment is used. % % \PrintIndex % diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf Binary files differindex f8b8f28703..da9bd49dc6 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.pdf +++ b/macros/latex/contrib/nicematrix/nicematrix.pdf diff --git a/macros/latex/contrib/schwalbe-chess/README b/macros/latex/contrib/schwalbe-chess/README index 0d726ff1d8..e4bd960505 100644 --- a/macros/latex/contrib/schwalbe-chess/README +++ b/macros/latex/contrib/schwalbe-chess/README @@ -1,5 +1,5 @@ schwalbe --- A package for typesetting chessproblems -Version v2.3 / Stefan Hoening 2012-2018 +Version v2.7 / Stefan Hoening 2012-2018 CONTENTS diff --git a/macros/latex/contrib/schwalbe-chess/schwalbe.dtx b/macros/latex/contrib/schwalbe-chess/schwalbe.dtx index eda9fc3fc9..0850bb8e04 100644 --- a/macros/latex/contrib/schwalbe-chess/schwalbe.dtx +++ b/macros/latex/contrib/schwalbe-chess/schwalbe.dtx @@ -13,9 +13,9 @@ %% %% % \fi -% \def\fileversion{v2.3} -% \def\docdate{2018/12/20} -% \CheckSum{2056} +% \def\fileversion{v2.7} +% \def\docdate{2019/12/28} +% \CheckSum{2122} % \changes{v1.1}{03 June 2011}{Reflecting change in command % @writename inside diagram.sty} % \changes{v1.2}{01 July 2011}{Added parameter for Band to Heft @@ -46,6 +46,12 @@ % avoid problems when including further packages inside 'schwalbe.tex'.\\ % Added Abteilung commands in Urdrucke- und Loesungen-environments.} % \changes{v2.3}{18 December 2018}{Added commands Loeser and LoeserListe to collect abbreviations of solvernames in different sections of Loesungen} +% \changes{v2.4}{21 September 2019}{Changed parameter <monat> in Heft command to be numeric.\\ +% Added command LoesungenBis to calculate the month to send solutions.} +% \changes{v2.5}{29 September 2019}{Changed Loesungen environment to calculate issue month and year of solutions from +% values given in Heft command.} +% \changes{v2.6}{16 October 2019}{Moved do@dia@job redefinition to schwalbe.cls.} +% \changes{v2.7}{28 December 2019}{Used new begin/end diagram hook command to deactivate/activate solslash before/after diagrams.} % % \DoNotIndex{\@arabic,\def,\@idxitem,\@ifnextchar,\@ifstar, % \@ne,\@ptsize,\ ,\advance,\AtEndOfPackage,\begin,\begingroup, @@ -97,16 +103,16 @@ % \begin{enumerate} % \item der Band, zu dem das Heft geh"ort % \item die Nummer des Heftes -% \item der Monat des Erscheinens +% \item der Monat des Erscheinens als Zahl % \item das Jahr des Erscheinens % \item die Seitennummer der ersten Seite des Heftes % \end{enumerate} % -% Das August Heft 2011, das die fortlaufende Nummer 250 hat und mit -% der Seitenummmer 177 beginnt wird demzufolge folgendermassen +% Das Dezember Heft 2019, das die fortlaufende Nummer 299 hat und mit +% der Seitenummmer 361 beginnt wird demzufolge folgendermassen % eingeleitet: % -% \verb+\Heft{XXX}{250}{August}{2011}{177}+ +% \verb+\Heft{XXXIV}{299}{12}{2019}{361}+ % % \DescribeEnv{Editorial} % Die \verb+Editorial+ Umgebung ben"otigt einen Parameter, der @@ -198,9 +204,10 @@ % \verb+retroart+ erläutert. % % \DescribeEnv{Loesungen} -% Die Umgebung \verb+Loesungen+, innerhalb der die -% L"osungsbesprechungen beschrieben werden, ben"otigt 2 -% Parameter: +% Von der \verb+Loesungen+ Umgebung, gibt es eine *-Form, die sonst keine weiteren Parameter erwartet. +% Heftnummer, Monat und Jahr der Lösung werden in diesem Fall automatisch aus +% den Angaben des aktuellen Hefts ermittelt (3 Hefte bzw. 6 Monate zurück). +% Ohne * benötigt die Umgebung \verb+Loesungen+ 2 Parameter: % \begin{enumerate} % \item die Nummer des Hefts mit den Urdrucken % \item Monat und Jahr dieses Hefts @@ -424,9 +431,9 @@ % \begin{macrocode} %<*class> \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{schwalbe}[2017/01/31] +\ProvidesClass{schwalbe}[2019/12/28] \LoadClass[11pt,a4paper]{article} -\RequirePackage[12pt]{schwalbe} +\RequirePackage[12pt]{schwalbe}[2019/12/28] \RequirePackage[T2A,T1]{fontenc}% fsRUS 140121 \RequirePackage[koi8-r,utf8]{inputenc}% fsRUS 140121 \RequirePackage[russian,german,english,ngerman]{babel} @@ -531,23 +538,37 @@ } % \end{macrocode} % +% Im Titel sowie bei den Urdrucken und L"osungen werden die Namen der Monate benötigt. +% +% \begin{macrocode} +\newcommand{\sw@monat}[1]{% +\ifcase#1\relax% +\or Januar\or Februar\or M\"arz\or April\or Mai\or Juni\or Juli\or August\or September\or Oktober\or November\or Dezember\fi% +}% +% \end{macrocode} +% % Der Befehl \verb+\Heft+ leitet jedes Heft ein. Damit werden % Band, Heftnummer, Monat, Jahr und erste Seitennummer des Heftes % spezifiziert. % \begin{macrocode} +\newcounter{sw@issue}% +\newcounter{sw@month}% +\newcounter{sw@year}% \newcommand{\Heft}[5]{% \def\heft@band{#1}% - \def\heft@nr{#2}% - \def\heft@monat{#3}% - \def\heft@year{#4}% + \setcounter{sw@issue}{#2}% + \setcounter{sw@month}{#3}% + \setcounter{sw@year}{#4}% \setcounter{page}{#5}% \hbox to \textwidth{\vbox to 60mm{\vfill}\hfill}% \hbox to \textwidth{% - {\large\bfseries HEFT~#2}% + {\large\bfseries% + HEFT~#2% \hfill% - {\large\bfseries BAND #1}% + BAND #1% \hfill% - {\large\bfseries #3~#4}% + \sw@monat{\value{sw@month}}~#4% + }% }% \vskip2mm% \hrule width \textwidth height 1\p@% @@ -728,6 +749,28 @@ }{} % \end{macrocode} % +% Das Kommando \verb+\LoesungenBis+ gibt den Monat (und ggfs. das Jahr) aus, bis zu dem Lösungen einzusenden sind. +% +% \begin{macrocode} +\newcounter{sw@loesungen@bis@monat} +\newcounter{sw@loesungen@bis@jahr} +% +\newcommand{\LoesungenBis}{% + \setcounter{sw@loesungen@bis@monat}{\value{sw@month}}% + \setcounter{sw@loesungen@bis@jahr}{\value{sw@year}}% + \addtocounter{sw@loesungen@bis@monat}{3}% + \ifthenelse{\value{sw@loesungen@bis@monat} > 12}% + {% + \addtocounter{sw@loesungen@bis@monat}{-12}% + \addtocounter{sw@loesungen@bis@jahr}{1}% + \sw@monat{\value{sw@loesungen@bis@monat}}\ \arabic{sw@loesungen@bis@jahr}% + }% + {% + \sw@monat{\value{sw@loesungen@bis@monat}}% + }% +}% +% \end{macrocode} +% % Innerhalb der Umgebung \verb+Urdrucke+ werden % die Diagramme immer zu dritt nebeneinander gesetzt - % sofern dies pa"st. Au"serdem werden von jedem Diagramm @@ -784,7 +827,12 @@ }{} % \end{macrocode} % -% Die Umgebung f"ur L"osungen ben"otigt 2 Parameter: +% Von der Umbgebung für Lösungen gibt es 2 Varianten: +% \begin{itemize} +% \item gefolgt von einem Stern werden Heft, Monat und Jahr automatisch gesetzt. +% \item ohne Stern werden 2 Parameter benötigt: +% \end{itemize} +% % \begin{enumerate} % \item die Nummer des Heftes mit den Urdrucken % \item Monat und Jahr @@ -803,8 +851,8 @@ \newcommand{\@sw@lsg@abteilung}[4]{% \textbf{#1 Nr. #2-#3} (Bearbeiter = #4)% } -\newenvironment{Loesungen}[2]{% - \begingroup% +\newcommand{\sw@loesungen}[2]{% + \begingroup% \ttitel@skip% \centerline{\Large\bfseries L\"osungen der Urdrucke aus Heft #1, #2}% \titel@skip% @@ -820,8 +868,8 @@ \edef\@tempa{ \write\sw@contents{% \@nearverbatim\@tempb{% - {\@nearverbatim\@tempc}% - {\@nearverbatim\@tempd}% + {\@tempc}% + {\@tempd}% {\@nearverbatim\pageref{inhalt\@nameuse{the@inhalt}}}% }% }% @@ -829,6 +877,26 @@ \expandafter\egroup\@tempa% \parskip.5ex plus 2ex% \catcode`/=\active% +} +\newcounter{sw@loesungen@aus@heft} +\newcounter{sw@loesungen@aus@monat} +\newcounter{sw@loesungen@aus@jahr} +\newcommand{\sw@loesungen@star}{% + \setcounter{sw@loesungen@aus@heft}{\value{sw@issue}}% + \addtocounter{sw@loesungen@aus@heft}{-3}% + \setcounter{sw@loesungen@aus@jahr}{\value{sw@year}}% + \setcounter{sw@loesungen@aus@monat}{\value{sw@month}}% + \addtocounter{sw@loesungen@aus@monat}{-6}% + \ifthenelse{\value{sw@loesungen@aus@monat} < 1}% + {% + \addtocounter{sw@loesungen@aus@monat}{12}% + \addtocounter{sw@loesungen@aus@jahr}{-1}% + }{}% + \sw@loesungen{\arabic{sw@loesungen@aus@heft}}{\sw@monat{\value{sw@loesungen@aus@monat}} \arabic{sw@loesungen@aus@jahr}}% +} + +\newenvironment{Loesungen}{% + \@ifstar{\sw@loesungen@star}{\sw@loesungen}% }{% \catcode`/=12% \endgroup% @@ -941,7 +1009,7 @@ } % \end{macrocode} % -% Die folgenden werden benutzt im Titel zu setzen und ggfs\@. entsprechende +% Die folgenden werden benutzt um Titel zu setzen und ggfs\@. entsprechende % \verb+\label+ zu registrieren. % \begin{macrocode} \let\titel@ext\relax @@ -1598,6 +1666,11 @@ \expandafter\l@@klist\the\aut@tk; \e@list% \egroup% } +% Wenn das Diagramm ausgegeben wird, sollen auch die Informationen ausgegeben werden. +\def\do@dia@job{% + \@write@sol\ifvmode\noindent\fi\unhbox\dia@box% + \sw@problem% +} % Schreiben eines einzelnen Autors in das Inhaltsverzeichnis % \def\sw@problemAuthor#1; {% @@ -1746,12 +1819,13 @@ % Zeichen / aktiviert. % \begin{macrocode} \def\sol@slash{\nobreak\hskip\z@ plus 2\p@\char`/\hskip\z@ plus 2\p@\discretionary{}{}{}} -% \catcode`/=\active\relax\let/\sol@slash\relax\catcode`/=12% -% \def\bsol{\catcode`/=\active\relax} \def\esol{\catcode`/=12\relax} \bsol +\renewcommand{\cpd@begindiagram@hook}{\esol} +\renewcommand{\cpd@enddiagram@hook}{\bsol} + \renewcommand{\section}{\@startsection{section}{1}{\z@}{2ex}{.5ex}{\normalfont\large\bfseries}} \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}{1ex}{.3ex}{\normalfont\bfseries}} @@ -1768,7 +1842,7 @@ % \begin{macrocode} %<*style> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{schwalbe}[2017/01/31] +\ProvidesPackage{schwalbe}[2019/12/28] % \end{macrocode} % % Der \textit{Schwalbe-Style} ist eine Erweiterung des @@ -1783,10 +1857,10 @@ % \end{macrocode} % % \begin{macrocode} -\RequirePackage{diagram} +\RequirePackage{diagram}[2019/12/28] % % -% Wir definieren das Diagrammlayout ein wenig um +% Wir definieren das Diagrammlayout ein wenig um. % \newcommand{\rb}[1]{\raisebox{0.4ex}{#1}} \nocomputer @@ -1814,11 +1888,6 @@ \diagramx% \setboardwidth% } - -\def\do@dia@job{% - \@write@sol\ifvmode\noindent\fi\unhbox\dia@box% - \sw@problem% -} % \end{macrocode} % % In der \Schwalbe{} setzen wir keine akademischen Titel. diff --git a/macros/latex/contrib/schwalbe-chess/schwalbe.pdf b/macros/latex/contrib/schwalbe-chess/schwalbe.pdf Binary files differindex 1cb49ee8ea..35cf6524fa 100644 --- a/macros/latex/contrib/schwalbe-chess/schwalbe.pdf +++ b/macros/latex/contrib/schwalbe-chess/schwalbe.pdf diff --git a/macros/latex/contrib/verifica/README b/macros/latex/contrib/verifica/README new file mode 100644 index 0000000000..08a900cd50 --- /dev/null +++ b/macros/latex/contrib/verifica/README @@ -0,0 +1,84 @@ +The verifica document class v1.0 2020/01/02 +--------------------------------------------------------------------- +Riccardo Dossena Email: riccardo.dossena@gmail.com +--------------------------------------------------------------------- +copyright 2020 by Riccardo Dossena + +This LaTeX document class is intended for teachers who must write +out the text of a test or an exam. It provides various environments +and commands to produce the typical exercises contained in this +type of document. It is mainly intended for Italian high school +teachers, as the style is probably more in line with Italian high +school tests. For this reason the documentation is mainly written +in Italian. + +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 2005/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Riccardo Dossena. + +This work consists of the files: + + README (this file) + verifica.dtx + verifica.ins + verifica.pdf + example1.tex + example1.pdf + example2.tex + example2.pdf + example3.tex + example3.pdf + example4.tex + example4.pdf + example5.tex + example5.pdf + verifica-template.tex + +and the derived files: + + verifica.cls + ver-doc.sty + +"ver-doc.sty" is meant only for the documentation of the verifica +document class. Support will not be guaranteed. + +To install the distribution: + +- run "latex verifica.ins" +- move "verifica.cls" to locations where LaTeX can find it + (see the TeX FAQ at https://texfaq.org/FAQ-inst-wlcf) +- you can test the document class by running + "pdflatex example1.tex" ... + "latex example1.tex" ... + "xelatex example1.tex" ... + (compile each of the five examples) + +To reproduce the complete documentation, run + +pdflatex verifica.dtx +makeindex -s gind verifica +pdflatex verifica.dtx +pdflatex verifica.dtx + +Additional Packages +------------------- +The verifica document class loads the following packages: +enumitem, graphicx, mathtools, amssymb, geometry, nccmath, multido, +setspace, multicol, gensymb, newunicodechar, textcomp, eurosym, +tabto, tabularx, lineno, bm, cmbright. +If the option "14pt" is set, it loads the extarticle class document. + +2020/01/02 +Riccardo Dossena +--------------------------------------------------------------------- +If you have any ideas, questions, suggestions, feedback or bugs to +report, please feel free to contact me. +--------------------------------------------------------------------- diff --git a/macros/latex/contrib/verifica/example1.pdf b/macros/latex/contrib/verifica/example1.pdf Binary files differnew file mode 100644 index 0000000000..245dd6aa59 --- /dev/null +++ b/macros/latex/contrib/verifica/example1.pdf diff --git a/macros/latex/contrib/verifica/example1.tex b/macros/latex/contrib/verifica/example1.tex new file mode 100644 index 0000000000..80e663c67b --- /dev/null +++ b/macros/latex/contrib/verifica/example1.tex @@ -0,0 +1,106 @@ +\documentclass{verifica} + +\usepackage[utf8]{inputenc} +\usepackage[italian]{babel} +\usepackage[T1]{fontenc} +\usepackage{lmodern} + +\begin{document} + +\tipologia{prova orale} +\disciplina{matematica} +\istituto{Liceo ``G. Novello'' -- Codogno} +\classe{5\tsa B} +\data{11 novembre 2019} +\tempo{60 minuti} + +\intestazione + +\begin{esercizi} + +\item La soluzione dell'equazione $x+1=0$ è: +\begin{test-orizz} + \item $1$; + \item $-1$; + \item $0$; + \item $+\infty$. +\end{test-orizz} +\punti{5} + +\item Quale fra le seguenti è la derivata di $3x^2$? \punti{5} +\begin{test-orizz-newline} +\item $3x$; +\item $3$; +\item $3x^2$; +\item $6x$. +\end{test-orizz-newline} + +\medskip + +{\setlength\columnsep{2.5cm} % lo spazio tra le colonne si può modificare +\begin{multicols}{2} +\item Indicate con $p$ e $q$ due generiche proposizioni, quattro delle + seguenti affermazioni sono tra loro logicamente equivalenti, mentre + una non lo è con le altre. Quale? +\begin{test} +\item $p$ implica $q$ +\item $q$ è condizione necessaria per $p$ +\item $p$ segue dal verificarsi di $q$ +\item $p$ solo se $q$ +\item $p$ è condizione sufficiente per~$q$\\ \punti{5} +\end{test} + +\columnbreak + +\item Quale delle seguenti frasi è equivalente a + +\emph{non è vero che Mario studia e ascolta la radio} + +\begin{test} +\item Mario studia e ascolta la radio +\item Mario studia o ascolta la radio +\item Mario non studia né ascolta la radio +\item Mario non studia o non ascolta la radio \punti{5} +\end{test} + +\end{multicols}} + +\item Vero o falso? \punti[per ognuna]{2} + +{\setlength\columnsep{1.3cm} % lo spazio tra le colonne si può modificare +\begin{multicols}{3} +\begin{enumerate}[a)] + \item $1+1=2$ \vf + \item $3+0=0$ \vf + \item $3\times 3=9$ \vf + \item $0:3=1$ \vf + \item $\lim_{x\to 2}x^2=4$ \vf + \item $\sum_{n=0}^{1}n^2=1$ \vf +\end{enumerate} +\end{multicols}} + +\item Enuncia il teorema di Weierstrass. \punti{8} + +\riga{2} + +\item \emph{Completa.} \doublespacing In un triangolo \dotword{rettangolo} + il quadrato costruito sull' \dotword{ipotenusa} è uguale alla + \dotword{somma} dei \dotword{quadrati} costruiti sui + \dotword{cateti}. \punti{20} \par\singlespacing + +\item Stabilisci se le seguenti affermazioni sono vere o + false. \punti[per ognuna]{10} + +\begin{enumerate}[a)] + \item \verofalso[.8]{Il coefficiente angolare di una retta si deve + \emph{sempre} indicare con la lettera $m$ e l'ordinata all'origine + \emph{sempre} con la lettera $q$.} + \item \verofalso[.8]{Se una funzione derivabile in un intervallo ha + derivata positiva, allora la funzione è crescente in tale intervallo.} +\end{enumerate} + +\end{esercizi} + +\totpunti[/10+2] + +\end{document} diff --git a/macros/latex/contrib/verifica/example2.pdf b/macros/latex/contrib/verifica/example2.pdf Binary files differnew file mode 100644 index 0000000000..96b31f56cb --- /dev/null +++ b/macros/latex/contrib/verifica/example2.pdf diff --git a/macros/latex/contrib/verifica/example2.tex b/macros/latex/contrib/verifica/example2.tex new file mode 100644 index 0000000000..4cad4f3de2 --- /dev/null +++ b/macros/latex/contrib/verifica/example2.tex @@ -0,0 +1,105 @@ +\documentclass[senzagrazie]{verifica} + +\usepackage[utf8]{inputenc} +\usepackage[italian]{babel} +\usepackage[T1]{fontenc} + +\begin{document} + +\tipologia{prova orale} +\disciplina{matematica} +\istituto{Liceo ``G. Novello'' -- Codogno} +\classe{5\tsa B} +\data{11 novembre 2019} +\tempo{60 minuti} + +\intestazione + +\begin{esercizi} + +\item La soluzione dell'equazione $x+1=0$ è: +\begin{test-orizz} + \item $1$; + \item $-1$; + \item $0$; + \item $+\infty$. +\end{test-orizz} +\punti{5} + +\item Quale fra le seguenti è la derivata di $3x^2$? \punti{5} +\begin{test-orizz-newline} +\item $3x$; +\item $3$; +\item $3x^2$; +\item $6x$. +\end{test-orizz-newline} + +\medskip + +{\setlength\columnsep{2.5cm} % lo spazio tra le colonne si può modificare +\begin{multicols}{2} +\item Indicate con $p$ e $q$ due generiche proposizioni, quattro delle + seguenti affermazioni sono tra loro logicamente equivalenti, mentre + una non lo è con le altre. Quale? +\begin{test} +\item $p$ implica $q$ +\item $q$ è condizione necessaria per $p$ +\item $p$ segue dal verificarsi di $q$ +\item $p$ solo se $q$ +\item $p$ è condizione sufficiente per~$q$\\ \punti{5} +\end{test} + +\columnbreak + +\item Quale delle seguenti frasi è equivalente a + +\emph{non è vero che Mario studia e ascolta la radio} + +\begin{test} +\item Mario studia e ascolta la radio +\item Mario studia o ascolta la radio +\item Mario non studia né ascolta la radio +\item Mario non studia o non ascolta la radio \punti{5} +\end{test} + +\end{multicols}} + +\item Vero o falso? \punti[per ognuna]{2} + +{\setlength\columnsep{1.3cm} % lo spazio tra le colonne si può modificare +\begin{multicols}{3} +\begin{enumerate}[a)] + \item $1+1=2$ \vf + \item $3+0=0$ \vf + \item $3\times 3=9$ \vf + \item $0:3=1$ \vf + \item $\lim_{x\to 2}x^2=4$ \vf + \item $\sum_{n=0}^{1}n^2=1$ \vf +\end{enumerate} +\end{multicols}} + +\item Enuncia il teorema di Weierstrass. \punti{8} + +\riga{2} + +\item \emph{Completa.} \doublespacing In un triangolo \dotword{rettangolo} + il quadrato costruito sull' \dotword{ipotenusa} è uguale alla + \dotword{somma} dei \dotword{quadrati} costruiti sui + \dotword{cateti}. \punti{20} \par\singlespacing + +\item Stabilisci se le seguenti affermazioni sono vere o + false. \punti[per ognuna]{10} + +\begin{enumerate}[a)] + \item \verofalso[.8]{Il coefficiente angolare di una retta si deve + \emph{sempre} indicare con la lettera $m$ e l'ordinata all'origine + \emph{sempre} con la lettera $q$.} + \item \verofalso[.8]{Se una funzione derivabile in un intervallo ha + derivata positiva, allora la funzione è crescente in tale intervallo.} +\end{enumerate} + +\end{esercizi} + +\totpunti[/10+2] + +\end{document} diff --git a/macros/latex/contrib/verifica/example3.pdf b/macros/latex/contrib/verifica/example3.pdf Binary files differnew file mode 100644 index 0000000000..18e6637d2d --- /dev/null +++ b/macros/latex/contrib/verifica/example3.pdf diff --git a/macros/latex/contrib/verifica/example3.tex b/macros/latex/contrib/verifica/example3.tex new file mode 100644 index 0000000000..6486db2043 --- /dev/null +++ b/macros/latex/contrib/verifica/example3.tex @@ -0,0 +1,89 @@ +\documentclass[senzagrazie,14pt]{verifica} + +\usepackage[utf8]{inputenc} +\usepackage[italian]{babel} +\usepackage[T1]{fontenc} + +\begin{document} + +\tipologia{prova orale} +\disciplina{matematica} +\istituto{Liceo ``G. Novello'' -- Codogno} +\classe{5\tsa B} +\data{11 novembre 2019} +\tempo{60 minuti} + +\intestazione + +\begin{esercizi}[itemsep=1.5em] + +\item La soluzione dell'equazione $x+1=0$ è: +\begin{test-orizz} + \item $1$; + \item $-1$; + \item $0$; + \item $+\infty$. +\end{test-orizz} +\punti{10} + +\item Quale fra le seguenti è la derivata di $3x^2$? \punti{10} +\begin{test-orizz-newline} +\item $3x$; +\item $3$; +\item $3x^2$; +\item $6x$. +\end{test-orizz-newline} + +\bigskip + +{\setlength\columnsep{2.5cm} % lo spazio tra le colonne si può modificare +\begin{multicols}{2} +\item Indicate con $p$ e $q$ due generiche proposizioni, quattro delle + seguenti affermazioni sono tra loro logicamente equivalenti, mentre + una non lo è con le altre. Quale? +\begin{test} +\item $p$ implica $q$ +\item $q$ è condizione necessaria per $p$ +\item $p$ segue dal verificarsi di $q$ +\item $p$ solo se $q$ +\item $p$ è condizione sufficiente per~$q$ \punti{10} +\end{test} + +\columnbreak + +\item Quale delle seguenti frasi è equivalente a + +\emph{non è vero che Mario studia e ascolta la radio} + +\begin{test} +\item Mario studia e ascolta la radio +\item Mario studia o ascolta la radio +\item Mario non studia né ascolta la radio +\item Mario non studia o non ascolta la radio\\ \punti{10} +\end{test} + +\end{multicols}} + +\item Vero o falso? \punti[per ognuna]{5} + +{\setlength\columnsep{1.3cm} % lo spazio tra le colonne si può modificare +\begin{multicols}{2} +\begin{enumerate}[a),wide=0pt] + \item $1+1=2$ \vf + \item $3+0=0$ \vf + \item $3\times 3=9$ \vf + \item $0:3=1$ \vf + \item $\lim_{x\to 2}x^2=4$ \vf + \item $\sum_{n=0}^{1}n^2=1$ \vf +\end{enumerate} +\end{multicols}} + +\item Enuncia il teorema di Weierstrass. \punti{10} + +\riga{2} + +\end{esercizi} + +\totpunti[/10+2] + +\end{document} diff --git a/macros/latex/contrib/verifica/example4.pdf b/macros/latex/contrib/verifica/example4.pdf Binary files differnew file mode 100644 index 0000000000..4e43feb98f --- /dev/null +++ b/macros/latex/contrib/verifica/example4.pdf diff --git a/macros/latex/contrib/verifica/example4.tex b/macros/latex/contrib/verifica/example4.tex new file mode 100644 index 0000000000..74fed68e56 --- /dev/null +++ b/macros/latex/contrib/verifica/example4.tex @@ -0,0 +1,97 @@ +\documentclass{verifica} + +\usepackage[utf8]{inputenc} +\usepackage[english,italian]{babel} +\usepackage[T1]{fontenc} +\usepackage{lmodern} +\usepackage{tasks} + +\begin{document} + +\tipologia{verifica} +\disciplina{matematica e fisica} +\istituto{Liceo ``G. Novello'' -- Codogno} +\classe{4\tsa C} +\data{10 ottobre 2019} +\tempo{55 minuti} + +\intestazionerighe + +\begin{esercizi} + +\item Data l'ellisse +\[ + 9x^2+y^2+36x-4y+4=0 +\] +calcola il suo centro, i valori dei semiassi, i fuochi e l'eccentricità. + +\item Un aereo di linea ha una potenza sonora di circa + $4,8\times 10^4\unit{W}$. Un operatore aeroportuale si trova + a $25\unit{m}$ di distanza. +\begin{itemize} + \item Calcola l'intensità e il livello sonoro percepiti dall'operatore. + \item Calcola l'intensità e il livello sonoro a $1,5\times 10^3\unit{m}$ + di distanza. +\end{itemize} + +\item Data l'equazione +\[ + \frac{x^2}{25}+\frac{y^2}{12-k}=1 +\] +determina per quale valore di $k$ essa rappresenta +\begin{enumerate}[a)] + \item un'ellisse; + \item un'ellisse coi fuochi sull'asse $x$; + \item un'ellisse coi fuochi sull'asse $y$; + \item un'ellisse passante per il punto $(-2, 1)$; + \item un'ellisse passante per il punto $(5\sqrt{2},-1)$. +\end{enumerate} + +\item Risolvi le seguenti equazioni e disequazioni. +\begin{tasks}[after-item-skip=2em,column-sep=2em,item-indent=2em](2) + \task $\dss{2\cos^2 x +3\sin^2 x=\frac{5}{2}\sin 2x}$ + \task $\dss{\frac{1 -\cos 2x}{\sqrt{3}\sin x}=\frac{\tan x}{2\cos x}}$ + \task $\dss{2\sin^2 x +3\cos x -2 \le 0}$ + \task $\dss{3\sin^2 x -2\sqrt{3}\sin x\cos x > 3\cos^2 x}$ +\end{tasks} + +\item \begin{otherlanguage}{english} +True or false? +\begin{enumerate}[a)] + \item The speed of light in vacuum is approximately + $3.0\times 10^8\unitx{m/s}$. \vf + \item \verofalso{The gravitational acceleration of an object in + vacuum, near the surface of the Earth, is denoted by $g$ + and is approximately $9.8\unitx{m/s^2}$. At different + points, $g$ changes depending on altitude and latitude.} +\end{enumerate} +\end{otherlanguage} + +\end{esercizi} + +\vfill + +% tabella per l'attribuzione dei singoli punteggi +% consultare la documentazione del pacchetto tabularx +\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}} +\begin{flushright} +{\renewcommand{\arraystretch}{1.2} +\begin{tabularx}{\textwidth}{|X|*{12}{P{.75cm}|}} +\hline +\textbf{Esercizio} & \textbf{1} & \textbf{2} & \multicolumn{5}{c|}{\textbf{3}} + & \multicolumn{4}{c|}{\textbf{4}} + & \textbf{5} \\ +\cline{4-12} + & & & a & b & c & d & e & a & b & c & d & \\ +\hline +\hline +Punteggio & 9 & 9 & 6 & 6 & 6 & 6 & 6 & 10 & 10 & 12 & 12 & 4 \\ +\hline +Totalizzato & & & & & & & & & & & &\\ +\hline +\end{tabularx}} +\end{flushright} + +\vartotpunti[/12+2] + +\end{document} diff --git a/macros/latex/contrib/verifica/example5.pdf b/macros/latex/contrib/verifica/example5.pdf Binary files differnew file mode 100644 index 0000000000..4c0c29ef0a --- /dev/null +++ b/macros/latex/contrib/verifica/example5.pdf diff --git a/macros/latex/contrib/verifica/example5.tex b/macros/latex/contrib/verifica/example5.tex new file mode 100644 index 0000000000..be9f3e0700 --- /dev/null +++ b/macros/latex/contrib/verifica/example5.tex @@ -0,0 +1,96 @@ +\documentclass[senzagrazie]{verifica} + +\usepackage[utf8]{inputenc} +\usepackage[english,italian]{babel} +\usepackage[T1]{fontenc} +\usepackage{tasks} + +\begin{document} + +\tipologia{verifica} +\disciplina{matematica e fisica} +\istituto{Liceo ``G. Novello'' -- Codogno} +\classe{4\tsa C} +\data{10 ottobre 2019} +\tempo{55 minuti} + +\intestazionerighe + +\begin{esercizi} + +\item Data l'ellisse +\[ + 9x^2+y^2+36x-4y+4=0 +\] +calcola il suo centro, i valori dei semiassi, i fuochi e l'eccentricità. + +\item Un aereo di linea ha una potenza sonora di circa + $4,8\times 10^4\unit{W}$. Un operatore aeroportuale si trova + a $25\unit{m}$ di distanza. +\begin{itemize} + \item Calcola l'intensità e il livello sonoro percepiti dall'operatore. + \item Calcola l'intensità e il livello sonoro a $1,5\times 10^3\unit{m}$ + di distanza. +\end{itemize} + +\item Data l'equazione +\[ + \frac{x^2}{25}+\frac{y^2}{12-k}=1 +\] +determina per quale valore di $k$ essa rappresenta +\begin{enumerate}[a)] + \item un'ellisse; + \item un'ellisse coi fuochi sull'asse $x$; + \item un'ellisse coi fuochi sull'asse $y$; + \item un'ellisse passante per il punto $(-2, 1)$; + \item un'ellisse passante per il punto $(5\sqrt{2},-1)$. +\end{enumerate} + +\item Risolvi le seguenti equazioni e disequazioni. +\begin{tasks}[after-item-skip=2em,column-sep=2em,item-indent=2em](2) + \task $\dss{2\cos^2 x +3\sin^2 x=\frac{5}{2}\sin 2x}$ + \task $\dss{\frac{1 -\cos 2x}{\sqrt{3}\sin x}=\frac{\tan x}{2\cos x}}$ + \task $\dss{2\sin^2 x +3\cos x -2 \le 0}$ + \task $\dss{3\sin^2 x -2\sqrt{3}\sin x\cos x > 3\cos^2 x}$ +\end{tasks} + +\item \begin{otherlanguage}{english} +True or false? +\begin{enumerate}[a)] + \item The speed of light in vacuum is approximately + $3.0\times 10^8\unitx{m/s}$. \vf + \item \verofalso{The gravitational acceleration of an object in + vacuum, near the surface of the Earth, is denoted by $g$ + and is approximately $9.8\unitx{m/s^2}$. At different + points, $g$ changes depending on altitude and latitude.} +\end{enumerate} +\end{otherlanguage} + +\end{esercizi} + +\vfill + +% tabella per l'attribuzione dei singoli punteggi +% consultare la documentazione del pacchetto tabularx +\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}} +\begin{flushright} +{\renewcommand{\arraystretch}{1.2} +\begin{tabularx}{\textwidth}{|X|*{12}{P{.75cm}|}} +\hline +\textbf{Esercizio} & \textbf{1} & \textbf{2} & \multicolumn{5}{c|}{\textbf{3}} + & \multicolumn{4}{c|}{\textbf{4}} + & \textbf{5} \\ +\cline{4-12} + & & & a & b & c & d & e & a & b & c & d & \\ +\hline +\hline +Punteggio & 9 & 9 & 6 & 6 & 6 & 6 & 6 & 10 & 10 & 12 & 12 & 4 \\ +\hline +Totalizzato & & & & & & & & & & & &\\ +\hline +\end{tabularx}} +\end{flushright} + +\vartotpunti[/12+2] + +\end{document} diff --git a/macros/latex/contrib/verifica/verifica-template.tex b/macros/latex/contrib/verifica/verifica-template.tex new file mode 100644 index 0000000000..eebd0791bc --- /dev/null +++ b/macros/latex/contrib/verifica/verifica-template.tex @@ -0,0 +1,29 @@ +\documentclass{verifica} + +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[italian]{babel} +\usepackage{lmodern} + +\begin{document} + +% decommentare i comandi seguenti e ridefinirli come si desidera + +%\tipologia{verifica} +%\disciplina{matematica} +%\istituto{Liceo ``G. Novello'' -- Codogno} +%\classe{5\tsa W} +%\data{11 novembre 2019} +%\tempo{2 ore} + +\intestazione % alernative: \intestazionesemplice \intestazionerighe + +\begin{esercizi} + +\item + +\end{esercizi} + +\totpunti % se il calcolo è diverso da /10+1 usare \totpunti[<calcolo desiderato>] + +\end{document} diff --git a/macros/latex/contrib/verifica/verifica.dtx b/macros/latex/contrib/verifica/verifica.dtx new file mode 100644 index 0000000000..2b0b735edc --- /dev/null +++ b/macros/latex/contrib/verifica/verifica.dtx @@ -0,0 +1,2477 @@ +% \iffalse meta-comment +% +% verifica.cls. Version: 1.0 - January 2, 2020. +% Author: Riccardo DOSSENA <riccardo.dossena@gmail.com> +% +% Questa è una classe per comporre le verifiche +%-------------------------------------------------------------------------------- +% Copyright 2020 R. Dossena +% +% 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 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is R. Dossena. +%-------------------------------------------------------------------------------- +% +% \fi +% \iffalse +%<*driver> +\ProvidesFile{verifica.dtx} +%</driver> +%<class|package>\NeedsTeXFormat{LaTeX2e} +%<class>\ProvidesClass{verifica} +%<package>\ProvidesPackage{ver-doc} +%<*class|package> + [2020/01/02 v1.0 Riccardo Dossena] +%</class|package> +% +%<*driver> +\PassOptionsToClass{a4paper}{article} +\documentclass{ltxdoc} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[english,italian]{babel} +\usepackage{lmodern} +\usepackage{microtype} +\usepackage{indentfirst} +\usepackage{ver-doc} +\usepackage[numbered]{hypdoc} % after ver-doc 'cause setspace interferes +\usepackage[all]{hypcap} % needed to help hyperlinks direct correctly; +\usepackage{booktabs} +\usepackage[dvipsnames]{xcolor} +\usepackage{listings} + +\newcommand{\pack}[1]{\mbox{\sffamily#1}} +\newcommand{\opt}[1]{``\texttt{#1}''} +\newcommand{\env}{\texttt} +\def\labelitemi{\small $\blacktriangleright$} + +\setISOcompliance + +\definecolor{lightergray}{gray}{0.99} +\definecolor{mathgreen}{RGB}{2,112,10} + +\lstset{language=[LaTeX]TeX, + keywordstyle=\color{RoyalBlue}, + aboveskip=\bigskipamount, + belowskip=\medskipamount, + basicstyle=\ttfamily, + commentstyle=\color{Emerald}\ttfamily, + stringstyle=\rmfamily, + numberstyle=\scriptsize, + showstringspaces=false, + breaklines=true, + frame=lines, + backgroundcolor=\color{lightergray}, + flexiblecolumns=true, + escapeinside={?*}{*)}, + firstnumber=last, + inputencoding=utf8, + keepspaces=true, + literate={à}{{\`a}}1 {è}{{\`e}}1 {é}{{\'e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 + {ù}{{\`u}}1 {È}{{\`E}}1 {°}{{\degree}}1 + {<B>}{\{\color{green!60!black}}1 {<E>}{\}\normalcolor}1, + % keyword highlighting + keywordstyle=[2]{\color{RedOrange}}, + keywordstyle=[3]{\color{Mahogany}}, + otherkeywords={$,\\[,\\],&}, + morekeywords=[2]{$,\\[,\\],&}, + morekeywords=[3]{intestazione,tipologia,disciplina,istituto, + data,classe,tempo,intestazionesemplice, + intestazionerighe,dss,vf,verofalso,fattorevf,punti, + puntiadestra,puntipt,totpunti,vartotpunti, + riga,dotword,dotrule,ddfrac,numfrac,denfrac, + arc,vararc,eps,del,Del,R,N,Z,Q,tsa,tso, + restorephi,restoretheta,abs,labeltest,labelbox, + biglabelbox,unitx}, +} + +\lstset{morekeywords=% + {setlength,subsection,part,chapter,dfrac,varto, + ointclockwise,iint,iiint,oiint,IntelligentComma,NoIntelligentComma, + setISOcompliance,unit,text,SI,DeclareMathOperator,mathbb, + mathcal,varnothing,lvert,rvert,lVert,rVert,implies,boldsymbol, + binom,hdotsfor,ap,ped,notag,eqref,theoremstyle,swapnumbers, + qedhere,qedsymbol,blacksquare,newunicodechar,foreignlanguage, + setactivedoublequote,maketitle,euro,EUR,includegraphics, + tableofcontents,refname,bibname,setbibliographyfont,btxauthorcolon, + addbibresource,printbibliography,printindex,indexprologue, + appendix,listoffigures,listoftables,graphicspath,RequirePackage, + toprule,midrule,bottomrule,sisetup,multirow,cmidrule,rowcolors, + scalebox,resizebox,rotatebox,reflectbox,cancel,bcancel,xcancel, + setstretch,doublespacing,onehalfspacing,singlespacing,textcolor, + color,url,href,DeclareFontEncoding,DeclareFontSubstitution, + DeclareMathAlphabet,bm,pmb,columnbreak,tag,cfrac,micro,selectlanguage}} + +\usepackage{tcolorbox} +\newenvironment{riquadro}[1][]{% +\begin{tcolorbox}[arc=0mm,colback=SkyBlue!10,colframe=black,boxrule=.6pt,% + before={\par\medskip\pagebreak[0]\noindent},% + after={\smallskip},#1]}% +{\end{tcolorbox}} + +\newlist{options}{description}{1} +\setlist[options]{leftmargin=10em,font=\ttfamily,style=sameline} + +\newcommand{\Mcmd}[1]{\texttt{\textbackslash\color{Mahogany}#1}} +\newcommand{\Bcmd}[1]{\texttt{\textbackslash\color{RoyalBlue}#1}} + +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} + \DocInput{verifica.dtx} +\end{document} +%</driver> +% \fi +% +% \CheckSum{0} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% +% \changes{v1.0}{2019/11/28}{First public release} +% +% \GetFileInfo{verifica.dtx} +% +% \DoNotIndex{\newcommand,\newenvironment,\def,\begin,\end,\par} +% \DoNotIndex{\DeclareOption,\ExecuteOptions,\ProcessOptions,\RequirePackage} +% \DoNotIndex{\LoadClass,\AtBeginDocument,\SetSymbolFont} +% \DoNotIndex{\newif,\geometry,\pagestyle,\setISOcompliance,\IntelligentComma} +% \DoNotIndex{\relax,\let,\phi,\theta,\varphi,\vartheta,\else,\fi,\undefined} +% \DoNotIndex{\renewcommand,\newlength,\hline,\textbf,\textit,\\,\setlength} +% \DoNotIndex{\DeclarePairedDelimiter,\MakeUppercase,\MessageBreak,\ClassError} +% \DoNotIndex{\widthof,\textwidth,\ifdefined,\null,\vspace,\noindent,\hfill} +% \DoNotIndex{\hrulefill,\makebox,\linewidth,\small,\centering,\lvert,\rvert} +% \DoNotIndex{\newunicodechar,\ensuremath,\circ,\textsuperscript,\,} +% \DoNotIndex{\varepsilon,\delta,\Delta,\displaystyle,\mathbb,\arraystretch} +% \DoNotIndex{\bm,\box,\DeclareFontShape,\DeclareFontFamily,\DeclareMathAccent} +% \DoNotIndex{\DeclareSymbolFont,\doublespacing,\frac,\mathstrut,\bfseries} +% \DoNotIndex{\usefont,\symbol,\mathpalette,\sbox,\vbox,\hbox,\box} +% \DoNotIndex{\m@th,\wd,\resizebox,\height,\nointerlineskip,\mathord} +% \DoNotIndex{\mathrm,\labelitemi,\blacktriangleright,\textup,\fbox,\parbox} +% \DoNotIndex{\alph,\newlist,\renewlist,\setlist,\hspace,\iflanguage,\protect} +% \DoNotIndex{\ifdim,\newcounter,\newsavebox,\savebox,\setcounter,\linenumbers} +% \DoNotIndex{\thelinenumbers,\addtocounter,\multido,\i,\phantom,\newline} +% \DoNotIndex{\value,\leavevmode,\leaders,\hss,\kern,\real,\tabcolsep,\space} +% \DoNotIndex{\doublespacing,\singlespacing,\@nil,\@nnil,\vphantom,\today} +% \DoNotIndex{\nolinebreak,\null,\textsc,\ifx,\tmp,\mbox,\vfill,\LARGE,\Huge} +% +% \title{La classe \pack{verifica}} +% \author{Riccardo Dossena\thanks{% +% E-mail: \href{mailto:riccardo.dossena@gmail.com}% +% {\ttfamily riccardo.dossena@gmail.com}}} +% +% \maketitle +% +% \pagestyle{plain} +% +% \selectlanguage{english} +% \begin{abstract} +% This LaTeX document class is intended for teachers who must write +% out the text of a test or an exam. It provides various environments +% and commands to produce the typical exercises contained in this +% type of document. It is mainly intended for Italian high school teachers, +% as the style is probably more in line with Italian high school tests. +% \end{abstract} +% +% \selectlanguage{italian} +% +% \tableofcontents +% +% \section{Introduzione} +% +% Questa classe di documento è rivolta principalmente agli insegnanti delle +% scuole superiori italiane che devono comporre il testo di una verifica, di un +% esame o di un test. Essa mette a disposizione vari ambienti e comandi per +% produrre gli esercizi tipici contenuti in questo tipo di documento. +% +% Il codice è stato abbozzato in occasione dell'ultima lezione del Corso \LaTeX\ +% tenuto al Liceo Novello di Codogno (LO) +% fra ottobre e novembre 2019, prima sotto forma di pacchetto e in seguito di +% classe. L'intento era di fornire ai partecipanti uno strumento +% concreto e utile per la realizzazione di uno fra i documenti più +% frequentemente utilizzati: il test, comunemente chiamato ``verifica''. +% Le attente osservazioni dei miei ottimi colleghi mi hanno spinto in seguito +% a potenziare la classe, al fine di permettere una migliore personalizzazione +% e un più efficace utilizzo degli ambienti definiti. +% +% \section{Licenza} +% +% Il codice \LaTeX\ di questa classe è rilasciato sotto la \LaTeX\ Project +% Public License, v1.3. +% +% \section{Come usare la classe \pack{verifica}} +% +% Per usare la classe è sufficiente copiare il file \texttt{verifica.cls} nella +% stessa cartella dove risiede il file sorgente del documento che si +% vuole comporre, oppure installarlo secondo le procedure standard in una +% directory opportuna della propria distribuzione \TeX\footnote{Si vedano, nel +% caso, le \TeX\ FAQ alla pagina \url{https://texfaq.org/FAQ-inst-wlcf}.}. +% Per iniziare a editare un documento si può digitare direttamente il file +% \texttt{verifica-template.tex}, che contiene alcuni comandi già impostati. +% +% Per caricare la classe, il comando da dare nel preambolo è +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\documentclass{verifica} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \subsection{Opzioni di classe} +% +% Le opzioni di default per il corpo del testo e per il formato della pagina +% sono \opt{11pt} e \opt{a4paper}. È possibile tuttavia modificarle inserendo +% altre opzioni di classe, ad esempio: +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\documentclass[12pt,a5paper]{verifica} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% Le opzioni di classe disponibili, oltre a quelle per il formato pagina, +% sono elencate di seguito. +% +% \begin{options}[leftmargin=4.2cm,itemsep=2pt] +% \item[10pt] corpo del testo a $10\unit{pt}$ +% \item[11pt] corpo del testo a $11\unit{pt}$ (default) +% \item[12pt] corpo del testo a $12\unit{pt}$ +% \item[14pt] corpo del testo a $14\unit{pt}$ +% \item[senzagrazie] stile del testo senza grazie (font \pack{cmbright}) +% \item[textbullet] stile punti elenco \textbullet\ (anziché +% {\small $\blacktriangleright$}) +% \item[intestazionesemplice] intestazione stile ``semplice'' +% \item[intestazionerighe] intestazione stile ``con righe'' +% \end{options} +% +%\section{L'intestazione della verifica} +% +% Per creare l'intestazione della verifica occorre impostare i comandi che ne +% definiscono la tipologia, la disciplina, l'istituto, la data, la classe ed +% eventualmente il tempo a disposizione~(tabella~\ref{tab:intest}). +% \begin{table}[htbp] +% \centering +% \renewcommand{\arraystretch}{1.4}\renewcommand{\tabcolsep}{1.2em} +% \begin{tabularx}{\linewidth}{lp{.3\linewidth}X} +% \toprule +% \textbf{Comando} & \textbf{Esempi/descrizione} & \textbf{Valore di% +% default} \\ +% \midrule +% \Mcmd{tipologia} & verifica, prova per competenze,% +% test, prova comune,% +% verifica orale, \ldots & verifica \\ +% \Mcmd{disciplina} & matematica, fisica, scienze,% +% italiano, \ldots & matematica \\ +% \Mcmd{istituto} & nome dell'Istituto & Liceo ``G. Novello''% +% -- Codogno \\ +% \Mcmd{data} & data della verifica & \Bcmd{today}% +% (data odierna) \\ +% \Mcmd{classe} & classe & \emph{non definito} \\ +% \Mcmd{tempo} & tempo a disposizione & \emph{non definito} \\ +% \bottomrule +% \end{tabularx} +% \caption{I comandi per l'intestazione della verifica.}\label{tab:intest} +% \end{table} +% +% Per generare l'intestazione si deve inserire il comando +% \lstinline|\intestazione|. +% +% La classe \pack{verifica} fornisce inoltre i comandi \lstinline|\tsa| e +% \lstinline|\tso|\footnote{Abbreviazioni di +% \Bcmd{textsuperscript}\texttt{\{a\}} e \Bcmd{textsuperscript}\texttt{\{o\}}.} +% che generano rispettivamente i simboli~$\textsuperscript{a}$ +% e~$\textsuperscript{o}$ per i numeri ordinali, seguiti da uno spazio +% fine. Essi sono utili per scrivere l'argomento di \lstinline|\classe|. +% +% Mostriamo un esempio di intestazione standard: +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{document} + +\tipologia{verifica orale} +\disciplina{fisica} +\istituto{Liceo ``F. Indovino'' -- Roma} +\classe{3\tsa C} +\data{12 novembre 2019} + +\intestazione +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \makeatletter +% \def\@tipologia{verifica orale} +% \def\@disciplina{fisica} +% \def\@istituto{Liceo ``F. Indovino'' -- Roma} +% \def\@classe{3\tsa C} +% \def\@data{12 novembre 2019} +% \makeatother +% \begin{riquadro} +% \intestazionedefault +% \end{riquadro} +% Se in aggiunta si inserisce il comando \lstinline|\tempo|, viene +% stampato il tempo a disposizione per la prova. In assenza dei comandi +% di definizione, apparirà l'intestazione coi valori di default indicati +% nella tabella~\ref{tab:intest}. Ad esempio: +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{document} + +\classe{} +\tempo{60 minuti} + +\intestazione +\end{lstlisting} +%\iffalse +%</example> +%\fi +% +% \makeatletter +% \def\@tipologia{verifica} +% \def\@disciplina{matematica} +% \def\@istituto{Liceo ``G. Novello'' -- Codogno} +% \def\@data{\today} +% \def\@classe{Classe} +% \def\@tempo{60 minuti} +% \makeatother +% +% \begin{riquadro} +% \intestazionedefault +% \end{riquadro} +% Il campo \lstinline|\classe| rimasto vuoto può rivelarsi utile nel caso in cui +% la verifica sia proposta a più classi e l'informazione debba essere inserita +% dal candidato. +% +% Se il comando \lstinline|\classe| non viene inserito, il campo corrispondente +% rimane indefinito e la dicitura ``Classe'' non appare. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{document} + +\intestazione +\end{lstlisting} +%\iffalse +%</example> +%\fi +% +% \makeatletter +% \def\@tipologia{verifica} +% \def\@disciplina{matematica} +% \def\@istituto{Liceo ``G. Novello'' -- Codogno} +% \def\@data{\today} +% \def\@classe{} +% \let\@tempo\undefined +% \makeatother +% +% \begin{riquadro} +% \intestazionedefault +% \end{riquadro} +% +% \subsection{Altri tipi di intestazione} +% +% È possibile usare altri due stili di intestazione tramite i comandi +% \lstinline|\intestazionesemplice| e \lstinline|\intestazionerighe|. La prima +% produce un'intestazione ``essenziale'': +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\tipologia{prova per competenze} +\disciplina{matematica} +\istituto{Liceo ``G. Novello'' -- Codogno (LO)} +\classe{3\tsa C} +\data{12 novembre 2019} + +\intestazionesemplice +\end{lstlisting} +%\iffalse +%</example> +%\fi +% +% \makeatletter +% \def\@tipologia{prova per competenze} +% \def\@disciplina{matematica} +% \def\@istituto{Liceo ‘‘G. Novello’’ -- Codogno} +% \def\@classe{Classe 3\tsa C} +% \def\@data{12 novembre 2019} +% \let\@tempo\undefined +% \makeatother +% +% \begin{riquadro} +% \vspace{.5em} +% \intestazionesemplice% +% \end{riquadro} +% La seconda produce un'intestazione delimitata da due righe: +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\tipologia{verifica orale} +\disciplina{matematica} +\istituto{Liceo ``G. Novello'' -- Codogno (LO)} +\classe{2\tsa B} +\data{12 novembre 2019} +\tempo{55 minuti} + +\intestazionerighe +\end{lstlisting} +%\iffalse +%</example> +%\fi +% +% \makeatletter +% \def\@tipologia{verifica orale} +% \def\@disciplina{matematica} +% \def\@istituto{Liceo ‘‘G. Novello’’ -- Codogno} +% \def\@classe{Classe 2\tsa B} +% \def\@data{12 novembre 2019} +% \def\@tempo{55 minuti} +% \makeatother +% +% \begin{riquadro} +% \vspace{2em} +% \intestazionerighe% +% \end{riquadro} +% In entrambi i casi si può definire oppure no il tempo a disposizione. +% +% Anziché usare i comandi \lstinline|\intestazionesemplice| e \lstinline|\intestazionerighe|, è possibile +% impostare un'opzione di classe. Scrivendo infatti +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\documentclass[intestazionesemplice]{verifica} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% oppure +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\documentclass[intestazionerighe]{verifica} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% l'intestazione verrà generata dal comando \lstinline|\intestazione| con lo +% stile impostato dall'opzione. +% +% \section{Gli ambienti} +% +% \subsection{L'ambiente \texttt{esercizi}} +% +% L'ambiente |esercizi| è quello principale: esso produce, mediante il pacchetto +% \pack{enumitem}, un elenco numerato allineato al margine sinistro, con +% etichette (label) in grassetto. La spaziatura verticale fra un +% esercizio (item) e l'altro è impostata per default a $2\unit{em}$. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} +\item La mamma dà a Pierino \EUR{10} per comprare la frutta. Pierino li + spende tutti. Quanto rimane a Pierino? + +\item Risolvi la seguente equazione + \[ + x+1=2 + \] + +\item Enuncia e dimostra il teorema di Pitagora. +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item La mamma dà a Pierino \EUR{10} per comprare la frutta. Pierino li spende +% tutti. Quanto rimane a Pierino? +% +% \item Risolvi la seguente equazione +% \[ +% x+1=2 +% \] +% +% \item Enuncia e dimostra il teorema di Pitagora. +% \end{esercizi} +% \end{riquadro} +% Qualora si volesse modificare la spaziatura tra gli item, è sufficiente +% modificare il valore del parametro |itemsep|, esattamente come nelle liste +% definite da \pack{enumitem}. Nel codice di esempio seguente viene prodotta una +% spaziatura di $1\unit{em}$ (anziché di $2\unit{em}$) tra un item e l'altro. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi}[itemsep=1em] +\item La mamma dà a Pierino... +... +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% +% \subsection{Sottoelenchi dell'ambiente \texttt{esercizi}} +% +% È possibile, all'interno dell'ambiente \env{esercizi}, creare dei sottoelenchi +% che sfruttano i vantaggi del pacchetto \pack{enumitem}. Mostriamo come +% esempio un esercizio che consiste in un elenco di equazioni da risolvere. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} +\item Risolvi le seguenti equazioni + \begin{enumerate}[a),itemsep=1.5em,topsep=1.2em,leftmargin=*] + \item $\dss{\frac{x+1}{x-2}+4=\frac{x}{x-1}}$ + + \item $\dss{\sin^2 x+\cos x = \cos 2x}$ + + \item $\dss{\ln (x+1)=\ln 5 + \log_2 x}$ + \end{enumerate} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Risolvi le seguenti equazioni +% \begin{enumerate}[a),itemsep=1.5em,topsep=1.2em,leftmargin=*] +% \item $\dss{\frac{x+1}{x-2}+4=\frac{x}{x-1}}$ +% +% \item $\dss{\sin^2 x+\cos x = \cos 2x}$ +% +% \item $\dss{\ln (x+1)=\ln 5 + \log_2 x}$ +% \end{enumerate} +% \end{esercizi} +% \end{riquadro} +% +% Il comando \lstinline|\dss| è un'abbreviazione di \lstinline|\displaystyle|, +% che serve a ottenere le formule nel testo in stile display. La +% tabella~\ref{tab:enumitem} mostra alcuni dei parametri opzionali di +% \pack{enumitem} che possono essere impostati per personalizzare gli elenchi. +% +% \begin{table}[htbp] +% \centering +% \renewcommand{\arraystretch}{1.5}\renewcommand{\tabcolsep}{1em} +% \begin{tabularx}{\linewidth}{lX} +% \toprule +% \textbf{Parametro} & \textbf{Esempi/descrizione} \\ +% \midrule +% \texttt{a)} & imposta la numerazione alfabetica con parentesi. +% Altri esempi sono: +% \begin{itemize}[\textbullet,leftmargin=*] +% \item \texttt{A.} (numerazione alfabetica in +% maiuscolo con punto) +% \item \texttt{i.} (numerazione romana in minuscolo +% con punto) +% \item \verb|\bfseries 1)| (numerazione in grassetto +% con parentesi) +% \end{itemize} \\ +% \texttt{itemsep} & imposta lo spazio verticale tra un item e l'altro \\ +% \texttt{topsep} & imposta lo spazio verticale tra il testo che precede +% l'elenco e il primo item \\ +% \texttt{labelsep} & imposta la distanza tra il testo dell'item e +% l'etichetta \\ +% \texttt{leftmargin} & imposta il rientro dell'elenco rispetto al margine +% sinistro; il comando \verb|leftmargin=*| allinea le +% etichette (label) numeriche al margine degli item +% dell'elenco principale \\ +% \bottomrule +% \end{tabularx} +% \caption{Alcuni parametri utili del pacchetto +% \pack{enumitem}.}\label{tab:enumitem} +% \end{table} +% +% \subsection{Sottoelenchi puntati} +% +% È possibile usare \env{itemize} per suddividere un esercizio in punti non +% numerati, utilizzando gli stessi parametri opzionali dell'ambiente +% \env{enumerate}. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} +\item Un'automobile sta viaggiando alla velocità $v_0$ lungo una strada + rettilinea. A un certo istante $t_0$ comincia ad accelerare e + raggiunge la velocità $v$ all'istante $t$. Calcola: + \begin{itemize} + \item l'accelerazione media dell'automobile; + \item lo spazio percorso in fase di accelerazione. + \end{itemize} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Un'automobile sta viaggiando alla velocità $v_0$ lungo una strada +% rettilinea. A un certo istante $t_0$ comincia ad accelerare e raggiunge +% la velocità $v$ all'istante $t$. Calcola: +% \begin{itemize} +% \item l'accelerazione media dell'automobile; +% \item lo spazio percorso in fase di accelerazione. +% \end{itemize} +% \end{esercizi} +% \end{riquadro} +% +% Se al posto di {\small $\blacktriangleright$} si preferisce \textbullet, si +% deve impostare l'opzione di classe {\color{Mahogany}\texttt{itembullet}}. +% Nell'esempio seguente mostriamo anche l'uso del parametro +% \texttt{leftmargin=*}, che evita il rientro del sottoelenco. +% +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\documentclass[?*\textcolor{Mahogany}{\texttt{itembullet}}*)]{verifica} +... +\begin{esercizi} +\item Un'automobile sta viaggiando... + ... + \begin{itemize}[leftmargin=*] + \item l'accelerazione media dell'automobile; + \item lo spazio percorso in fase di accelerazione. + \end{itemize} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Un'automobile sta viaggiando alla velocità $v_0$ lungo una strada +% rettilinea. A un certo istante $t_0$ comincia ad accelerare e raggiunge +% la velocità $v$ all'istante $t$. Calcola: +% \begin{itemize}[\textbullet,leftmargin=*] +% \item l'accelerazione media dell'automobile; +% \item lo spazio percorso in fase di accelerazione. +% \end{itemize} +% \end{esercizi} +% \end{riquadro} +% +%\subsection{Test a risposta multipla} +% +% Vengono forniti tre ambienti per i test a risposta multipla: +% l'ambiente \texttt{test} (risposte allineate verticalmente) e gli +% ambienti ``in linea'' \texttt{test-orizz} e \texttt{test-orizz-newline} +% (``orizzontali'', cioè con risposte scritte di seguito). Mostriamo di seguito +% come utilizzarli. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} +\item Quale tra le funzioni seguenti è la derivata di $1+\sin x$? + \begin{test} + \item $\sin x$; + \item $\cos x$; + \item $-\sin x$; + \item $-\cos x$; + \item nessuna delle precedenti. + \end{test} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Quale tra le funzioni seguenti è la derivata di $1+\sin x$? +% \begin{test} +% \item $\sin x$; +% \item $\cos x$; +% \item $-\sin x$; +% \item $-\cos x$; +% \item nessuna delle precedenti. +% \end{test} +% \end{esercizi} +% \end{riquadro} +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} +\item Quale tra le funzioni seguenti è la derivata di $1+\sin x$? + \begin{test-orizz} + \item $\sin x$; + \item $\cos x$; + \item $-\sin x$; + \item $-\cos x$; + \item nessuna delle precedenti. + \end{test-orizz} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Quale tra le funzioni seguenti è la derivata di $1+\sin x$? +% \begin{test-orizz} +% \item $\sin x$; +% \item $\cos x$; +% \item $-\sin x$; +% \item $-\cos x$; +% \item nessuna delle precedenti. +% \end{test-orizz} +% \end{esercizi} +% \end{riquadro} +% +% Se si desidera che le risposte comincino a capo in una nuova riga, è +% disponibile la variante \texttt{test-orizz-newline}:\pagebreak +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} +\item Quale tra le funzioni seguenti è la derivata di $1+\sin x$? + \begin{test-orizz-newline} + \item $\sin x$; + \item $\cos x$; + \item $-\sin x$; + \item $-\cos x$; + \item nessuna delle precedenti. + \end{test-orizz-newline} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Quale tra le funzioni seguenti è la derivata di $1+\sin x$? +% \begin{test-orizz-newline} +% \item $\sin x$; +% \item $\cos x$; +% \item $-\sin x$; +% \item $-\cos x$; +% \item nessuna delle precedenti. +% \end{test-orizz-newline} +% \end{esercizi} +% \end{riquadro} +% +% Gli ambienti \texttt{test}, \texttt{test-orizz} e \texttt{test-orizz-newline} +% sono ancora liste definite tramite il pacchetto \pack{enumitem}, per cui è +% possibile modificarne i parametri come mostrato per l'ambiente +% \texttt{esercizi}\footnote{Consultare, nel caso, la documentazione di +% \pack{enumitem}: +% \url{http://ctan.mirror.garr.it/mirrors/CTAN/macros/latex/contrib/enumitem/enumitem.pdf}.}. +% +% Se si vuole cambiare il formato delle label per l'intero documento, si può +% impostare nel preambolo o all'inizio del testo il comando seguente: +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\labeltest{?*\meta{\textrm{label}}*)} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% dove \meta{label} definisce il nuovo stile secondo i criteri di +% \pack{enumitem}, anche in modalità \opt{shortlabels}. Ricordiamo che se il +% contatore viene scritto tra parentesi graffe (ad esempio se si +% utilizza una box) non può essere in forma abbreviata, ma deve essere una fra +% \lstinline|\arabic*|, \lstinline|\alph*|, +% \lstinline|\Alph*|, \lstinline|\roman*| o \lstinline|\Roman*|. +% +% L'esempio che segue è ispirato ai testi dei \emph{Giochi di Archimede}. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\labeltest{\bfseries (A)} +... +\begin{esercizi} +\item Quale tra le funzioni seguenti è la derivata di $1+\sin x$? + \begin{test-orizz-newline} + \item $\sin x$; + \item $\cos x$; + \item $-\sin x$; + \item $-\cos x$; + \item nessuna delle precedenti. + \end{test-orizz-newline} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Quale tra le funzioni seguenti è la derivata di $1+\sin x$? +% \begin{test-orizz-newline}[label=\bfseries (\Alph*)] +% \item $\sin x$; +% \item $\cos x$; +% \item $-\sin x$; +% \item $-\cos x$; +% \item nessuna delle precedenti. +% \end{test-orizz-newline} +% \end{esercizi} +% \end{riquadro} +% +% La classe \pack{verifica} definisce i comandi \lstinline|\labelbox| e +% \lstinline|\biglabelbox|, che racchiudono i loro argomenti in box quadrate +% ``framed''. La prima è usata nelle label di default dei test a risposta +% multipla e la seconda in quelle dei test vero/falso. Esse possono essere +% opportunamente utilizzate insieme a \lstinline|\labeltest| per ridefinire lo +% stile di altre label. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\labeltest{\biglabelbox{\Alph*}} +... +\begin{esercizi} +\item Quale tra le funzioni seguenti è la derivata di $1+\sin x$? + \begin{test-orizz-newline} + \item $\sin x$; + \item $\cos x$; + \item $-\sin x$; + \item $-\cos x$; + \item nessuna delle precedenti. + \end{test-orizz-newline} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Quale tra le funzioni seguenti è la derivata di $1+\sin x$? +% \begin{test-orizz-newline}[label=\biglabelbox{\Alph*}] +% \item $\sin x$; +% \item $\cos x$; +% \item $-\sin x$; +% \item $-\cos x$; +% \item nessuna delle precedenti. +% \end{test-orizz-newline} +% \end{esercizi} +% \end{riquadro} +% \subsection{Scrivere su più colonne} +% +% La classe carica in automatico il pacchetto \pack{multicol}, che permette di +% scrivere su più colonne mediante l'ambiente \env{multicols}: +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{multicols}{?*\meta{\textrm{numero di colonne}}*)} +... +\end{multicols} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% L'esempio seguente mostra un possibile utilizzo di questa funzionalità. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +{\setlength{\columnsep}{2.5em} +\begin{multicols}{2} +\begin{esercizi} + \item Quale tra le funzioni seguenti è la derivata di $1+\sin x$? + \begin{test} + \item $\sin x$; + \item $\cos x$; + \item $-\sin x$; + \item $-\cos x$; + \item nessuna delle precedenti. + \end{test}\columnbreak + \item Un'automobile sta viaggiando... + ... + \begin{itemize}[leftmargin=*] + \item l'accelerazione media dell'automobile; + \item lo spazio percorso in fase di accelerazione. + \end{itemize} +\end{esercizi} +\end{multicols}} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro}\setlength{\columnsep}{2.5em} +% \begin{multicols}{2} +% \begin{esercizi} +% \item Quale tra le funzioni seguenti è la derivata di $1+\sin x$? +% \begin{test} +% \item $\sin x$; +% \item $\cos x$; +% \item $-\sin x$; +% \item $-\cos x$; +% \item nessuna delle precedenti. +% \end{test} \columnbreak +% \item Un'automobile sta viaggiando alla velocità $v_0$ lungo una strada +% rettilinea. A un certo istante $t_0$ comincia ad accelerare e +% raggiunge la velocità $v$ all'istante~$t$. Calcola: +% \begin{itemize}[leftmargin=*] +% \item l'accelerazione media dell'automobile; +% \item lo spazio percorso in fase di accelerazione. +% \end{itemize} +% \end{esercizi} +% \end{multicols} +% \end{riquadro} +% +% L'esempio mostra anche come usare il comando +% \lstinline|\setlength{\columnsep}|\verb|{|\meta{valore}\verb|}| per +% impostare lo spazio di separazione tra le colonne. Questo comando e tutto +% l'ambiente \env{multicols} vanno racchiusi tra parentesi graffe, +% in modo che lo spazio di separazione impostato abbia +% effetto solo sull'ambiente multicolonna corrente. Se lo si desidera, si può +% far apparire una linea di separazione tra le colonne con +% \lstinline|\setlength{\columnseprule}{.4pt}|. +% +% \section{Strumenti} +% +% \subsection{Vero o falso} +% +% Se la lingua selezionata per il documento è l'italiano o un'altra lingua +% diversa dall'inglese, il comando \lstinline|\vf| stampa alla fine della riga +% corrente le box {\small \biglabelbox{V}~\biglabelbox{F}}. Se +% invece la lingua selezionata è l'inglese (per l'intero documento o solo +% per una parte, dopo \lstinline|\selectlanguage{english}| o all'interno +% dell'ambiente \verb|otherlanguage|) +% stampa {\small \biglabelbox{T}~\biglabelbox{F}}. +% +% Questo comando è utile per test con brevi domande vero/falso. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} +\item Stabilisci se le seguenti affermazioni sono vere o false. +\begin{enumerate}[a)] + \item La derivata di $3x^2$ è $6x$. \vf + \item $7+3=11$. \vf + \item Una soluzione di $x^2-1=0$ è $1$. \vf + \item Il lavoro di una forza costante $\vec{F}$ relativo allo spostamento + $\vec{s}$ è dato dal prodotto scalare $\vec{F}\cdot\vec{s}$. \vf +\end{enumerate} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Stabilisci se le seguenti affermazioni sono vere o false. +% \begin{enumerate}[a)] +% \item La derivata di $3x^2$ è $6x$. \vf +% \item $7+3=11$. \vf +% \item Una soluzione di $x^2-1=0$ è $1$. \vf +% \item Il lavoro di una forza costante $\vec{F}$ relativo allo spostamento +% $\vec{s}$ è dato dal prodotto scalare $\vec{F}\cdot\vec{s}$. \vf +% \end{enumerate} +% \end{esercizi} +% \end{riquadro} +% Come si vede, se la frase è troppo lunga e raggiunge il margine destro, +% il risultato è insoddisfacente. Per rimediare all'inconveniente viene definito +% il comando \lstinline|\verofalso|\verb|{|\meta{testo}\verb|}|, che interrompe +% il testo al~$75\%$ della lunghezza della linea e pone automaticamente +% {\small \biglabelbox{V}~\biglabelbox{F}} alla fine dell'ultima +% riga. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} +\item Stabilisci se le seguenti affermazioni sono vere o false. +\begin{enumerate}[a)] + \item La derivata di $3x^2$ è $6x$. \vf + ... + \item \verofalso{Il lavoro di una forza costante $\vec{F}$ relativo allo + spostamento $\vec{s}$ è dato dal prodotto scalare + $\vec{F}\cdot\vec{s}$.} + \item \verofalso{Siano $f$ e $g$ due funzioni reali di variabile reale + aventi lo stesso dominio. Se esse sono entrambe pari oppure entrambe + dispari allora $fg$ è una funzione pari; se una di esse è dispari + allora $fg$ è una funzione dispari.} +\end{enumerate} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Stabilisci se le seguenti affermazioni sono vere o false. +% \begin{enumerate}[a)] +% \item La derivata di $3x^2$ è $6x$. \vf +% \item $7+3=11$. \vf +% \item Una soluzione di $x^2-1=0$ è $1$. \vf +% \item \verofalso{Il lavoro di una forza costante $\vec{F}$ relativo allo +% spostamento $\vec{s}$ è dato dal prodotto scalare +% $\vec{F}\cdot\vec{s}$.} +% \item \verofalso{Siano $f$ e $g$ due funzioni reali di variabile reale +% aventi lo stesso dominio. Se esse sono entrambe pari oppure +% entrambe dispari allora $fg$ è una funzione pari; se una di esse +% è dispari allora $fg$ è una funzione dispari.} +% \end{enumerate} +% \end{esercizi} +% \end{riquadro} +% +% Se anziché al $75\%$ si vuole interrompere la riga a una percentuale +% diversa, si può scegliere il fattore di scala desiderato (riferito a $1$) +% come opzione dello stesso comando: +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\verofalso[?*\meta{\textrm{fattore di scala}}*)]{?*\meta{\textrm{testo}}*)} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% Nell'esempio che segue impostiamo l'interruzione all'$85\%$ della lunghezza +% della riga. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} +\item Stabilisci se le seguenti affermazioni sono vere o false. +\begin{enumerate}[a)] + \item \verofalso[.85]{Il lavoro di una forza costante $\vec{F}$ relativo + allo spostamento $\vec{s}$ è dato dal prodotto scalare + $\vec{F}\cdot\vec{s}$.} + \item \verofalso[.85]{Siano $f$ e $g$ due funzioni reali di variabile reale + aventi lo stesso dominio. Se esse sono entrambe pari oppure entrambe + dispari allora $fg$ è una funzione pari; se una di esse è dispari + allora $fg$ è una funzione dispari.} +\end{enumerate} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Stabilisci se le seguenti affermazioni sono vere o false. +% \begin{enumerate}[a)] +% \item \verofalso[.85]{Il lavoro di una forza costante $\vec{F}$ relativo +% allo spostamento $\vec{s}$ è dato dal prodotto scalare +% $\vec{F}\cdot\vec{s}$.} +% \item \verofalso[.85]{Siano $f$ e $g$ due funzioni reali di variabile +% reale aventi lo stesso dominio. Se esse sono entrambe pari oppure +% entrambe dispari allora $fg$ è una funzione pari; se una di esse è +% dispari allora $fg$ è una funzione dispari.} +% \end{enumerate} +% \end{esercizi} +% \end{riquadro} +% +% Infine, se si vuole impostare definitivamente un fattore di scala per +% l'\emph{intero} documento, si può inserire nel preambolo o all'inizio del +% testo il comando: +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\fattorevf{?*\meta{\textrm{fattore di scala}}*)} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% dove \meta{fattore di scala} deve essere un numero compreso tra $0$ e $1$. +% +% \subsection{Righe per scrivere le risposte} +% +% Viene definito il comando: +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\riga{?*\meta{\textrm{numero di righe}}*)} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% che stampa delle righe punteggiate ben spaziate verticalmente, su +% cui il candidato può scrivere manualmente (tante righe quante +% indicate nell'argomento). +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} + \item Enuncia il teorema di Pitagora.\par\riga{3} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Enuncia il teorema di Pitagora.\par\riga{3} +% \end{esercizi} +% \vspace{.2em} +% \end{riquadro} +% Se si omette \lstinline|\par| (che fa andare a capo e iniziare un +% nuovo capoverso) e si inserisce il comando di seguito al testo, la prima riga +% viene stampata dalla posizione corrente fino al margine destro. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} + \item Enuncia il teorema di Pitagora. \riga{3} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Enuncia il teorema di Pitagora. \riga{3} +% \end{esercizi} +% \vspace{.2em} +% \end{riquadro} +% +% \subsection{Completamenti} +% +% Se un esercizio consiste nel completamento di un testo con alcune parole +% chiave, è possibile usare i comandi \lstinline|\dotword| e +% \lstinline|\dotrule|. Il primo produce una linea punteggiata di lunghezza +% doppia della parola racchiusa come argomento (cioè la parola esatta che lo +% studente dovrebbe inserire), mentre il secondo produce una linea punteggiata +% di lunghezza data nell'argomento. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} + \item \emph{Completa il seguente enunciato.} La potenza di + \dotword{potenza} è una potenza che ha per \dotword{base} + la stessa base e per \dotword{esponente} il \dotword{prodotto} + degli esponenti. +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item \emph{Completa il seguente enunciato.} La potenza di +% \dotword{potenza} è una potenza che ha per \dotword{base} la stessa +% base e per \dotword{esponente} il \dotword{prodotto} degli esponenti. +% \end{esercizi} +% \end{riquadro} +% Notiamo che in questo modo il file sorgente rende possibile la lettura +% esplicita delle parole esatte, con un notevole vantaggio per la chiarezza. +% +% Se è necessario aumentare lo spazio tra una riga e l'altra, si può usare +% \lstinline|\doublespacing| (dal pacchetto \pack{setspace}, caricato in +% automatico). Per ripristinare l'impostazione iniziale, basta inserire +% \lstinline|\par\singlespacing|, come nell'esempio seguente. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} + \item \doublespacing\emph{Completa il seguente enunciato.} La potenza di + \dotword{potenza} è una potenza che ha per \dotword{base} la + stessa base e per \dotword{esponente} il \dotword{prodotto} degli + esponenti. \par\singlespacing +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item \doublespacing\emph{Completa il seguente enunciato.} La potenza di +% \dotword{potenza} è una potenza che ha per \dotword{base} la stessa base +% e per \dotword{esponente} il \dotword{prodotto} degli esponenti. +% \par\singlespacing +% \end{esercizi} +% \end{riquadro} +% +% Riproponiamo lo stesso esempio usando il comando \lstinline|\dotrule{4cm}|, +% che produce linee punteggiate lunghe $4\unit{cm}$. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} + \item \doublespacing\emph{Completa il seguente enunciato.} La potenza di + \dotrule{4cm} è una potenza che ha per \dotrule{4cm} la stessa base + e per \dotrule{4cm} il \dotrule{4cm} degli esponenti. + \par\singlespacing +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item \doublespacing\emph{Completa il seguente enunciato.} La potenza di +% \dotrule{4cm} è una potenza che ha per \dotrule{4cm} la stessa base +% e per \dotrule{4cm} il \dotrule{4cm} degli esponenti. +% \par\singlespacing +% \end{esercizi} +% \end{riquadro} +% +% \section{Punteggio} +% +% \subsection{Comandi per inserire il punteggio} +% +% Se si desidera assegnare un punteggio ad ogni esercizio, è possibile +% utilizzare il comando: +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\punti[?*\meta{\textrm{testo aggiuntivo}}*)]{?*\meta{\textrm{punteggio}}*)} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% Esso stampa il punteggio relativo all'esercizio, allineandolo al margine +% destro sulla riga corrente. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} +\item Data la retta $y=2x$, scrivi l'equazione di una sua + perpendicolare. \punti{10} +\item Data la retta $y=3x-1$, calcola l'equazione della retta per $A$ ad essa + parallela. \punti{10} +\item Data la circonferenza di equazione $x^2+y^2-3x+y-2=0$, determina + le coordinate ?*\texttt{del}*) centro, il suo raggio e calcola la + lunghezza della circonferenza. \punti{20} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Data la retta $y=2x+1$, scrivi l'equazione di una sua +% perpendicolare. \punti{10} +% \item Data la retta $y=3x-1$, calcola l'equazione della retta per $A$ ad essa +% parallela. \punti{10} +% \item Data la circonferenza di equazione $x^2+y^2-3x+y-2=0$, determina +% le coordinate del centro, il suo raggio e calcola la lunghezza +% della circonferenza. \punti{20} +% \end{esercizi} +% \end{riquadro} +% Se lo spazio disponibile sulla riga non fosse sufficiente, il punteggio viene +% scritto automaticamente nella riga successiva. +% +% L'opzione \meta{testo aggiuntivo} serve per specificare eventuali +% informazioni da stampare dopo il punteggio. Ciò +% può essere utile ad esempio per indicare uno stesso punteggio per più +% esercizi. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} +\item Risolvi le seguenti equazioni. \punti[per ogni equazione]{10} + \begin{enumerate}[a),itemsep=.5em] + \item $\dss{x^2-3x=1}$ + \item $\dss{2x+1=4x^2-3}$ + \end{enumerate} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Risolvi le seguenti equazioni. \punti[per ogni equazione]{10} +% \begin{enumerate}[a),itemsep=.5em] +% \item $\dss{x^2-3x=1}$ +% \item $\dss{2x+1=4x^2-3}$ +% \end{enumerate} +% \end{esercizi} +% \end{riquadro} +% +% Nel caso particolare in cui si volesse stampare il punteggio alla stessa +% altezza di una formula in display, è possibile inserirlo come argomento +% del comando \lstinline|\tag*|. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi} +\item Disegna la parabola di equazione + \[ + x=-\frac{1}{2}x^2-x+1 \tag*{\punti{5}} + \] +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Disegna la parabola di equazione +% \[ +% y=-\frac{1}{2}x^2-x+1 \tag*{\punti{5}} +% \] +% \end{esercizi} +% \end{riquadro} +% +% \subsection{Varianti per il punteggio} +% +% \makeatletter +% +% Esistono due varianti per la stampa del punteggio, utilizzabili anche +% simultaneamente. +% +% La prima si ottiene mediante il comando-dichiarazione +% \lstinline|\puntiadestra|, che imposta la stampa del valore numerico del +% punteggio prima della dicitura ``\textsc{Punti}''. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\puntiadestra +\begin{esercizi} + \item Scrivi l'equazione di una retta parallela all'asse $y$. \punti{5} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Scrivi l'equazione di una retta parallela all'asse $y$. \punti@dx{5} +% \end{esercizi} +% \end{riquadro} +% +% La seconda si ottiene col comando-dichiarazione \lstinline|\puntipt|, che +% sostituisce alla scritta ``\textsc{Punti}'' l'abbreviazione ``\textsc{Pt.}'' +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\puntipt +\begin{esercizi} + \item Scrivi l'equazione di una retta parallela all'asse $y$. \punti{5} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi}\renewcommand{\@punteggio}{Pt.} +% \item Scrivi l'equazione di una retta parallela all'asse $y$. \punti{5} +% \end{esercizi} +% \end{riquadro} +% Combinando le due dichiarazioni si ha: +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\puntiadestra\puntipt +\begin{esercizi} + \item Scrivi le equazioni di due rette parallele + all'asse $y$. \punti[per ogni retta]{5} +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi}\renewcommand{\@punteggio}{Pt.} +% \item Scrivi le equazioni di due rette parallele +% all'asse $y$. \punti@dx[per ogni retta]{5} +% \end{esercizi} +% \end{riquadro} +% +% \makeatother +% +% \subsection{Il riquadro del punteggio totale} +% +% Se lo si desidera, è possibile stampare un riquadro in cui inserire il +% punteggio totale della verifica, specificando il calcolo del voto finale. +% Il comando, da dare al di fuori dell'ambiente \texttt{esercizi},~è +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\totpunti +\end{lstlisting} +%\iffalse +%</example> +%\fi +% Esso produce, in fondo alla pagina e allineato al margine destro, il +% riquadro seguente: +% \begin{riquadro} +% \vartotpunti +% \end{riquadro} +% +% L'impostazione di default prevede che il punteggio massimo totalizzabile +% sia $90$ punti e che il voto (in decimi) sia calcolato tramite la formula +% \[ +% \text{Voto} = \text{Punteggio totalizzato}/10+1 +% \] +% Per impostare un calcolo diverso, basta inserirlo come argomento opzionale di +% \lstinline|\totpunti|. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{document} +\begin{esercizi} +... +\end{esercizi} +\totpunti[/12+2] +\end{document} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \totpunti[/12+2] +% \end{riquadro} +% +% La variante \lstinline|\vartotpunti| produce lo stesso riquadro senza +% spostarlo in fondo alla pagina. In questo modo risulta possibile +% posizionare un altro oggetto appena prima del riquadro stesso +% (ad esempio una tabella dei punteggi ottenuti), inserendo manualmente +% eventuali comandi~\lstinline|\vfill|. +% +% \section{Miscellanea} +% +% \subsection{Le frazioni doppie} +% +% Le frazioni ``doppie'' (frazioni di frazioni) non vengono rese in modo +% ottimale con i comandi standard di \LaTeX. Si noti come il codice +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\[ + \frac{\dfrac{3}{2}+\dfrac{4}{3}}{\dfrac{5}{7}+\dfrac{8}{17}+1} +\] +\end{lstlisting} +%\iffalse +%</example> +%\fi +% produca frazioni non ben distanziate dalla linea di frazione principale: +% \[ +% \frac{\dfrac{3}{2}+\dfrac{4}{3}}{\dfrac{5}{7}+\dfrac{8}{17}+1} +% \] +% Per rimediare, la classe \pack{verifica} mette a disposizione i comandi +% \lstinline|\ddfrac|, \lstinline|\numfrac| e \lstinline|\denfrac|. Il primo +% imposta la frazione principale, con una linea leggermente +% sporgente; il secondo e il terzo servono per inserire frazioni al numeratore +% e al denominatore distanziate dalla linea di frazione principale. +% In presenza di più frazioni al numeratore o al denominatore, è sufficiente +% usare questi comandi solo per la prima e inserire le successive +% con \lstinline|\frac|. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\[ + \ddfrac{\numfrac{3}{2}+\frac{4}{3}}{\denfrac{5}{7}+\frac{8}{17}+1} \qquad + \ddfrac{\numfrac{3}{2}+2+\frac{1}{3}}{4} \qquad + \ddfrac{4}{\denfrac{1}{2}+\frac{2}{7}} +\] +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \[ +% \ddfrac{\numfrac{3}{2}+\frac{4}{3}}{\denfrac{5}{7}+\frac{8}{17}+1} \qquad +% \ddfrac{\numfrac{3}{2}+2+\frac{1}{3}}{4} \qquad +% \ddfrac{4}{\denfrac{1}{2}+\frac{2}{7}} +% \] +% \end{riquadro} +% +% \subsection{La virgola intelligente} +% +% Se viene caricato il pacchetto \pack{babel} con l'opzione \opt{italian}, +% viene attivata automaticamente la virgola intelligente da esso definita. +% In questo modo sarà possibile scrivere agevolmente i numeri decimali con +% la virgola come separatore. Ricordardiamo che nel caso si voglia usare la +% virgola come simbolo di interpunzione in modalità matematica, è necessario +% lasciare uno spazio dopo di essa. Gli esempi proposti illustrano il +% funzionamento della virgola intelligente. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\usepackage[italian]{babel} +... +Il rapporto fra la circonferenza e il diametro è dato da +\[ + \pi=3,14159\ldots +\] +Siano poi $A(3, 4)$ e $B(-2, 1)$ gli estremi di un segmento\ldots +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% Il rapporto fra la circonferenza e il diametro è dato da +% \[ +% \pi=3,14159\ldots +% \] +% Siano poi $A(3, 4)$ e $B(-2, 1)$ gli estremi di un segmento\ldots +% \end{riquadro} +% Insistiamo nel ribadire che se non vengono lasciati spazi dopo la virgola, si +% possono ottenere scritture errate: \lstinline|$A(3,4)$| e +% \lstinline|$B(-2,1)$| producono rispettivamente $A(3,4)$ e $B(-2,1)$. Se però +% dopo la virgola viene inserito un carattere non numerico (ad esempio un meno), +% la spaziatura risulta comunque corretta. +% +% Per disattivare e riattivare manualmente la virgola +% intelligente basta inserire nel testo le dichiarazioni +% \lstinline|\NoIntelligentComma| e \lstinline|\IntelligentComma|. +% +% \subsection{Soprassegno per gli archi} +% +% Viene definito il comando \lstinline|\arc| che pone il soprassegno arrotondato +% per indicare gli archi. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +Si consideri l'arco $\arc{AB}$ e la corrispondente corda di +misura $\overline{AB}=15$. +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% Si consideri l'arco $\arc{AB}$ e la corrispondente corda di +% misura $\overline{AB}=15$. +% \end{riquadro} +% +% Viene definita inoltre una variante \lstinline|\vararc|, qualora si preferisca +% un soprassegno per gli archi più marcato. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +Si consideri l'arco $\vararc{AB}$ e la corrispondente corda di +misura $\overline{AB}=15$. +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% Si consideri l'arco $\vararc{AB}$ e la corrispondente corda di misura +% $\overline{AB}=15$. +% \end{riquadro} +% +% \subsection{Unità di misura} +% +% Se viene caricato il pacchetto \pack{babel} con l'opzione \opt{italian}, +% viene attivata automaticamente la dichiarazione \lstinline|\setISOcompliance|, +% che consente di scrivere le unità di misura in modalità matematica tramite il +% comando \lstinline|\unit|. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\usepackage[italian]{babel} +... +\begin{esercizi} +\item Un'automobile sta viaggiando a $20\unit{m/s}$ lungo una strada + rettilinea. Ad un certo istante comincia ad aumentare la sua + velocità con accelerazione costante $a=4,5\unit{m/s^2}$. Quale + velocità avrà dopo $10\unit{s}$? +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi} +% \item Un'automobile sta viaggiando a $20\unit{m/s}$ lungo una strada +% rettilinea. Ad un certo istante comincia ad aumentare la sua velocità +% con accelerazione costante $a=4,5\unit{m/s^2}$. Quale velocità avrà +% dopo $10\unit{s}$? +% \end{esercizi} +% \end{riquadro} +% In particolare, il simbolo dei gradi può essere inserito direttamente da +% tastiera\footnote{Ciò è reso possibile grazie al pacchetto +% \pack{newunicodechar}.}, mentre il simbolo~$\micro$ (prefisso di \emph{micro} +% nelle unità di misura) è prodotto dal comando \lstinline|\micro|. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +L'angolo $\alpha$ misura $30°$. La temperatura della stanza è di $22\unit{°C}$. +Consideriamo una distanza di $2,0\unit{\micro m}$. +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% L'angolo $\alpha$ misura $30°$. La temperatura della stanza è di $22\unit{°C}$. +% Consideriamo una distanza di $2,0\unit{\micro m}$. +% \end{riquadro} +% +% Infine, segnaliamo che è possibile caricare il pacchetto \pack{siunitx} per +% la gestione e la scrittura delle unità di misura. In tal caso, però, non deve +% essere \emph{mai} usato nel documento il comando~\lstinline|\unit|, altrimenti +% \LaTeX\ produrrebbe un errore. +% +% Se viene selezionata una lingua diversa dall'italiano, il comando +% \lstinline|\unit| non è attivo. In questo caso si può utilizzare il comando +% \lstinline|\unitx|, che nei casi più semplici consente di ottenere le +% stesse funzionalità di \lstinline|\unit|. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\begin{esercizi}\selectlanguage{english} + \item The Gravitational constant is approximately + $6.67\times 10^{-11}\unitx{?*\texttt{N}*)\cdot m^2/kg^2}$. \vf +\end{esercizi} +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \begin{esercizi}\selectlanguage{english} +% \item The Gravitational constant is approximately +% $6.67\times 10^{-11}\unitx{N\cdot m^2/kg^2}$. \vf +% \end{esercizi}\selectlanguage{italian} +% \end{riquadro} +% +% \subsection{Definizioni abbreviate} +% +% Elenchiamo nella tabella~\ref{tab:def-abbr} alcune definizioni di comandi +% abbreviati. +% +% \begin{table}[htbp] +% \centering +% \begin{tabular}{ccc} +% \toprule +% \textbf{Simbolo} & \textbf{\LaTeX} & \textbf{\pack{verifica}} \\ +% \midrule +% $\delta$ & {\lstinline|\delta|} & {\lstinline|\del|} \\ +% $\Delta$ & {\lstinline|\Delta|} & {\lstinline|\Del|} \\ +% $\varepsilon$ & {\lstinline|\varepsilon|} & {\lstinline|\eps|} \\ +% $\mathbb{N}$ & {\lstinline|\mathbb|\verb|{N}|} & {\lstinline|\N|} \\ +% $\mathbb{Z}$ & {\lstinline|\mathbb|\verb|{Z}|} & {\lstinline|\Z|} \\ +% $\mathbb{Q}$ & {\lstinline|\mathbb|\verb|{Q}|} & {\lstinline|\Q|} \\ +% $\mathbb{R}$ & {\lstinline|\mathbb|\verb|{R}|} & {\lstinline|\R|} \\ +% \bottomrule +% \end{tabular} +% \caption{Definizioni abbreviate di alcuni comandi.}\label{tab:def-abbr} +% \end{table} +% I comandi \lstinline|\phi| e \lstinline|\theta| vengono ridefiniti per +% produrre $\phi$ e $\theta$ (come \lstinline|\varphi| e \lstinline|\vartheta|). +% Per ripristinare i comandi originari basta dare le dichiarazioni +% \lstinline|\restorephi| e \lstinline|\restoretheta|. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +Di default sono definiti $\phi$ e $\theta$, ma si possono ripristinare +\restorephi\restoretheta in modo che appaiano $\phi$ e $\theta$. +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% Di default sono definiti $\phi$ e $\theta$, ma si possono ripristinare in modo +% che appaiano \makeatletter$\@tempvarphi$ e $\@tempvartheta$\makeatother. +% \end{riquadro} +% +% Il valore assoluto si ottiene col comando \lstinline|\abs|, definito +% seguendo le indicazioni della documentazione del pacchetto \pack{mathtools}. +% Il suo utilizzo è mostrato di seguito. +%\iffalse +%<*example> +%\fi +\begin{lstlisting} +\[ + \abs{x} \qquad \abs[\bigg]{\frac{x+2}{x-1}} +\] +\end{lstlisting} +%\iffalse +%</example> +%\fi +% \begin{riquadro} +% \[ +% \abs{x} \qquad \abs[\bigg]{\frac{x+2}{x-1}} +% \] +% \end{riquadro} +% +% \newgeometry{text={355.0pt,598.0pt},centering} +% \addtolength\marginparwidth{30pt} +% \addtolength\oddsidemargin{20pt} +% \addtolength\evensidemargin{20pt} +% +% \StopEventually{\PrintIndex} +% \selectlanguage{english} +% \section{Implementation} +% \subsection{Class options} +% +% We define new conditionals for class options: \cs{if@blacktriangleright} is +% true by default and sets the \env{itemize} label symbol; \cs{if@intestrighe} +% and \cs{if@intestsemplice} are true if we choose the document heading +% ``with lines'' or ``plain'', respectively; \cs{if@extrasize} is true if we set +% the font size to $14\unitx{pt}$; \cs{if@senzagrazie} is true if we choose the +% sans serif font (\pack{cmbright} package). +%\iffalse +%<*class|package> +%\fi +% \begin{macrocode} +\newif\if@blacktriangleright +\newif\if@intestrighe +\newif\if@intestsemplice +\newif\if@extrasize +\newif\if@senzagrazie +% \end{macrocode} +%\iffalse +%</class|package> +%\fi +%\iffalse +%<*class> +%\fi +% Now, we define the class options and set \cs{@blacktrianglerighttrue} by +% default. +% \begin{macrocode} +\DeclareOption{10pt}{\def\ver@ptsize{0}} +\DeclareOption{11pt}{\def\ver@ptsize{1}} +\DeclareOption{12pt}{\def\ver@ptsize{2}} +\DeclareOption{14pt}{\@extrasizetrue} +\DeclareOption{default}{\@blacktrianglerighttrue} +\DeclareOption{itembullet}{\@blacktrianglerightfalse} +\DeclareOption{intestazionerighe}{\@intestrighetrue} +\DeclareOption{intestazionesemplice}{\@intestsemplicetrue} +\DeclareOption{senzagrazie}{\@senzagrazietrue} +% \end{macrocode} +% The option \opt{11pt} is added by default. +% \begin{macrocode} +\ExecuteOptions{default,11pt} +\ProcessOptions +% \end{macrocode} +% If the option \opt{extrasize} is chosen, the conditional \cs{if@extrasize} is +% true and the \pack{extarticle} class will be loaded with the options +% \opt{a4paper} and \opt{14pt}. Otherwise, the \pack{article} class will be +% loaded with the option \opt{a4paper} and the font size set by the user +% (default \opt{11pt}). +% \begin{macrocode} +\if@extrasize + \LoadClass[a4paper,14pt]{extarticle} +\else + \LoadClass[a4paper,1\ver@ptsize pt]{article} +\fi +% \end{macrocode} +%\iffalse +%</class> +%\fi +%\iffalse +%<*package> +%% ------------------------------------------------------------------------------ +%% Questo file .sty è destinato esclusivamente alla documentazione della +%% classe `verifica'. Il supporto non verrà garantito. +%% +%% This .sty file is meant only for the documentation of the `verifica' class. +%% Support will not be guaranteed. +%% ------------------------------------------------------------------------------ +%</package> +%\fi +%\iffalse +%<*class|package> +%\fi +% Below is the list of packages loaded by the \pack{verifica} class. +% \begin{macrocode} +\RequirePackage[shortlabels,inline]{enumitem} +\RequirePackage{graphicx} +\RequirePackage{mathtools} +\RequirePackage{amssymb} +\RequirePackage{geometry} +\RequirePackage{nccmath} +\RequirePackage{multido} +\RequirePackage{setspace} +\RequirePackage{multicol} +\RequirePackage{gensymb} +\RequirePackage{newunicodechar} +\RequirePackage{textcomp} +\RequirePackage{eurosym} +\RequirePackage{tabto} +\RequirePackage{tabularx} +\RequirePackage[running]{lineno} +% \end{macrocode} +%\iffalse +%</class|package> +%\fi +% Margins are set using the \pack{geometry} package. We also set the page +% style to \opt{empty}. +%\iffalse +%<*class> +%\fi +% \begin{macrocode} +\geometry{top=1cm,bottom=1.5cm,left=1.5cm,right=1.5cm} +\pagestyle{empty} +% \end{macrocode} +% If the option \opt{senzagrazie} is chosen, then the \pack{cmbright} package is +% loaded, so we have a sans serif font. The control sequence \cs{AtBeginDocument} +% causes the \pack{cmbright} package to be loaded after all other packages. +% \begin{macrocode} +\if@senzagrazie + \AtBeginDocument{% + \RequirePackage{cmbright} +} +\fi +% \end{macrocode} +%\iffalse +%</class> +%\fi +%\iffalse +%<*class|package> +%\fi +% The following lines contain various commands which must be placed at the +% beginning of the document, through the \cs{AtBeginDocument} command. If the +% \pack{babel-italian} package is loaded, then |\setISOcompliance| and +% |\IntelligentComma| will be activated. +% \begin{macrocode} +\AtBeginDocument{% +\@ifpackagewith{babel}{italian}{% + \setISOcompliance + \IntelligentComma +\relax}{} +% \end{macrocode} +% If the \pack{cmbright} package is loaded, the following declaration fixes the +% font for the bold-math mode, used in conjunction with the \pack{bm} package. +% Otherwise, we will get the ``poor man bold''. +% \begin{macrocode} +\@ifpackageloaded{cmbright}{% + \SetSymbolFont{operators}{bold}{OT1}{cmbr}{b}{n} +\relax}{} +% \end{macrocode} +% The \pack{bm} package will be loaded after all the other packages (in +% particular after \pack{cmbright}). +% \begin{macrocode} +\RequirePackage{bm} +% \end{macrocode} +% \begin{macro}{\restorephi} +% \begin{macro}{\restoretheta} +% We redefine the \cs{phi} and \cs{theta} commands to get \cs{varphi} and +% \cs{vartheta}. We copy the original definitions to \cs{@tempvarphi} and +% \cs{@tempvartheta} for restoring them eventually through the \cs{restorephi} +% and \cs{restoretheta} commands. +% \end{macro} +% \end{macro} +% \begin{macrocode} +\let\@tempvarphi\phi +\let\@tempvartheta\theta +\renewcommand{\phi}{\varphi} +\renewcommand{\theta}{\vartheta} +\newcommand{\restorephi}{\renewcommand{\phi}{\@tempvarphi}} +\newcommand{\restoretheta}{\renewcommand{\theta}{\@tempvartheta}} +} +% \end{macrocode} +%\iffalse +%</class|package> +%\fi +%\iffalse +%<*class|package> +%\fi +% \begin{macro}{\abs} +% The next definition of the ``absolute value'' command is taken from the +% documentation of the \pack{mathtools} package. +% \end{macro} +% \begin{macrocode} +\DeclarePairedDelimiter\abs{\lvert}{\rvert} +% \end{macrocode} +% +% \subsection{The document heading} +% +% The following lines are related to the construction of the document heading. +% First, we define the markup commands that pass their arguments to the internal +% macros. Every command is set to a default value, except \cs{@classe} and +% \cs{@tempo}, which are undefined. +% \begin{macrocode} +\def\@tipologia{verifica} + \newcommand{\tipologia}[1]{\def\@tipologia{#1}} +\def\@disciplina{matematica} + \newcommand{\disciplina}[1]{\def\@disciplina{#1}} +\def\@istituto{Liceo ``G. Novello'' -- Codogno} + \newcommand{\istituto}[1]{\def\@istituto{#1}} +\def\@data{\today} + \newcommand{\data}[1]{\def\@data{#1}} +\let\@classe\undefined + \newcommand{\classe}[1]{\def\@classe{Classe~#1}} +\let\@tempo\undefined + \newcommand{\tempo}[1]{\def\@tempo{#1}} +% \end{macrocode} +% \begin{macro}{\intestazionedefault} +% We define the default heading. It consists of two \env{tabular} environments, +% side by side, stored in the control sequences \cs{@tabellauno} and +% \cs{@tabelladue}. The first contains information about the discipline, the +% typology of the test, the institute name and the date. The second contains an +% empty space (which must be filled in by the candidate's name) and the class +% (eventually empty), if defined. The length of the two tables are stored in +% \cs{@prima} and \cs{@seconda}. The length of \cs{@tabelladue} depends on the +% length of \cs{@tabellauno}. We use the \pack{calc} package, which is loaded by +% the \pack{mathtools} package, to determine the width of \cs{@tabellauno} +% (through the \cs{widthof} command). If \cs{tempo} is defined, the time +% available for the test will be printed. +% \begin{macrocode} +\newlength{\@prima} +\newlength{\@seconda} +\def\intestazionedefault{% + \def\@tabellauno{% + \begin{tabular}{|c|} + \hline \\[-.2cm] + \textbf{\MakeUppercase{\@tipologia} DI \MakeUppercase{\@disciplina}}\\[.2cm] + \textbf{\@istituto}\\[.2cm] + \textbf{\@data}\\[.2cm] + \hline + \end{tabular}} + \setlength{\@prima}{\widthof{\@tabellauno}} + \setlength{\@seconda}{\textwidth-\@prima-.7cm} + \ifdefined\@classe + \def\@@classe{\@classe} + \else + \def\@@classe{} + \fi + \def\@tabelladue{% + \begin{tabular}{|p{\@seconda}|} + \hline \\[-.2cm] + Cognome e nome \\[.2cm] + \\[.2cm] + \@@classe \\[.2cm] + \hline + \end{tabular}} + \ifdefined\@tempo + \def\tempo@ad{\begin{center}% + \textit{Tempo a disposizione: \@tempo}\end{center}} + \else + \def\tempo@ad{\vspace{.5cm}} + \fi +\noindent\@tabellauno\hfill\@tabelladue\tempo@ad} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\intestazionerighe} +% We define the second type of heading: ``intestazione con righe'' +% (``with lines''). It puts the information about the document between two +% horizontal lines. +% \begin{macrocode} +\def\intestazionerighe{% +\ifdefined\@classe + \def\@@classe{\@classe} +\else + \def\@@classe{} +\fi +\ifdefined\@tempo + \def\tempo@ad{{\centering% + \textit{Tempo a disposizione: \@tempo}\par}\vspace{.5em}} +\else + \def\tempo@ad{\vspace{.1em}} +\fi +\null\vspace{-1cm} +\noindent\hrulefill \\ +\noindent\makebox[.3\linewidth][l]{\small\@istituto} \hfill% +\makebox[.3\linewidth]{\@@classe} \hfill% +\makebox[.3\linewidth][r]{\small\@data}% +\begin{center} + \textbf{\MakeUppercase{\@tipologia} DI \MakeUppercase{\@disciplina}}\\[-.5em] + \hrulefill +\end{center} +\tempo@ad} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\intestazionesemplice} +% We define the third type of heading: ``intestazione semplice'' (``plain''). +% It is similar to the ``intestazione con righe'', but without the two horizontal +% lines. +% \begin{macrocode} +\def\intestazionesemplice{% +\ifdefined\@classe + \def\@@classe{\@classe} +\else + \def\@@classe{} +\fi +\ifdefined\@tempo + \def\tempo@ad{{\centering% + \textit{Tempo a disposizione: \@tempo}\par}\vspace{.5em}} +\else + \def\tempo@ad{\vspace{.1em}} +\fi +\noindent\makebox[.3\linewidth][l]{\small\@istituto} \hfill% +\makebox[.3\linewidth]{\@@classe} \hfill% +\makebox[.3\linewidth][r]{\small\@data}% +\begin{center} + \textbf{\MakeUppercase{\@tipologia} DI \MakeUppercase{\@disciplina}}\\[-.5em] +\end{center} +\tempo@ad} +% \end{macrocode} +% \end{macro} +%\iffalse +%</class|package> +%\fi +% \begin{macro}{\intestazione} +% The \cs{intestazione} command generates the document heading. +%\iffalse +%<*class> +%\fi +% \begin{macrocode} +\if@intestrighe + \def\intestazione{\intestazionerighe} +\else + \if@intestsemplice + \def\intestazione{\intestazionesemplice} + \else + \def\intestazione{\intestazionedefault} + \fi +\fi +% \end{macrocode} +% \end{macro} +%\iffalse +%</class> +%\fi +% +% \subsection{New commands} +% +%\iffalse +%<*class|package> +%\fi +% \begin{macro}{\tsa} +% \begin{macro}{\tso} +% Here are some definition of new commands. Thanks to the +% \pack{newunicodechar} package, we can type the character \texttt{\textdegree} +% to get the corresponding symbol directly. The commands \cs{tsa} and \cs{tso} +% produce the ordinal number symbols $\textsuperscript{a}$ and +% $\textsuperscript{o}$, followed by a thin space. +% \end{macro} +% \end{macro} +% \begin{macrocode} +\newunicodechar{°}{\ensuremath{^\circ}} +\newcommand{\tsa}{\textsuperscript{a}\,} +\newcommand{\tso}{\textsuperscript{o}\,} +% \end{macrocode} +% \begin{macro}{\eps} +% \begin{macro}{\del} +% \begin{macro}{\Del} +% \begin{macro}{\R} +% \begin{macro}{\Q} +% \begin{macro}{\Z} +% \begin{macro}{\N} +% \begin{macro}{\dss} +% The following lines define some useful abbreviation for some frequently +% used commands. +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macrocode} +\newcommand{\eps}{\varepsilon} +\newcommand{\del}{\delta} +\newcommand{\Del}{\Delta} +\newcommand{\R}{\mathbb{R}} +\newcommand{\Q}{\mathbb{Q}} +\newcommand{\Z}{\mathbb{Z}} +\newcommand{\N}{\mathbb{N}} +\newcommand{\dss}[1]{\displaystyle{#1}} +% \end{macrocode} +% \begin{macro}{\arc} +% The following code is taken from +% \url{https://tex.stackexchange.com/questions/96680#284787} (thanks to +% \textsf{egreg}). It defines a symbol to denote an arc. +% \end{macro} +% \begin{macrocode} +\DeclareFontFamily{U}{tipa}{} +\DeclareFontShape{U}{tipa}{m}{n}{<->tipa10}{} +\newcommand{\arc@char}{{\usefont{U}{tipa}{m}{n}\symbol{62}}} +\newcommand{\arc}[1]{\mathpalette\arc@arc{#1}} +\newcommand{\arc@arc}[2]{% + \sbox0{$\m@th#1#2$}% + \vbox{% + \hbox{\resizebox{\wd0}{\height}{\arc@char}} + \nointerlineskip + \box0 + } +} +% \end{macrocode} +% \begin{macro}{\vararc} +% Here is a variant of the same symbol (more marked). +% \end{macro} +% \begin{macrocode} +\DeclareFontFamily{OMX}{yhex}{} +\DeclareFontShape{OMX}{yhex}{m}{n}{<->yhcmex10}{} +\DeclareSymbolFont{yhlargesymbols}{OMX}{yhex}{m}{n} +\DeclareMathAccent{\vararc}{\mathord}{yhlargesymbols}{"F3} +% \end{macrocode} +% +% \begin{macro}{\ddfrac} +% \begin{macro}{\numfrac} +% \begin{macro}{\denfrac} +% We define the \cs{ddfrac} command for ``double'' fractions (fractions of +% fractions), with a slightly longer line. The \cs{numfrac} and \cs{denfrac} +% commands produce correct vertical spacing in double fractions. +% \begin{macrocode} +\newcommand\ddfrac[2]{\frac{\,\displaystyle #1\,}{\,\displaystyle #2\,}} +\newcommand\numfrac[2]{\frac{#1}{#2\mathstrut}} +\newcommand\denfrac[2]{\frac{\mathstrut#1}{#2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\unitx} +% If \pack{babel-italian} is not loaded or a different language is temporarily +% set for the document, the \cs{unit} command will not be available. In this +% case, the \cs{unitx} command can be used in place of \cs{unit}: the \cs{unitx} +% command is roughly similar to \cs{unit}. +% \end{macro} +% \begin{macrocode} +\newcommand{\unitx}[1]{\ensuremath{\,\mathrm{#1}}} +% \end{macrocode} +% By default, \cs{if@blacktriangleright} is true and the \env{itemize} label +% symbol is~{\small $\blacktriangleright$}. If the option \opt{itembullet} is +% chosen, \cs{if@blacktriangleright} is false and the \env{itemize} label symbol +% is~\textbullet. +% \begin{macrocode} +\if@blacktriangleright + \def\labelitemi{\small $\blacktriangleright$} +\fi +% \end{macrocode} +% +%\subsection{Test environments} +% +% \begin{macro}{\labelbox} +% \begin{macro}{\biglabelbox} +% We use the \pack{enumitem} package to define the main environment +% \env{esercizi} and various lists for multiple choice tests. +% By default, the label for the multiple choice test, stored in \cs{@risp}, +% consists of an alphabetical counter inside a squared framed box. +% There are two types of boxes: normal (\cs{labelbox}, used for multiple choice +% tests) and big (\cs{biglabelbox}, used for true/false tests). If the option +% \opt{senzagrazie} is set, the default style for the alphabetic counter is +% upright, otherwise is italic. If the option \opt{extrasize} is set, the size +% of these boxes increases. +% \begin{macrocode} +\if@senzagrazie + \def\@labelstyle{\textup} +\else + \def\@labelstyle{\textit} +\fi +\newcommand{\labelbox}[1]{\fbox{\parbox[][.2cm][c]{.2cm}{#1}}} +\newcommand{\biglabelbox}[1]{\fbox{\parbox[b][.25cm][c]{.25cm}{#1}}} +\if@extrasize + \renewcommand{\labelbox}[1]{\fbox{\parbox[][.3cm][c]{.3cm}{#1}}} + \renewcommand{\biglabelbox}[1]{\fbox{\parbox[b][.35cm][c]{.35cm}{#1}}} +\fi +\def\@risp{\labelbox{\@labelstyle{\alph*}}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{environment}{esercizi} +% \begin{environment}{test} +% \begin{environment}{test-orizz} +% \begin{macro}{\labeltest} +% We define the new lists \env{esercizi}, \env{test} and \env{test-orizz}. The +% last one is a ``horizontal'' list, that is, it's an inline \pack{enumitem} +% list. The \cs{labeltest} command allows us to change the label style of all +% test environments, even in the \opt{shortlabels} \pack{enumitem} mode. +% \begin{macrocode} +\newlist{esercizi}{enumerate}{1} + \setlist[esercizi]{\bfseries 1.,itemsep=2em,leftmargin=*} +\newlist{test}{enumerate}{1} + \setlist[test]{\@risp,leftmargin=*} +\newlist{test-orizz}{enumerate*}{1} + \setlist[test-orizz]{% + \@risp,before=\hspace{1em},itemjoin=\hspace{1.2em},afterlabel=~~} +\newcommand{\labeltest}[1]{% + \renewlist{test}{enumerate}{1} + \setlist[test]{#1,leftmargin=*} + \renewlist{test-orizz}{enumerate*}{1} + \setlist[test-orizz]{% + #1,before=\hspace{1em},itemjoin=\hspace{1.2em},afterlabel=~~} +} +% \end{macrocode} +% \end{macro} +% \end{environment} +% \end{environment} +% \end{environment} +% \begin{environment}{test-orizz-newline} +% The \env{test-orizz-newline} environment is similar to \env{test-orizz}, +% but multiple choices start on a new line. +% \begin{macrocode} +\newenvironment{test-orizz-newline}[1][]{% + \par\begin{test-orizz}[before=\noindent,#1]}{\end{test-orizz}} +% \end{macrocode} +% \end{environment} +% +% \subsection{True/False tools} +% +% \begin{macro}{\vf} +% We define tools for creating true/false tests. If the selected language is +% English, or the \pack{babel} package is not loaded, the \cs{vf} command +% generates the true/false boxes~{\small\biglabelbox{T}~\biglabelbox{F}}. +% Otherwise, it generates {\small\biglabelbox{V}~\biglabelbox{F}} (especially +% when the selected language is Italian). The boxes will be placed at the end of +% the current line. The \cs{vf} command is right for short questions (shorter +% than the line width). +% \end{macro} +% \begin{macrocode} +\newcommand{\vf}{% + \iflanguage{english}{% + \hfill{\small\biglabelbox{T}~\biglabelbox{F}}}{% + \hfill{\small\biglabelbox{V}~\biglabelbox{F}}}% +} +% \end{macrocode} +% Now, we define a more complex macro for creating long true/false questions. +% \begin{macro}{\fattorevf} +% The control sequence \cs{@fattorevf} contains the scale factor that determines +% the line break point. It is set by default to $0.75$. It can be changed +% using the \cs{fattorevf}\marg{scale factor} command, which takes as an argument +% a number from $0$ to $1$ and overwrites the previous value of \cs{@fattorevf}. +% If the argument is not a number between $0$ and $1$, we will get an error +% message. +% \begin{macrocode} +\def\@fattorevf{.75} +\def\@fattorevferror{% + \ClassError{verifica}{% + \protect\fattorevf\space deve avere come argomento + un numero compreso tra 0 e 1}{% + Riprova scrivendo \protect\fattorevf{.85} o qualcosa + di simile. Ciao ;) \MessageBreak}% +} +\newcommand{\fattorevf}[1]{% + \ifdim0pt<#1pt\relax + \ifdim1pt>#1pt\relax + \def\@fattorevf{#1} + \else + \@fattorevferror + \fi + \else + \@fattorevferror + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\CalcNumber} +% In the following lines we define the internal macro \cs{CalcNumber}, which +% counts the number of lines of a text. The text is put in a minipage of +% the same width as the current line, which in turn is placed in the +% \cs{@boxcountlines} savebox. The \pack{lineno} package allows us to determine +% the number of the lines of the text, which is stored in the \texttt{mylines} +% counter. +% +% This macro is taken +% from \url{https://tex.stackexchange.com/questions/402779#406791} (thanks to +% \textsf{user121799}). +% \begin{macrocode} +\newcounter{mylines} +\newsavebox{\@boxcountlines} +\newcommand{\CalcNumber}[2]{% +\savebox{\@boxcountlines}{% + \begin{minipage}{\linewidth}\linenumbers* + \begin{internallinenumbers} + #1\par + \setcounter{mylines}{\thelinenumber}\addtocounter{mylines}{-1} + \end{internallinenumbers} + \end{minipage}} + \let#2=\themylines +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\Repeat} +% The next macro is defined through the \pack{multido} package. It causes the +% repetition of the command that follows it as many times as specified by +% the argument. +% \begin{macrocode} +\newcommand{\Repeat}{\multido{\i=1+1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\verofalso} +% The macro \cs{verofalso}\oarg{scale factor}\marg{text} is defined to handle a +% long text in a true/false test. The mandatory argument is the text of a +% true/false question and the optional one is the scale factor for the line width +% (set by default by \cs{@fattorevf}). The macro puts the text in a +% \env{tabularx} environment (\pack{tabularx} package), within a cell of width +% equal to the resized line width, and passes it to the \cs{CalcNumber} macro, +% which counts the number of lines and stores this value in the counter \cs{myx}. +% Since this counting takes place in a cell, the current \cs{linewidth} +% is equal to the cell width. The \cs{numrighe} counter contains the number +% of \cs{newline} required to correctly position the true/false boxes within the +% second \env{tabularx} cell, at the same level as the last line of the +% question. +% \begin{macrocode} +\newcounter{numrighe} +\newcommand{\verofalso}[2][\@fattorevf]{% + \renewcommand{\tabcolsep}{0em}% + \begin{tabularx}{\linewidth}[b]{p{#1\linewidth}X}% + {#2}\CalcNumber{#2}{\myx}\setcounter{numrighe}{\myx-1}% + & \phantom{e}\Repeat{\value{numrighe}}\newline\phantom{e}\vf \\ + \end{tabularx} +} +% \end{macrocode} +% \end{macro} +% +% \subsection{Dotted lines} +% +% \begin{macro}{\dotrule} +% \begin{macro}{\dotword} +% The \cs{dotrule}\marg{length} command inserts a dotted line of length equal to +% its argument; the \cs{dotword}\marg{word} command inserts a dotted line that is +% twice the width of the word specified as an argument. +% \begin{macrocode} +\newcommand{\@leadersbox}{.45em} +\newcommand{\@tratto}{.} +\newcommand{\@completeleaders}{% + \leavevmode\leaders\hbox to \@leadersbox{\hss\@tratto\hss}\hfill\kern0pt} +\newcommand{\dotrule}[1]{% + \parbox[t]{#1}{\@completeleaders}} +\newcommand{\dotword}[1]{% + \parbox[t]{\widthof{#1} * \real{2}}{\@completeleaders}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\riga} +% The \cs{riga}\marg{number} command inserts dotted lines with double vertical +% spacing, as many as specified by the argument. It is defined through the +% \pack{multido} and \pack{setspace} packages. +% \begin{macrocode} +\newcommand{\@rigaleaders}{% + \leavevmode\leaders\hbox to \@leadersbox{\hss\@tratto\hss}\hfill\kern0pt\par} +\newcommand{\riga}[1]{% + \doublespacing\Repeat{#1}{\noindent\@rigaleaders}\singlespacing} +% \end{macrocode} +% \end{macro} +% +% \subsection{Scoring tools} +% +% \begin{macro}{\punti} +% The \cs{punti}\oarg{additional text}\marg{score} command places the score at +% the end of the current line. If there is not enough space at the end of the +% current line, the score will be automatically positioned at the end of a new +% line. If the optional argument is defined, an additional text will be written +% after the score, automatically separated by a non-breaking space. If the +% optional argument is missing, this non-breaking space disappears: this feature +% is made possibile by the macro described at +% \url{https://tex.stackexchange.com/questions/217757#217763} (thanks to +% \textsf{David~Carlisle}). +% \begin{macrocode} +\newcommand{\@punteggio}{Punti} +\newcommand{\punti}[2][\@nil]{% + \hfill\vphantom{,}\nolinebreak[1]\null~\hfill% + [\textsc{\@punteggio~#2% + \def\tmp{#1}% + \ifx\tmp\@nnil + \relax + \else + ~\mbox{#1}% + \fi}]% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\puntiadestra} +% This command can be placed anywhere in the document and simply prints +% the word ``Punti'' after the score. +% \begin{macrocode} +\newcommand{\punti@dx}[2][\@nil]{% + \hfill\vphantom{,}\nolinebreak[1]\null~\hfill% + [\textsc{#2~\@punteggio% + \def\tmp{#1}% + \ifx\tmp\@nnil + \relax + \else + ~\mbox{#1}% + \fi}]% +} +\def\puntiadestra{\renewcommand{\punti}{\punti@dx}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\puntipt} +% This command can also be placed anywhere in the document and replaces +% the word ``Punti'' with the abbreviation ``Pt.'' +% \begin{macrocode} +\def\puntipt{\renewcommand{\@punteggio}{Pt.}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\totpunti} +% The \cs{totpunti}\oarg{calculation} command creates a \env{tabular} +% environment at the end of the current page, which is used to write the total +% score and calculate the final grade. The optional calculation is set by +% default to $/10+1$ (the one I usually adopt), but it can be changed as +% desired. The optional argument will be automatically set in math mode. +% \begin{macrocode} +\newcommand{\totpunti}[1][/10 + 1]{% + \vfill + \begin{flushright} + {\renewcommand{\arraystretch}{1.5} + \begin{tabular}{|cc|} + \hline + & {\hspace{-7pt}\textbf{VOTO}} \\ + {\textbf{Totale punti} \fbox{\phantom{\LARGE MM}} $\bm{#1=}$}% + & \hspace{-7pt}\fbox{\phantom{\Huge MM}} \\ + \hline + \end{tabular}} + \end{flushright}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\vartotpunti} +% This command is similar to \cs{totpunti}, but it doesn't place the final score +% \env{tabular} environment at the end of the page. +% \begin{macrocode} +\newcommand{\vartotpunti}[1][/10 + 1]{% + \begin{flushright} + {\renewcommand{\arraystretch}{1.5} + \begin{tabular}{|cc|} + \hline + & {\hspace{-7pt}\textbf{VOTO}} \\ + {\textbf{Totale punti} \fbox{\phantom{\LARGE MM}} $\bm{#1=}$}% + & \hspace{-7pt}\fbox{\phantom{\Huge MM}} \\ + \hline + \end{tabular}} + \end{flushright}} +% \end{macrocode} +% \end{macro} +%\iffalse +%</class|package> +%\fi +% +% \Finale +\endinput diff --git a/macros/latex/contrib/verifica/verifica.ins b/macros/latex/contrib/verifica/verifica.ins new file mode 100644 index 0000000000..bd3b03ad2a --- /dev/null +++ b/macros/latex/contrib/verifica/verifica.ins @@ -0,0 +1,61 @@ +%% verifica.ins +%% Copyright 2020 Riccardo Dossena +%% +%% 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 2005/12/01 or later. +%% +%% Author: Riccardo Dossena +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% This work consists of all files listed in README +%% +%% --------------- start of docstrip commands ------------------ +%% +\input docstrip +\preamble + + Copyright 2020 Riccardo Dossena + + This program is provided under the terms of the + LaTeX Project Public License distributed from CTAN + archives in directory macros/latex/base/lppl.txt. + + Author: Riccardo Dossena + + This work has the LPPL maintenance status `maintained'. + +\endpreamble + +\keepsilent +\askforoverwritefalse + +\Msg{*** Generating the package files ***} +\generate{\file{verifica.cls}{\from{verifica.dtx}{class}} + \file{ver-doc.sty}{\from{verifica.dtx}{package}}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* verifica.cls} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation on verifica's code run} +\Msg{* the file ending with `.dtx' through (pdf)LaTeX. See the} +\Msg{* README file for more details.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endbatchfile diff --git a/macros/latex/contrib/verifica/verifica.pdf b/macros/latex/contrib/verifica/verifica.pdf Binary files differnew file mode 100644 index 0000000000..630e5abd14 --- /dev/null +++ b/macros/latex/contrib/verifica/verifica.pdf |