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
| \documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage{ifthen}
\usepackage{wrapfig}
\usepackage{graphicx}
\newcounter{numQuestion}
\setcounter{numQuestion}{0}
\newenvironment{question}[3]{
\newcommand*{\qTxt}{}
\ifthenelse{\equal{#1}{q}} {\renewcommand*{\qTxt}{Q}}{}
\ifthenelse{\equal{#1}{qu}} {\renewcommand*{\qTxt}{Question~}}{}
\ifthenelse{\equal{#1}{qs}} {\renewcommand*{\qTxt}{Question~subsidiaire~}}{}
\ifthenelse{\equal{#1}{r}} {\renewcommand*{\qTxt}{R}}{}
\ifthenelse{\equal{#1}{re}} {\renewcommand*{\qTxt}{Réponse~}}{}
\ifthenelse{\equal{#2}{}}{
\stepcounter{numQuestion}
\textbf{\qTxt\thenumQuestion}%
\ifx\relax#3\relax
\else
\footnote{#3}
\fi%
\textbf{~:}%
}{
\textbf{\qTxt#2}%
\ifx\relax#3\relax
\else
\footnote{#3}
\fi%
\textbf{~:}%
}
}%
{}
\begin{document}
\begin{wrapfigure}{r}{0.5\textwidth}
\vspace{-0.5cm}
\centering
\includegraphics[width=0.5\textwidth]{schemaIso.png}
\end{wrapfigure}
\begin{question}{qu}{}{}
Au travers de l'étude du mécanisme, déterminer les mobilités.
\end{question}
\end{document} |
Partager