diff options
author | Karl Berry <karl@freefriends.org> | 2017-05-19 21:12:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-05-19 21:12:44 +0000 |
commit | b6a9d061f27e2822b7de379c66c030d9ea0e8fb3 (patch) | |
tree | 7a9b6e488d40920bb153db1f0e7be10f8df3935a /Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-338165.tex | |
parent | 910f589664407d620dc2a30c7b1de1a10e715df1 (diff) |
xsim (19may17)
git-svn-id: svn://tug.org/texlive/trunk@44430 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-338165.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-338165.tex | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-338165.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-338165.tex new file mode 100644 index 00000000000..e48d8880dab --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-338165.tex @@ -0,0 +1,72 @@ +% http://tex.stackexchange.com/q/338165 +\documentclass{article} +\usepackage[T1]{fontenc} +\usepackage{leading,microtype} +\usepackage[french]{babel} + +\usepackage{tasks} +\usepackage{xsim} +\usepackage{tcolorbox} +\tcbuselibrary{breakable, skins} +\settasks{ + counter-format = tsk. +} + +\DeclareExerciseEnvironmentTemplate{boxed} + {% + \tcolorbox[ + enhanced , + attach boxed title to top center = {yshift=-7.5pt} , + colback = white , colbacktitle = white , + coltitle = black , colframe = black , + boxed title style = { colframe = white } , + fonttitle=\bfseries, + sharp corners=all, + breakable, + title= + \XSIMmixedcase{\GetExerciseName}% + \IfInsideSolutionF{% + ~\GetExerciseProperty{counter}% + \IfExercisePropertySetT{subtitle}{: \GetExerciseProperty{subtitle}}% + }% + ] + } + {\endtcolorbox} + +\xsimsetup{ + exercise/template = boxed , + solution/template = boxed , + solution/print = true +} + +\leading{15pt} + +\newcommand*\complement{\overline} +\newcommand*\union{\cup} +\newcommand*\intersection{\cap} +\newcommand*\set[1]{\{#1\}} + +\begin{document} + +\begin{exercise}[subtitle=Set Calculus] + Soient $E=\set{1,2,3,4,5,6,7}$ et $A$, $B$, $C$ et $D$ quatre parties de E + d\'efinies par $A=\set{1,2,3,4}$, $B=\set{4,5,6,7}$, $C=\set{1,3,5,7}$ et + $D=\set{2,3,4,5,6}$. + \begin{tasks}(2) + \task Calculer $\complement{A}$. + \task Calculer $(A\union B) \intersection (C\union D)$. + \task Calculer $(A\intersection B) \union (C\intersection D)$. + \task Calculer $\complement{(\complement{A}\union B)} \union + \complement{(C\intersection D)}$. + \end{tasks} +\end{exercise} +\begin{solution} + \begin{tasks}(2) + \task $\set{5,6,7}$ + \task $E$ + \task $\set{3,4,5}$ + \task $\set{1,2,3,4,6,7}$ + \end{tasks} +\end{solution} + +\end{document} |