1 | \newcommand\petitscarreaux[2]{%
|
2 | \begin{tikzpicture}[inner sep=0,outer sep=0]
|
3 | \pgfmathsetmacro\mywidth{#1}
|
4 | \pgfmathsetmacro\myheight{#2}
|
5 |
|
6 | \pgfmathsetmacro\incx{5mm}
|
7 | \pgfmathsetmacro\incy{5mm}
|
8 |
|
9 | \pgfmathsetmacro\numx{int(\mywidth/\incx)}
|
10 | \foreach \x in {0,...,\numx}{
|
11 | \draw[lignesfines]
|
12 | (\x * \incx pt,0) -- (\x * \incx pt,-\myheight pt);
|
13 | }
|
14 |
|
15 | \pgfmathsetmacro\numy{int(\myheight/\incy)}
|
16 | \foreach \y in {0,...,\numy}{
|
17 | \draw[lignesfines]
|
18 | (0,-\y * \incy pt) -- (\mywidth pt,-\y * \incy pt);
|
19 | }
|
20 | \end{tikzpicture}%
|
21 | }
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | \newcommand\grandscarreaux[2]{%
|
27 | \begin{tikzpicture}[inner sep=0,outer sep=0]
|
28 | \pgfmathsetmacro\mywidth{#1}
|
29 | \pgfmathsetmacro\myheight{#2}
|
30 |
|
31 | \pgfmathsetmacro\incx{8mm}
|
32 | \pgfmathsetmacro\incypetits{2mm}
|
33 | \pgfmathsetmacro\incygrands{8mm}
|
34 |
|
35 | \pgfmathsetmacro\numx{int(\mywidth/\incx)}
|
36 | \foreach \x in {0,...,\numx}{
|
37 | \draw[lignesfines]
|
38 | (\x * \incx pt,0) -- (\x * \incx pt,-\myheight pt);
|
39 | }
|
40 |
|
41 | \pgfmathsetmacro\numy{int(\myheight/\incypetits)}
|
42 | \foreach \y in {0,...,\numy}{
|
43 | \draw[lignesfines]
|
44 | (0,-\y * \incypetits pt) -- (\mywidth pt,-\y * \incypetits pt);
|
45 | }
|
46 |
|
47 | \pgfmathsetmacro\numy{int(\myheight/\incygrands)}
|
48 | \foreach \y in {0,...,\numy}{
|
49 | \draw[lignesepaisses]
|
50 | (0,-\y * \incygrands pt) -- (\mywidth pt,-\y * \incygrands pt);
|
51 | }
|
52 | \end{tikzpicture}%
|
53 | }
|
54 |
|
55 |
|
56 |
|
57 | \newcommand{\questionlibre}[2]{\addtocounter{numeroquestion}{1}
|
58 | %param 1: bareme
|
59 | %param 2: question
|
60 | \begin{questionmult}{\thenumeroquestion}
|
61 | %
|
62 | \def\AMCotextReserved{Cases rserves}
|
63 | \AMCOpen{lineup=true,lines=1,dots=false,annotate=true,width=0.975\linewidth,framerule=0.5pt}{
|
64 | #1
|
65 | }
|
66 |
|
67 |
|
68 |
|
69 | \newcommand{\questionlibregc}[2]{
|
70 | %param 1: bareme
|
71 | %param 2: hauteur
|
72 | \questionlibre{#1}{\vspace{-5pt}\noindent\grandscarreaux{\linewidth}{#2}}
|
73 | }
|
74 |
|
75 |
|
76 |
|
77 | \newcommand{\questionlibrepc}[2]{
|
78 | %param 1: bareme
|
79 | %param 2: hauteur
|
80 | \questionlibre{#1}{\vspace{-5pt}\noindent\petitscarreaux{\linewidth}{#2}}
|
81 | } |