Skip to content
This repository was archived by the owner on Jun 26, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8fd0223
[exercice.TermeDUneSUite] Nettoyage des import
May 24, 2018
6453ac6
[cli] Le tri est fait sans tenir compte de la casse
May 24, 2018
b39a7d7
[exercice] Nouvel exercice : Déterminer un état stable
May 24, 2018
d2e13b7
Merge branch 'develop' into jinja2
May 26, 2018
11a5e28
[cli] Génération d'un modèle de fichier TeX
May 26, 2018
36f6673
Correction d'un bug dû à l'import précoce de pyromaths.Values
May 27, 2018
810d449
[WIP] Documentation pour la création d'exercices
May 27, 2018
e3febbd
[doc] Renommage / Coloration syntaxique
May 28, 2018
fc549e9
[doc] Création d'un exercice : Partie 2.5 écrite
May 28, 2018
92139c7
[doc] Tutoriel : Brouillon de partie 2.6.
May 28, 2018
180ca8c
[doc] Affichage de = au lieu de \approx si la solution est exacte (et…
May 28, 2018
90b5b4e
[doc] oubli
May 28, 2018
315bf45
[doc] Tutoriel : Partie 2.7.3 terminée
May 28, 2018
ffc796b
[doc] Tutoriel terminé.
May 29, 2018
8efae8f
[ex.EtastStableSysteme2] Utilisation de la commande LaTeX `\numprint{…
May 30, 2018
8796c5c
[doc] Utilisation de la commande LaTeX `\numprint{}` plutôt que de la…
May 30, 2018
c76800d
Merge branch 'develop' into jinja2
May 30, 2018
5d5717c
Nouvel exercice : Bilan des trinômes.
Jun 12, 2018
7477519
[exercice] Utilisation du `filter` facteur() pour l'exercice sur les …
Jun 12, 2018
a1eb4a2
Correction d'un problème d'unicode
Jun 12, 2018
128076b
Nouvel exercice : Résolution de systèmes utilisant les matrices
Jun 12, 2018
9e965f7
[exercice] Ajout du signe +
Jun 13, 2018
5a031f8
[NEWS] Ajout des changements depuis la dernière version
Jun 14, 2018
0f21e4d
Relecture des exercices proposés par Louis
JeromeO Jun 16, 2018
47e2749
[outils.jinja2] Ajout d'une espace devant la variable
Jun 16, 2018
7a19146
[exercice.InterpolationMatrices] Le signe - est une opération (et doi…
Jun 16, 2018
ac14948
[exercice.InterpolationMatrices] Correction de deux erreurs
Jun 16, 2018
8cd1726
Mise à jour des tests
Jun 16, 2018
3e9d8ea
Merge branch 'develop' into jinja2
Jun 16, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
500 changes: 500 additions & 0 deletions Doc/source/ecrire.rst

Large diffs are not rendered by default.

Binary file added Doc/source/ecrire/1/exercices.pdf
Binary file not shown.
149 changes: 149 additions & 0 deletions Doc/source/ecrire/1/exercices.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
%%!TEX TS-program = latex
\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc} % UTF-8
\usepackage[T1]{fontenc}
\usepackage{lmodern} % Prévient un bug d'affichage evince lié à [T1]{fontenc}
\usepackage[frenchb]{babel} % francisation
\usepackage{adjustbox}
\usepackage[fleqn]{amsmath} % aligne le mode maths à gauche
\usepackage{amssymb} % the amsfont symbols
\usepackage[table, usenames, svgnames]{xcolor} % Couleurs
\usepackage{multicol} % Multi-colonnes
\usepackage{fancyhdr} % Mise en page, en-tête et pied de page
\usepackage{calc} % Opérations
\usepackage{marvosym} % Martin Vogels Symbole (\EUR)
\usepackage{cancel} % draw diagonal lines
\usepackage{units} % typesetting units and nice fractions
\usepackage[autolanguage]{numprint} % écrituredes virgules
\usepackage{tabularx} % creates a paragraph-like column whose width
% automatically expands
\usepackage{wrapfig} % allows figures or tables to have text wrapped around
\usepackage{pst-eucl, pst-plot} % figures géométriques
\usepackage{enumitem}
\usepackage{wasysym} % Symbole Euro
\usepackage{mathtools} % Encadrement dans align*
\usepackage[inline]{asymptote}
\usepackage{tkz-tab}
\usetikzlibrary{external} % set up externalization
\tikzexternalize[shell escape=-enable-write18] % activate externalisation
\tikzset{%
external/system call={%
latex \tikzexternalcheckshellescape -halt-on-error
-interaction=batchmode -jobname "\image" "\texsource" &&
dvips -o "\image".ps "\image".dvi &&
ps2eps -f "\image.ps"
}
}

%\usepackage{textcomp}

\usepackage[a4paper, dvips, left=1.5cm, right=1.5cm, top=2cm,%
bottom=2cm, marginpar=5mm, marginparsep=5pt]{geometry}
\newcounter{exo}
\frenchbsetup{StandardItemLabels} % remet \textbullet pour les listes
\setlength{\headheight}{18pt}
\setlength{\fboxsep}{5pt}
\setlength\parindent{0em}
\setlength\mathindent{0em}
\setlength{\columnsep}{30pt}
\usepackage[bookmarks=true, bookmarksnumbered=true, ps2pdf, pagebackref=true,%
colorlinks=true,linkcolor=blue,plainpages=true,unicode]{hyperref}
\hypersetup{pdfauthor={Jérôme Ortais},pdfsubject={Exercices de
mathématiques},pdftitle={Exercices créés par Pyromaths, un logiciel libre
en Python sous licence GPL}}

\def\pshlabel#1{\psframebox*[fillcolor=White,framearc=.2]{\footnotesize $#1$}}
\def\psvlabel#1{\psframebox*[fillcolor=White,framearc=.2]{\footnotesize $#1$}}

\makeatletter
\newcommand\styleexo[1][]{
\renewcommand{\theenumi}{\arabic{enumi}}
\renewcommand{\labelenumi}{$\blacktriangleright$\textbf{\theenumi.}}
\renewcommand{\theenumii}{\alph{enumii}}
\renewcommand{\labelenumii}{\textbf{\theenumii)}}
{\fontfamily{pag}\fontseries{b}\selectfont \underline{#1 \theexo}}
\par\@afterheading\vspace{0.5\baselineskip minus 0.2\baselineskip}}
\newcommand*\exercice{%
\psset{unit=1cm, dash=4pt 4pt, PointName=default,linecolor=Maroon,
dotstyle=x, linestyle=solid, hatchcolor=Peru, gridcolor=Olive,
subgridcolor=Olive, fillcolor=Peru}
%\ifthenelse{\equal{\theexo}{0}}{}{\filbreak}
\refstepcounter{exo}%
\stepcounter{nocalcul}%
\par\addvspace{1.5\baselineskip minus 1\baselineskip}%
\@ifstar%
{\penalty-130\styleexo[Corrigé de l'exercice]}%
{\penalty-130\styleexo[Exercice]}%
}
\newcommand{\checkedbox}[0]{\makebox[0pt][l]{$\square$}\raisebox{.15ex}{\hspace{0pt}$\checkmark$}}
\makeatother
\newlength{\ltxt}
\newsavebox{\mybox}
\newlength{\wdofmybox}
\newcommand{\figureadroite}[2]{%
\setlength{\ltxt}{\linewidth}
\sbox{\mybox}{\hbox{#1}}
\settowidth{\wdofmybox}{\usebox{\mybox}}
\addtolength{\ltxt}{-\wdofmybox}
\addtolength{\ltxt}{-10pt}
\begin{minipage}{\ltxt}
#2
\end{minipage}
\hfill
\begin{minipage}{\wdofmybox}
#1
\end{minipage}
}

\count1=\year \count2=\year
\ifnum\month<8\advance\count1by-1\else\advance\count2by1\fi
\pagestyle{fancy}
\cfoot{\textsl{\footnotesize{Année \number\count1/\number\count2}}}
\rfoot{\textsl{\tiny{http://www.pyromaths.org}}}
\lhead{\textsl{\footnotesize{Page \thepage/ \pageref{LastPage}}}}
\chead{\Large{\textsc{Modèle}}}
\rhead{\textsl{\footnotesize{Modèle}}}

\begin{document}
\currentpdfbookmark{Les énoncés des exercices}{Énoncés}
\newcounter{nocalcul}[exo]
\renewcommand{\thenocalcul}{\Alph{nocalcul}}
\raggedcolumns
\setlength{\columnseprule}{0.5pt}

\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DÉBUT DE L'ÉNONCÉ
\exercice

Déterminer les solutions de l'équation $3x+2=-x-1$. Si nécessaire, les solutions seront arrondies au centième.

% FIN DE L'ÉNONCÉ
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\label{LastPage}
\newpage
\currentpdfbookmark{Le corrigé des exercices}{Corrigé}
\lhead{\textsl{{\footnotesize Page \thepage/ \pageref{LastCorPage}}}}
\setcounter{page}{1} \setcounter{exo}{0}

\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DÉBUT DU CORRIGÉ
\exercice*

\begin{align*}
3x+2 &= -x-1 \\
3x+x &= -1-2 \\
4x &= -3 \\
x &= -\frac{3}{4} \\
x &= -0,75
\end{align*}

L'unique solution est $x=-0,75$.

% FIN DU CORRIGÉ
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\label{LastCorPage}
\end{document}
11 changes: 11 additions & 0 deletions Doc/source/ecrire/2/EquationPremierDegre2-answer.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
\exercice*

\begin{align*}
3x+2 &= -x-1 \\
3x+x &= -1-2 \\
4x &= -3 \\
x &= -\frac{3}{4} \\
x &= -0,75
\end{align*}

L'unique solution est $x=-0,75$.
3 changes: 3 additions & 0 deletions Doc/source/ecrire/2/EquationPremierDegre2-statement.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\exercice

Déterminer les solutions de l'équation $3x+2=-x-1$. Si nécessaire, les solutions seront arrondies au centième.
32 changes: 32 additions & 0 deletions Doc/source/ecrire/2/equation2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
#
# Pyromaths
#
# Un programme en Python qui permet de créer des fiches d'exercices types de
# mathématiques niveau collège ainsi que leur corrigé en LaTeX.
#
# Copyright (C) 2018 -- Louis Paternault (spalax+python@gresille.org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#

"""Équations du premier degré"""

from pyromaths.ex import Jinja2Exercice

class EquationPremierDegre2(Jinja2Exercice):

description = u"Résolution d'équations du premier degré à coefficients entiers."
level = u'3.Troisième'
Binary file added Doc/source/ecrire/2/exercice.pdf
Binary file not shown.
11 changes: 11 additions & 0 deletions Doc/source/ecrire/3/EquationPremierDegre3-answer.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
\exercice*

\begin{align*}
(( a )) x (( "%+d"|format(b) )) &= (( c )) x (( "%+d"|format(d) )) \\
(( a )) x (( "%+d"|format(-c) ))x &= (( d )) (( "%+d"|format(-b) )) \\
(( a - c )) x &= (( d - b )) \\
x &= \frac{(( d - b ))}{(( a - c ))} \\
x &\approx \numprint{(( ((d-b)/(a-c)) | round(2) ))}
\end{align*}

L'unique solution est $x\approx\numprint{(( ((d-b)/(a-c)) | round(2) ))}$.
4 changes: 4 additions & 0 deletions Doc/source/ecrire/3/EquationPremierDegre3-statement.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
\exercice

Déterminer les solutions de l'équation $(( a )) x (( "%+d"|format(b) ))= (( c )) x (( "%+d"|format(d) ))$.
Si nécessaire, les solutions seront arrondies au centième.
Binary file added Doc/source/ecrire/3/corrige.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions Doc/source/ecrire/3/equation3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
#
# Pyromaths
#
# Un programme en Python qui permet de créer des fiches d'exercices types de
# mathématiques niveau collège ainsi que leur corrigé en LaTeX.
#
# Copyright (C) 2018 -- Louis Paternault (spalax+python@gresille.org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#

"""Équations du premier degré"""

import random

from pyromaths.ex import Jinja2Exercice

class EquationPremierDegre3(Jinja2Exercice):

description = u"Résolution d'équations du premier degré à coefficients entiers."
level = u'3.Troisième'

def __init__(self):
super(EquationPremierDegre3, self).__init__()

self.context = {
"a": random.choice([1, -1]) * random.randint(2, 9),
"b": random.choice([1, -1]) * random.randint(2, 9),
"c": random.choice([1, -1]) * random.randint(2, 9),
"d": random.choice([1, -1]) * random.randint(2, 9),
}
Binary file added Doc/source/ecrire/3/exercice.pdf
Binary file not shown.
24 changes: 24 additions & 0 deletions Doc/source/ecrire/4/EquationPremierDegre4-answer.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
\exercice*

\begin{align*}
(( a )) x (( "%+d"|format(b) )) &= (( c )) x (( "%+d"|format(d) )) \\
(( a )) x (( "%+d"|format(-c) ))x &= (( d )) (( "%+d"|format(-b) )) \\
(( a - c )) x &= (( d - b )) \\
x &= \frac{(( d - b ))}{(( a - c ))} \\
x &
(* if 100*(d-b)/(a-c) == (100*(d-b)/(a-c))|int *)
=
(* else *)
\approx
(* endif *)
\numprint{(( ((d-b)/(a-c)) | round(2) ))}
\end{align*}

L'unique solution est
$x
(* if 100*(d-b)/(a-c) == (100*(d-b)/(a-c))|int *)
=
(* else *)
\approx
(* endif *)
\numprint{(( ((d-b)/(a-c)) | round(2) ))}$.
4 changes: 4 additions & 0 deletions Doc/source/ecrire/4/EquationPremierDegre4-statement.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
\exercice

Déterminer les solutions de l'équation $(( a )) x (( "%+d"|format(b) ))= (( c )) x (( "%+d"|format(d) ))$.
Si nécessaire, les solutions seront arrondies au centième.
44 changes: 44 additions & 0 deletions Doc/source/ecrire/4/equation4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
#
# Pyromaths
#
# Un programme en Python qui permet de créer des fiches d'exercices types de
# mathématiques niveau collège ainsi que leur corrigé en LaTeX.
#
# Copyright (C) 2018 -- Louis Paternault (spalax+python@gresille.org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#

"""Équations du premier degré"""

import random

from pyromaths.ex import Jinja2Exercice

class EquationPremierDegre4(Jinja2Exercice):

description = u"Résolution d'équations du premier degré à coefficients entiers."
level = u'3.Troisième'

def __init__(self):
super(EquationPremierDegre4, self).__init__()

self.context = {
"a": random.choice([1, -1]) * random.randint(2, 9),
"b": random.choice([1, -1]) * random.randint(2, 9),
"c": random.choice([1, -1]) * random.randint(2, 9),
"d": random.choice([1, -1]) * random.randint(2, 9),
}
Binary file added Doc/source/ecrire/4/exercice.pdf
Binary file not shown.
24 changes: 24 additions & 0 deletions Doc/source/ecrire/5/EquationPremierDegre5-answer.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
\exercice*

\begin{align*}
(( a )) x (( "%+d"|format(b) )) &= (( c )) x (( "%+d"|format(d) )) \\
(( a )) x (( "%+d"|format(-c) ))x &= (( d )) (( "%+d"|format(-b) )) \\
(( a - c )) x &= (( d - b )) \\
x &= \frac{(( d - b ))}{(( a - c ))} \\
x &
(* if 100*(d-b)/(a-c) == (100*(d-b)/(a-c))|int *)
=
(* else *)
\approx
(* endif *)
(( ((d-b)/(a-c))|facteur("2") ))
\end{align*}

L'unique solution est
$x
(* if 100*(d-b)/(a-c) == (100*(d-b)/(a-c))|int *)
=
(* else *)
\approx
(* endif *)
(( ((d-b)/(a-c))|facteur("2") ))$.
4 changes: 4 additions & 0 deletions Doc/source/ecrire/5/EquationPremierDegre5-statement.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
\exercice

Déterminer les solutions de l'équation $(( a )) x (( "%+d"|format(b) ))= (( c )) x (( "%+d"|format(d) ))$.
Si nécessaire, les solutions seront arrondies au centième.
Loading