summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg
blob: a9c42402732e029f1467c83389580a6a58efda35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
%% Package `esami' to use with LaTeX 2e
%%  Copyright (C) 2008-2013  G. Messineo e S. Vassallo
%%
%% This is file `esami-xyz.cfg',
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% esami-xyz.cfg,             2013-03-20                %%
%% Copyright (C) 2008-2013 G. Messineo e S. Vassallo    %%
%%                                                      %%
%% This program can be redistributed and/or modified    %%
%% under the terms of the LaTeX Project Public License  %%
%% Distributed from CTAN archives in directory          %%
%% macros/latex/base/lppl.txt; either version 1 of the  %%
%% License, or (at your option) any later version.      %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% other packages
\AtEndOfPackage{
\usepackage{ifxetex}%%NUOVO
\usepackage{ifluatex}%%%NUOVO
\usepackage{amsmath}
%========================================================%
%    Some shortcuts and Italian maths                    %
%========================================================%

\DeclareMathOperator{\sen}{sen}
\DeclareMathOperator{\tg}{tg}
\DeclareMathOperator{\arcsen}{arcsen}
\DeclareMathOperator{\arctg}{arctg}
\providecommand*{\dif}{\mathop{}\!\mathrm{d}}
\providecommand{\dlim}{\displaystyle \lim}
\providecommand{\me}{\mathrm{e}}
\providecommand{\D}{\displaystyle}

\newenvironment{sistema}{%%% Taken from somewhere in GUIT forum to write equations systems
\left\lbrace\begin{array}{@{}l@{}}}%
  {\end{array}\right.%
  }

\DeclareRobustCommand{\annu}[2]{_{%%% the annuity command
 \def\arraystretch{0}
 \setlength\arraycolsep{1pt}
\setlength\arrayrulewidth{.2pt}
\begin{array}[b]{c c}
 \setlength\arraycolsep{1.5pt}
 \begin{array}
 [b]{r|}\hline
 \\[\arraycolsep]
 \scriptstyle #1
 \end{array}&\scriptstyle#2%
\end{array}%
}}

\newcommand{\vect}[1]{\boldsymbol{#1}}

%%% We prefer var greek math %%%

\newcommand{\eps}{\varepsilon}
\newcommand{\oldtheta}{\theta} \renewcommand{\theta}{\vartheta}
\newcommand{\oldepsilon}{\epsilon} \renewcommand{\epsilon}{\varepsilon}
\newcommand{\oldrho}{\rho} \renewcommand{\rho}{\varrho}
\newcommand{\oldphi}{\phi} \renewcommand{\phi}{\varphi}

%%%%%%%%%%%%%%%%%%%%%%%%%
}

% +=============================+
% |         THE HEADING         |
% +=============================+

 \@ifpackagewith{esami}{prova}{%
 \def\testa{\relax}}
{%
\def\testa{
{\bfseries\sffamily\small
\begin{center}
\begin{tabular}{|lp{.33\textwidth}|lp{.3\textwidth}|lp{.3\textwidth}|}
\hline
\multicolumn{1}{|p{.33\textwidth}|}{\examname \newline  \Data}&\multicolumn{1}{|p{.3\textwidth}|}{\profname  } &\multicolumn{1}{|p{.3\textwidth}|}{\studsignname}\\[4ex]
\hline
\multicolumn{1}{|p{.33\textwidth}|}{\studlastname:}&\multicolumn{1}{|p{.3\textwidth}|}{\studfirstname:}&\multicolumn{1}{|p{.3\textwidth}|}{\studid:}\\[4ex]
\hline
\end{tabular}\\[3ex]
\end{center}}
 }
 }

% +=============================+
% |         THE FOOTER          |
% +=============================+

\ifes@solutions%%%solutions
\def\ps@esame{\let\@oddhead\@empty\def\@oddfoot{\hfil \textbf{\versionname\
n. \thevers} -- %%
\textbf{\solutionsname} --  %%
 \pagename\ \thepage
\hfil}\let\@evenhead\@empty\let\@evenfoot\@empty}
\else%%% no solutions
    \def\ps@esame{
    \let\@oddhead\@empty\def\@oddfoot%%
    {\hfil  \textbf{\versionname\ n. \thevers\
      -- \pagename\ \thepage}\hfil}\let\@evenhead\@empty\let\@evenfoot\@empty}
\fi

% +=============================+
% |   THE SOLUTION STRING       |
% +=============================+

\def\ps@soltest{\let\@oddhead\@empty\def\@oddfoot{\hfil %\textbf{\versionname\ n. \thevers} -- %%
\textbf{\solutionsname} -- \pagename\ \thepage
\hfil}\let\@evenhead\@empty\let\@evenfoot\@empty}

\ifes@solutions
\newcommand{\stringasol}{\newpage%
\vspace{.8cm}
\pagestyle{soltest}
 \input{\jobname.sol.tex}                                                                                %
}
\else
\newcommand{\stringasol}{\relax}
\fi


% +=============================+
% |   SOME INTRUCTIONS          |
% +=============================+

\def\istruzionii{{
\sffamily \textbf{INSTRUCTIONS}
\begin{itemize}
  \item Write here your instructions
  \item two
  \item three
\end{itemize}}}

\def\istruzioniii{\setlength{\fboxsep}{1.5ex}\setlength{\fboxrule}{1.2pt}{\sffamily
\framebox{\parbox{\textwidth}{\textbf{Some other instructions.}}}}\\[3ex]}