diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/xsim/examples')
54 files changed, 1907 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.blanks.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.blanks.pdf Binary files differnew file mode 100644 index 00000000000..dd26d671570 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.blanks.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.blanks.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.blanks.tex new file mode 100644 index 00000000000..b479e961c2c --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.blanks.tex @@ -0,0 +1,23 @@ +\documentclass{article} +\usepackage[utf8]{inputenc} +\usepackage[ngerman]{babel} + +\usepackage{xsim,lipsum,xcolor} + +\xsimsetup{ + solution/print = true , + blank/filled-style = \underline{\textcolor{red}{#1}} +} + +\begin{document} + +\begin{exercise}[points=3] + Erklären Sie den Begriff. + + \blank[width=4\linewidth,linespread=1.5]{} +\end{exercise} +\begin{solution} + \blank[width=4\linewidth,linespread=1.5]{Die Lösung hier soll rot sein.} +\end{solution} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.boxed-headings.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.boxed-headings.pdf Binary files differnew file mode 100644 index 00000000000..99ba5bbc2a6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.boxed-headings.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.boxed-headings.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.boxed-headings.tex new file mode 100644 index 00000000000..9ff47d9d992 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.boxed-headings.tex @@ -0,0 +1,30 @@ +\documentclass{article} + +\usepackage{tcolorbox} +\usepackage{xsim} +\usepackage{needspace} + +\DeclareExerciseEnvironmentTemplate{custom} + {% + \Needspace*{5\baselineskip} + \begin{tcolorbox} + \textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}.}% + \GetExercisePropertyT{subtitle}{ \textit{#1}}% + \end{tcolorbox} + \noindent + } + {\vspace{\baselineskip}} + +\xsimsetup{exercise/template = custom} + +\usepackage{lipsum} + +\begin{document} + +\begin{exercise}[subtitle=Foo bar baz] + \lipsum[1] +\end{exercise} + +\lipsum[2] + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.code-and-output.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.code-and-output.pdf Binary files differnew file mode 100644 index 00000000000..bbbcfbc18a7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.code-and-output.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.code-and-output.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.code-and-output.tex new file mode 100644 index 00000000000..f753f13939e --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.code-and-output.tex @@ -0,0 +1,53 @@ +\documentclass{article} +\usepackage{xsimverb,listings,xcolor} + +\lstdefinestyle{mystyle}{ + language = [AlLaTeX]TeX , + basicstyle = \ttfamily , + columns = fullflexible , + commentstyle = \color{gray!70} , + keywordstyle = \color{red!70!black} +} + +\makeatletter +\NewDocumentEnvironment{example}{o} + {% + \XSIMgobblechars{2}% + \XSIMsetfilebegin{\@percentchar\space file `\jobname.tmp'}% + \XSIMsetfileend{\@percentchar\space bye bye}% + \IfNoValueTF{#1} + {\XSIMfilewritestart*{\jobname.tmp}} + {\XSIMfilewritestart{\jobname.tmp}}% + } + {% + \XSIMfilewritestop + \lstinputlisting[style=mystyle]{\jobname.tmp}% + \input{\jobname.tmp} + } + +\NewDocumentEnvironment{code}{o} + {% + \XSIMgobblechars{2}% + \IfNoValueTF{#1} + {\XSIMfilewritestart*{\jobname.tmp}} + {\XSIMfilewritestart{\jobname.tmp}}% + } + {% + \XSIMfilewritestop + \lstinputlisting[style=mystyle]{\jobname.tmp}% + } +\makeatother + +\begin{document} + +\begin{example} + bla bla \LaTeX +\end{example} + +\bigskip + +\begin{code} + blubber \LaTeX +\end{code} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.collections.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.collections.pdf Binary files differnew file mode 100644 index 00000000000..fd785cc0574 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.collections.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.collections.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.collections.tex new file mode 100644 index 00000000000..beca1910055 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.collections.tex @@ -0,0 +1,62 @@ +\documentclass{article} +\usepackage{xsim} + +\DeclareExerciseCollection{foo-easy} +\DeclareExerciseCollection{foo-medium} +\DeclareExerciseTagging{difficulty} + +\usepackage{filecontents,lipsum} +\begin{filecontents*}{foo.tex} +\begin{exercise}[difficulty=easy,points=1] + foo one \lipsum[4] +\end{exercise} +\begin{solution} + foo one \lipsum[4] +\end{solution} +\begin{exercise}[difficulty=medium,points=1] + foo two \lipsum[4] +\end{exercise} +\begin{solution} + foo two \lipsum[4] +\end{solution} +\begin{exercise}[difficulty=easy,points=1] + foo three \lipsum[4] +\end{exercise} +\begin{solution} + foo three \lipsum[4] +\end{solution} +\end{filecontents*} + +\begin{document} + +\begin{exercise} + outside before +\end{exercise} + +\collectexercises{foo-easy} +\xsimsetup{difficulty=easy} +\input{foo.tex} +\collectexercisesstop{foo-easy} +% collection `foo-easy' now contains all exercises of file `foo.tex' tagged +% with `difficulty=easy' + +\collectexercises{foo-medium} +\xsimsetup{difficulty=medium} +\input{foo.tex} +\collectexercisesstop{foo-medium} +% collection `foo-medium' now contains all exercises of file `foo.tex' +% tagged with `difficulty=medium' + +\section{Easy} +\printcollection{foo-easy} + +\section{Medium} +\printcollection{foo-medium} + +\printsolutions[difficulty=medium] + +\section{All Exercises and Their Solutions Again, in Order of Appearance} + +\printcollection[print=both]{all exercises} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.crossref.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.crossref.pdf Binary files differnew file mode 100644 index 00000000000..8151a0cef3f --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.crossref.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.crossref.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.crossref.tex new file mode 100644 index 00000000000..fa2fbbb509d --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.crossref.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{xsim,lipsum,hyperref} + +\DeclareExerciseHeadingTemplate{custom} + {\section{\XSIMtranslate{default-heading}}} + +\DeclareExerciseEnvironmentTemplate{custom} + {% + \IfInsideSolutionTF + {\label{sol:\ExerciseID}} + {\label{ex:\ExerciseID}} + \subsection* + {% + \XSIMmixedcase{\GetExerciseName}% + \IfInsideSolutionTF + { + to \GetExerciseParameter{exercise-name}% + ~\GetExerciseProperty{counter}% + } + {% + ~\GetExerciseProperty{counter} + \GetExercisePropertyT{subtitle} + { {\normalfont\itshape\PropertyValue}}% + }% + } + \noindent\llap{% + \footnotesize\sffamily + \IfInsideSolutionTF + {% + \XSIMmixedcase{\GetExerciseParameter{exercise-name}} + on page~\pageref{ex:\ExerciseID}.% + } + {% + \XSIMmixedcase{\GetExerciseParameter{solution-name}} + on page~\pageref{sol:\ExerciseID}.% + }% + \hspace*{\marginparsep}% + }% + } + {} +\xsimsetup{ + exercise/template = custom , + solution/template = custom , + print-solutions/headings-template = custom +} + +\begin{document} + +\section{Exercises} +\begin{exercise} + \lipsum[4] +\end{exercise} +\begin{solution} + \lipsum[4] +\end{solution} + +\clearpage +\printsolutions + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.description-list.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.description-list.pdf Binary files differnew file mode 100644 index 00000000000..d506ad960bc --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.description-list.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.description-list.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.description-list.tex new file mode 100644 index 00000000000..f3c9ed6d74f --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.description-list.tex @@ -0,0 +1,42 @@ +\documentclass{article} +\usepackage{xsim,lipsum} + +\DeclareExerciseEnvironmentTemplate{item} + {\item[\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}]} + {} +\xsimsetup{ + exercise/template=item, + solution/template=item, + print-solutions/headings-template=none +} + +\newenvironment{exercises} + {\section{Exercises}\description} + {\enddescription} + +\newenvironment{solutions} + {\section{Solutions}\description} + {\enddescription} + +\begin{document} + +\begin{exercises} + \begin{exercise} + \lipsum[4] + \end{exercise} + \begin{solution} + \lipsum[3] + \end{solution} + \begin{exercise} + \lipsum[12] + \end{exercise} + \begin{solution} + \lipsum[23] + \end{solution} +\end{exercises} + +\begin{solutions} + \printsolutions +\end{solutions} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.different-point-types.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.different-point-types.pdf Binary files differnew file mode 100644 index 00000000000..b1de5d63253 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.different-point-types.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.different-point-types.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.different-point-types.tex new file mode 100644 index 00000000000..0ac35367760 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.different-point-types.tex @@ -0,0 +1,52 @@ +\documentclass{article} +\usepackage{xsim} + +\DeclareExerciseGoal{A} +\DeclareExerciseGoal{C} +\DeclareExerciseGoal{E} + +\newcommand*\printA{\TotalExerciseGoal{A}{~A~point}{~A~points}} +\newcommand*\printC{\TotalExerciseGoal{C}{~C~point}{~C~points}} +\newcommand*\printE{\TotalExerciseGoal{E}{~E~point}{~E~points}} + +\usepackage{needspace} +\DeclareExerciseEnvironmentTemplate{custom} + {% + \par\vspace{\baselineskip} + \Needspace*{2\baselineskip} + \noindent + \textbf{\GetExerciseProperty{counter}}% + \IfExercisePropertySetT{subtitle} + { \textit{\GetExerciseProperty{subtitle}}} % + \IfInsideSolutionF{% + \marginpar{% + (\IfExercisePropertySetTF{E}{\GetExerciseProperty{E}}{0}/% + \IfExercisePropertySetTF{C}{\GetExerciseProperty{C}}{0}/% + \IfExercisePropertySetTF{A}{\GetExerciseProperty{A}}{0})% + }% + }% + } + {} +\xsimsetup{ + exercise/template = custom , + solution/template = custom +} +\renewcommand*\theexercise{\arabic{exercise}.} + +\begin{document} + +Reachable: \printA, \printC, and \printE. + +\begin{exercise}[E=1] + Differentiate $y=3x^2+5x+3$. +\end{exercise} + +\begin{exercise}[E=2,C=1] + Find the equation of the tangent line to the function $y=x/2$ at $x=2$. +\end{exercise} + +\begin{exercise}[C=1,A=2] + Prove that the derivative of a constant is zero. +\end{exercise} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.difficulties.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.difficulties.pdf Binary files differnew file mode 100644 index 00000000000..846f19e2012 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.difficulties.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.difficulties.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.difficulties.tex new file mode 100644 index 00000000000..02712f15d66 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.difficulties.tex @@ -0,0 +1,53 @@ +\documentclass{article} + +\usepackage[clear-aux]{xsim} +\DeclareExerciseTagging{difficulty} +\xsimsetup{ + difficulty={easy,hard} +} + +\DeclareExerciseEnvironmentTemplate{custom} + { + \subsection* + {% + \XSIMmixedcase {\GetExerciseName}\nobreakspace + \GetExerciseProperty{counter}% + \IfExercisePropertySetT{difficulty} + { {\normalfont(\GetExerciseProperty{difficulty})}}% + \IfInsideSolutionF{% + \IfExercisePropertySetT{subtitle} + { {\normalfont\itshape\GetExerciseProperty{subtitle}}}% + }% + }% + \IfExercisePropertySetT{points} + {% + \marginpar + {% + \IfInsideSolutionF{\rule{1.2cm}{1pt}\slash}% + \GetExerciseProperty{points}% + \IfExercisePropertySetT{bonus-points} + {\nobreakspace(+\GetExerciseProperty{bonus-points})} + \nobreakspace\XSIMtranslate{point-abbr}% + }% + }% + } + {} + +\xsimsetup{exercise/template = custom} + +\begin{document} + +\begin{exercise}[difficulty=easy] + An easy question. +\end{exercise} +\begin{exercise}[difficulty=medium] + This one's a bit harder. +\end{exercise} +\begin{exercise}[difficulty=hard] + Now let’s see if you can solve this one. +\end{exercise} +\begin{exercise}[difficulty=medium] + This is medium but printed anyway +\end{exercise} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.floating.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.floating.pdf Binary files differnew file mode 100644 index 00000000000..e2e96537ef1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.floating.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.floating.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.floating.tex new file mode 100644 index 00000000000..08448df35a6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.floating.tex @@ -0,0 +1,50 @@ +% floating exercises: +\documentclass{article} +\usepackage{xsim,newfloat,caption,lipsum} + +\DeclareFloatingEnvironment[ + fileext=loe, + listname={List of Exercises}, + name=Exercise, + placement=htp, +]{ex} + +\DeclareExerciseEnvironmentTemplate{float} + {% + \ex + \captionsetup{labelformat=empty,singlelinecheck=false,listformat=empty} + \IfExercisePropertySetTF{subtitle}{% + \XSIMexpandcode{% + \noexpand\caption{% + \noexpand\textbf{% + \XSIMmixedcase{\GetExerciseName}\nobreakspace + \GetExerciseProperty{counter}% + }: \GetExerciseProperty{subtitle}% + }% + }% + }{% + \caption{% + \textbf{% + \XSIMmixedcase{\GetExerciseName}\nobreakspace + \GetExerciseProperty{counter}% + }% + }% + }% + } + {\endex} + +\xsimsetup{exercise/template = float} + +\begin{document} + +\listofexs + +\begin{exercise} + \lipsum[4] +\end{exercise} + +\begin{exercise}[subtitle=Let's have a look] + \lipsum[4] +\end{exercise} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.pdf Binary files differnew file mode 100644 index 00000000000..76cf1617cbd --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.tex new file mode 100644 index 00000000000..3a324d4221f --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.tex @@ -0,0 +1,131 @@ +% http://golatex.de/schueler-und-lehrerloesung-im-gleichen-texfile-t16824.html +\documentclass[fontsize=12pt,parskip=half]{scrartcl} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[ngerman]{babel} + +\newlength\breite +\setlength\breite{160mm} +\newlength\hoehe +\setlength\hoehe{80mm} + +\usepackage[ + hdivide={3.0cm,\breite,}, + vdivide={2.2cm,,2.2cm}]{geometry} +\usepackage[bitstream-charter]{mathdesign} + +\usepackage[babel]{microtype} + +\usepackage[inline]{enumitem} + +\usepackage{amsmath,siunitx} +\sisetup{ + locale = DE , + per-mode = fraction +} + +\usepackage{xsim,needspace,tikz,tcolorbox} + +\xsimsetup{ + exercise/template = gitter , + solution/template = gitter +} + +\DeclareExerciseEnvironmentTemplate{gitter} + {% + \IfInsideSolutionT{% + \tcolorbox[ + detach title , + title = Lösung: , + before upper = {\tcbtitle\space} , + fonttitle = \bfseries , + fontupper = \large , + valign = center , + colframe = black!50!white , + colback = black!12!white , + coltext = blue , + coltitle = blue , + height = \hoehe , + width = \breite , + sharp corners + ] + }% + } + {% + \IfInsideSolutionTF + {\endtcolorbox} + {% + \IfSolutionPrintF{% + \par + \begin{tikzpicture}[semitransparent] + \draw[step=4mm, line width=0.15mm, black!60!white] (0,0) grid + (\breite,\hoehe); + \end{tikzpicture} + \par + } + }% + } + +\begin{document} + +\begin{exercise} + Für die \textbf{Schülerausgabe} sollen Häuschen (Grid) mit Seitenlänge + \SI{4}{\mm} gesetzt werden. +\end{exercise} +\begin{solution} + Hier soll die Lösung stehen: $E=m\cdot c^2$. +\end{solution} + +\xsimsetup{solution/print=true} + +\begin{exercise} + Für die \textbf{Lehrerausgabe} sollen statt Häuschen die Lösung in + z.\,B. einer Box geschrieben werden. Dafür soll die Lösung (bezogen auf + dieses Beispiel) auch in einer Box mit der exakten Breite \SI{160}{\mm} und + der exakten Höhe \SI{80}{\mm} gesetzt werden. Weiter soll natürlich die + Position der Lösungsbox und der Häuschenbox exakt identisch sein. +\end{exercise} +\begin{solution} + Hier soll die Lösung stehen: $E=m\cdot c^2$. +\end{solution} + +\clearpage + +\begin{exercise} + Beschreiben Sie die \textbf{Satzgruppe des Pythagoras}. +\end{exercise} +\begin{solution} + \begin{align*} + \left.\begin{aligned} + c^2 &=a^2+b^2\\ + a^2 &=p\cdot c\;\wedge\; b^2=q\cdot c\\ + h^2 &=p\cdot q + \end{aligned}\right\} + \begin{gathered} + \text{Satzgruppe}\\ + \text{des Pythagoras} + \end{gathered} + \end{align*} +\end{solution} + +\begin{exercise} + Geben Sie die Formel der \textbf{gleichförmigen Bewegung} wieder. Gehen Sie + davon aus, dass Sie 1000~Meter in + \SI[parse-numbers=false]{3\frac{1}{2}}{Minuten} laufen. + \begin{enumerate*}[label=\bfseries\alph*)] + \item Mit welcher Geschwindigkeit legen Sie die Strecke zurück? + \item Geben Sie die Geschwindigkeit in \si{\km\per\hour} an. + \end{enumerate*} + \textbf{Hinweis:} Nehmen Sie zur Berechnung die vereinfachte Form und gehen + Sie davon aus, dass Ihre Geschwindigkeit konstant ist. +\end{exercise} +\begin{solution} + \begin{align*} + s &=v\cdot t+s_0 \\ + 1000 &=v\cdot 210 \\ + v &=\frac{\SI{1000}{\m}}{\SI{210}{\second}} \\ + v &=\SI{4.76}{\m\per\second} = \SI{17.1}{\km\per\hour} + \end{align*} +\end{solution} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.pdf Binary files differnew file mode 100644 index 00000000000..97cb4659e06 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.tex new file mode 100644 index 00000000000..aa49dd64e1b --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.tex @@ -0,0 +1,94 @@ +% http://golatex.de/aufgabe-loesungs-umgebung-t18844.html +\documentclass[18pt,a4paper]{article} +\usepackage[utf8]{inputenc} +\usepackage[ngerman]{babel} + +\usepackage{xsim,tcolorbox} +\usepackage{amsmath} +\xsimsetup{ + exercise/within = section , + exercise/the-counter = \thesection.\arabic{exercise} , + print-solutions/headings-template=none +} +\SetExerciseParameters{exercise}{ + exercise-template = mine , + solution-template = mine +} + +\DeclareExerciseEnvironmentTemplate{mine} + {% + \tcolorbox[ + % colors: + colback = white , colframe = black , coltitle = black , + % rules: + boxrule = 0pt , toprule = 1pt , bottomrule = 1pt , arc = 0pt , + % spacing: + boxsep = 0pt , left = 0pt , right = 0pt , + % title: + detach title , before upper = \tcbtitle\par\noindent , + fonttitle = \bfseries , + title = \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter} + ] + } + {\endtcolorbox} + +\DeclareExerciseTranslation{German}{exercise}{Aufgabe} +\DeclareExerciseTagging{difficulty} + +\begin{document} + +\section{Wellenausbreitung im Vakuum und in Materie} +\subsection{Maxwellsche Gleichungen} + +\begin{align*} + \nabla \cdot \vec{E}\left(\vec{r}, t \right) = + \frac{\varrho\left(\vec{r}, t \right)}{\varepsilon_0} +\end{align*} + +\begin{exercise}[difficulty=easy] +Something stupid +\end{exercise} +\begin{solution} +Here is a nonstupid solution for your problem +\end{solution} + +\subsection{Empirischer Zugang zu Wellengleichungen} + +\begin{exercise}[difficulty=hard] +Eine weitere Aufgabe +\end{exercise} +\begin{solution} +Solution Number 2 +\end{solution} + +\subsection*{Lösungen} +\printsolutions[section,difficulty=hard] + +\section{Wellenausbreitung im Vakuum und in Materie} +\subsection{Maxwellsche Gleichungen} + +\begin{align*} + \nabla \cdot \vec{E}\left(\vec{r}, t \right) = + \frac{\varrho\left(\vec{r}, t \right)}{\varepsilon_0} +\end{align*} + +\begin{exercise}[difficulty=easy] +Something stupid +\end{exercise} +\begin{solution} +Here is a nonstupid solution for your problem +\end{solution} + +\subsection{Empirischer Zugang zu Wellengleichungen} + +\begin{exercise}[difficulty=hard] +Eine weitere Aufgabe +\end{exercise} +\begin{solution} +Solution Number 2 +\end{solution} + +\subsection*{Lösungen} +\printsolutions[section] + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.grade-distribution.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.grade-distribution.pdf Binary files differnew file mode 100644 index 00000000000..248358c4a16 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.grade-distribution.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.grade-distribution.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.grade-distribution.tex new file mode 100644 index 00000000000..8e9731de24d --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.grade-distribution.tex @@ -0,0 +1,56 @@ +\documentclass{article} +\usepackage{xsim} + +\xsimsetup{grades/split=;} + +\DeclareGradeDistribution{ + 1 = 1 ; + 1,5 = .9167 ; + 2 = .8333 ; + 2,5 = .75 ; + 3 = .6667 ; + 3,5 = .5833 ; + 4 = .5 +} + +\begin{document} + +\begin{exercise}[points=4] +\end{exercise} + +\begin{exercise}[points=4] +\end{exercise} + +\begin{exercise}[points=4] +\end{exercise} + +\begin{exercise}[points=4,bonus-points=10] +\end{exercise} + +\begin{exercise}[points=4] +\end{exercise} + +\begin{exercise}[points=4] +\end{exercise} + + +\goalsforgrade{points + bonus-points}{1,5} +\goalsforgrade{points+bonus-points}{2} + +\pointsforgrade{1} +\pointsforgrade{1,5} +\pointsforgrade{2} +\pointsforgrade{2,5} +\pointsforgrade{3} +\pointsforgrade{3,5} +\pointsforgrade{4} + +\totalgoalforgrade{1} +\totalgoalforgrade{1,5} +\totalgoalforgrade{2} +\totalgoalforgrade{2,5} +\totalgoalforgrade{3} +\totalgoalforgrade{3,5} +\totalgoalforgrade{4} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.listings.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.listings.pdf Binary files differnew file mode 100644 index 00000000000..0d388f2c708 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.listings.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.listings.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.listings.tex new file mode 100644 index 00000000000..6dd302feb09 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.listings.tex @@ -0,0 +1,48 @@ +% http://tex.stackexchange.com/questions/131546/ +\documentclass{article} + +\usepackage{xcolor} +\usepackage{listings} +\usepackage{xsim} + +\lstset{ + frame=single, + xleftmargin=20pt, + numbers=left, + numberstyle=\small, + tabsize=2, + breaklines, + showspaces=false, + showstringspaces=false, + language=C, + basicstyle=\small\ttfamily, + commentstyle=\itshape\color{gray} +} + +\begin{document} + +\begin{exercise}[points=6] +Consider the following C program. +\begin{lstlisting} +#include <stdio.h> + +int main(int argc, char *argv[]) { + printf("hello, world\n"); +} +\end{lstlisting} +\end{exercise} +\begin{solution} +Consider the following C program. +\begin{lstlisting} +#include <stdio.h> + +int main(int argc, char *argv[]) { + printf("hello, world\n"); +} +\end{lstlisting} +\end{solution} + +\pagebreak +\printsolutions + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.multiplechoice.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.multiplechoice.pdf Binary files differnew file mode 100644 index 00000000000..02dac6c4df9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.multiplechoice.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.multiplechoice.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.multiplechoice.tex new file mode 100644 index 00000000000..e0db3eb0c52 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.multiplechoice.tex @@ -0,0 +1,70 @@ +\documentclass{scrartcl} +\usepackage[clear-aux]{xsim} + +\usepackage{enumitem,amssymb,fmtcount} +\newlist{choices}{itemize}{1} +\setlist[choices]{label=$\Box$} +\newcommand*\choice{\item} + +\DeclareExerciseProperty{choices} +\DeclareExerciseProperty*{multiple} +\DeclareExerciseEnvironmentTemplate{mc} + {% + \UseExerciseTemplate{begin}{default}% + \IfExerciseBooleanPropertyTF{multiple} + {Select one or more correct answers} + {% + \GetExercisePropertyT{choices} + {Select \numberstringnum{#1} correct answer\ifnum#1>1 s\fi.}% + }% + \begin{choices} + } + {% + \end{choices} + \UseExerciseTemplate{end}{default}% + } + +\DeclareExerciseType{mc}{ + exercise-env = multiplechoice , + solution-env = correctchoices , + exercise-name = Question , + solution-name = Solution , + exercise-template = mc , + solution-template = mc , + counter = exercise +} + +\xsimsetup{ + exercise/name = Question , + solution/name = Solution +} + +\begin{document} + +\section{Questions} +\begin{multiplechoice}[choices=1] + \choice one + \choice two + \choice three + \choice four +\end{multiplechoice} + +\begin{exercise} + Answer this question on a separate sheet. +\end{exercise} + +\begin{multiplechoice}[multiple] + \choice one + \choice two + \choice three + \choice four +\end{multiplechoice} + +\begin{multiplechoice}[choices=2] + \choice one + \choice two + \choice three + \choice four +\end{multiplechoice} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.pointsums.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.pointsums.pdf Binary files differnew file mode 100644 index 00000000000..aa822a1bd7a --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.pointsums.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.pointsums.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.pointsums.tex new file mode 100644 index 00000000000..29d7ac0cdc1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.pointsums.tex @@ -0,0 +1,30 @@ +\documentclass{article} +\usepackage{xsim,lipsum} + +\NewDocumentCommand\printcompletepoints{}{% + \TotalExerciseGoals{points + bonus-points} + {\,\XSIMtranslate{point}} + {\,\XSIMtranslate{points}}% +} + +\NewDocumentCommand\pointsandbonus{}{% + \TotalExerciseGoal{points}{}{}% + \IfExerciseGoalsSumTF{bonus-points}{=0} + {} + {\,(+\,\TotalExerciseGoal{bonus-points}{}{})}% + \,\XSIMtranslate{points}% +} + +\begin{document} + +\begin{exercise}[points=3,bonus-points=1] + \lipsum[4] +\end{exercise} + +\begin{exercise}[points=8,bonus-points=3] + \lipsum[4] +\end{exercise} + +\printtotalpoints\ vs.\@ \printcompletepoints\ vs.\@ \pointsandbonus + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.randomexercises.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.randomexercises.pdf Binary files differnew file mode 100644 index 00000000000..773d34f495b --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.randomexercises.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.randomexercises.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.randomexercises.tex new file mode 100644 index 00000000000..60877b1a4ab --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.randomexercises.tex @@ -0,0 +1,58 @@ +\documentclass{article} +\usepackage{xsim} + +\DeclareExerciseCollection{foo} + +\usepackage{filecontents} +\begin{filecontents*}{random.tex} +\begin{exercise}[ID=A] + exercise A +\end{exercise} +\begin{solution} + solution A +\end{solution} +\begin{exercise}[ID=B] + exercise B +\end{exercise} +\begin{solution} + solution B +\end{solution} +\begin{exercise}[ID=C] + exercise C +\end{exercise} +\begin{solution} + solution C +\end{solution} +\begin{exercise}[ID=D] + exercise D +\end{exercise} +\begin{solution} + solution D +\end{solution} +\begin{exercise}[ID=E] + exercise E +\end{exercise} +\begin{solution} + solution E +\end{solution} +\begin{exercise}[ID=F] + exercise F +\end{exercise} +\begin{solution} + solution F +\end{solution} +\end{filecontents*} + +\begin{document} + +\collectexercises{foo} +\input{random.tex} +\collectexercisesstop{foo} + +\section*{Exercises} +\printrandomexercises[collection=foo,exclude=D]{3} + +\section*{Solutions} +\printsolutions* + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-199360.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-199360.pdf Binary files differnew file mode 100644 index 00000000000..94925495985 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-199360.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-199360.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-199360.tex new file mode 100644 index 00000000000..334275140ab --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-199360.tex @@ -0,0 +1,60 @@ +% http://tex.stackexchange.com/a/199360/ +\documentclass{scrartcl} +\usepackage[clear-aux]{xsim} + +\usepackage{tcolorbox,blindtext} + +\DeclareExerciseEnvironmentTemplate{custom} + {% + \begin{tcolorbox}[ + width = \textwidth , + colbacktitle = \IfInsideSolutionTF{green}{red} , + coltitle = black , + title = {\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}]} + {\end{tcolorbox}} + +\xsimsetup{ + exercise/template = custom , + solution/template = custom +} + +\begin{document} + +\begin{exercise} + First Question +\end{exercise} +\begin{solution} + Yes, it's a question +\end{solution} + +\begin{exercise}[print=false,use] + Question: What is special about Brontosaurs? +\end{exercise} +\begin{solution} + They are thin at one end, thick in the middle and thin on the end again +\end{solution} + +\begin{exercise} + Proof +\begin{equation} + a^2 + b^2 = c^2 +\end{equation} +\end{exercise} +\begin{solution} + to be done +\end{solution} + +\begin{exercise} + Cite a Latin Text +\end{exercise} +\begin{solution} + \textcolor{blue}{\blindtext} +\end{solution} + +\begin{exercise} + \textcolor{red}{\textbf{Cite a Latin text again}} +\end{exercise} + +\printsolutions* + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-299534.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-299534.pdf Binary files differnew file mode 100644 index 00000000000..c006aeb34c3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-299534.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-299534.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-299534.tex new file mode 100644 index 00000000000..1c2be46df39 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-299534.tex @@ -0,0 +1,32 @@ +% http://tex.stackexchange.com/q/299534/ +\documentclass{article} +\usepackage{pythontex} +\usepackage{xsim} + +\begin{document} + +\section{Test} + +\begin{exercise}[subtitle = Codeless Question,points=10] + A question without code, worth 10 points. Subtitle and point values are in + correct place. +\end{exercise} +\begin{solution} + Solution 1 +\end{solution} + +\begin{exercise}[subtitle = Codeful Question,points=15] +Now with PythonTeX: +\begin{pyblock} +print("hello, world!") +sum = 0 +for j in range(0,100): + sum += j +print(sum) +\end{pyblock} +\end{exercise} +\begin{solution} + Solution 2 +\end{solution} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-305110.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-305110.pdf Binary files differnew file mode 100644 index 00000000000..fb92e875a91 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-305110.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-305110.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-305110.tex new file mode 100644 index 00000000000..c10928da0ce --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-305110.tex @@ -0,0 +1,67 @@ +% https://tex.stackexchange.com/q/305110 +\documentclass[12pt, a4paper]{book} +\usepackage{xsim} + +\xsimsetup{ + exercise/within = section , + exercise/the-counter = \thesection.\arabic{exercise} +} + +\begin{document} +\part{EXCERCISES} +\chapter{Topic 1} + +\section{Section} + +\begin{exercise} + I'm an excercise. +\end{exercise} +\begin{solution} + I'm a solution. +\end{solution} + +\section{Section} + +\begin{exercise} + I'm an excercise. +\end{exercise} +\begin{solution} + I'm a solution. +\end{solution} + +\chapter{Topic 2} + +\section{Section} +\begin{exercise} + I'm an excercise. +\end{exercise} +\begin{solution} + I'm a solution. +\end{solution} + +\section{Section} +\begin{exercise} + I'm an excercise. +\end{exercise} +\begin{solution} + I'm a solution. +\end{solution} + +\setcounter{chapter}{0} +\part{SOLUTIONS} + +\chapter{Topic 1} +\section{Section} +\printsolutions[chapter=1,section=1] + +\section{Section} +\printsolutions[chapter=1,section=2] + +\chapter{Topic 2} +\section{Section} +\printsolutions[chapter=2,section=1] + +\section{Section} +\printsolutions[chapter=2,section=2] + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-338165.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-338165.pdf Binary files differnew file mode 100644 index 00000000000..f6557530a1d --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-338165.pdf 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} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-350028.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-350028.pdf Binary files differnew file mode 100644 index 00000000000..ef781218a8e --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-350028.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-350028.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-350028.tex new file mode 100644 index 00000000000..ebe090413c9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-350028.tex @@ -0,0 +1,135 @@ +% http://tex.stackexchange.com/q/350028/ +\documentclass{book} + +\usepackage{xsimverb} +\usepackage{xsim} +\usepackage[most]{tcolorbox} +\tcbuselibrary{skins,breakable} + +\DeclareExerciseEnvironmentTemplate{tcolorbox} + {% + \tcolorbox[ + enhanced, + colframe=green!20!black, + colback=yellow!10!white, + coltitle=green!40!black, + fonttitle=\bfseries, + underlay={% + \begin{tcbclipinterior} + \shade[ + inner color=\IfInsideSolutionTF{red!50!yellow}{green!80!yellow}, + outer color=yellow!10!white] + (interior.north west) circle (2cm); + \draw[help lines,step=5mm,yellow!80!black,shift={(interior.north west)}] + (interior.south west) grid (interior.north east); + \end{tcbclipinterior}% + }, + attach title to upper=\quad, + title = \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter} + \IfExercisePropertySetT{points}{% + (\GetExerciseProperty{points} + \IfExerciseGoalSingularTF{points} + {\XSIMtranslate{point}} + {\XSIMtranslate{points}})% + }]% + \IfInsideSolutionT{\label{solution:\ExerciseID}}% + } + {% + \endtcolorbox + \vspace*{\baselineskip} + \IfInsideSolutionTF + {% + \noindent Exercise~\GetExerciseProperty{counter} is on + page~\GetExerciseProperty{page}.% + } + {% + \noindent The solution of this exercise is on + page~\pageref{solution:\ExerciseID}.% + }% + \vspace{\baselineskip} + } + +\xsimsetup{ + exercise/template = tcolorbox , + solution/template = tcolorbox +} + +\usepackage{fmtcount,etoolbox} +\newrobustcmd*\mystringnum[2]{\csname#1stringnum\endcsname{#2}} +\renewcommand*\thechapter{\mystringnum{number}{\value{chapter}}} +\renewcommand*\thesection{\arabic{chapter}.\arabic{section}} + +% for the header: \MakeUppercase{\mystringnum{number}{1}} +% => \mystringnum{NUMBER}{1} +% => \NUMBERstringnum{1} +% elsewhere: \mystringnum{number}{1} +% => \numberstringnum{1} + +\usepackage{totcount} +\regtotcounter{chapter} + +\newcounter{chapters} +\setcounter{chapters}{1} +\newcommand*\printsolutionsperchapter{% + \whileboolexpr + { test { \ifnumless {\value{chapters}} {\totvalue{chapter}+1} } } + {% + \printsolutions[chapter=\value{chapters},headings-template=per-chapter] + \stepcounter{chapters}% + }% +} + +\begin{document} + +\chapter{The First Chapter} + +\begin{exercise} + Compute the derivative of the following function: + \begin{equation*} + f(x) = \sin((\sin x)^2) + \end{equation*} +\end{exercise} +\begin{solution} + The derivative is: + \begin{align*} + f’(x) &= ( \sin((\sin x)^2) )' + = \cos((\sin x)^2) \cdot 2\sin x \cos x + \end{align*} +\end{solution} + +\begin{exercise} + Compute the derivative of the following function: + \begin{equation*} + f(x) = \sin((\sin x)^2) + \end{equation*} +\end{exercise} +\begin{solution} + The derivative is: + \begin{align*} + f’(x) &= ( \sin((\sin x)^2) )' + = \cos((\sin x)^2) \cdot 2\sin x \cos x + \end{align*} +\end{solution} + +\chapter{The Second Chapter} + +\begin{exercise} + Compute the derivative of the following function: + \begin{equation*} + f(x) = (x^2+1) \sqrt{x^4+1} + \end{equation*} +\end{exercise} +\begin{solution} + The derivative is: + \begin{align*} + f’(x) &= ( (x^2+1) \sqrt{x^4+1} )' + = 2x\sqrt{x^4+1} + \frac{2x^3(x^2+1)}{\sqrt{x^4+1}} + \end{align*} +\end{solution} + +\clearpage +\section{Solutions of the Exercices} + +\printsolutionsperchapter + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369065.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369065.pdf Binary files differnew file mode 100644 index 00000000000..6aa9ab572bb --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369065.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369065.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369065.tex new file mode 100644 index 00000000000..b62b85127a4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369065.tex @@ -0,0 +1,77 @@ +% https://tex.stackexchange.com/q/369065/ +\documentclass{article} +\usepackage{xsim,tcolorbox,needspace} + +\xsimsetup{ + exercise/within=section , + exercise/the-counter = \thesection.\arabic{exercise} , + exercise/template=cyan-box , + exercise/name=Example , + solution/template=red , + solution/print=true +} + +\DeclareExerciseEnvironmentTemplate{cyan-box} + {% + \begin{tcolorbox}[arc=0mm,boxrule=1pt,colback=white,colframe=cyan,leftrule=3mm] + \textsf{% + \MakeUppercase{% + \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}% + }% + }% + \GetExercisePropertyT{subtitle}{ \textit{#1}}% + \quad + } + {\end{tcolorbox}} + +\DeclareExerciseEnvironmentTemplate{red} + {% + \par + \Needspace*{2\baselineskip} + \noindent + \textsf{\textcolor{red}{\MakeUppercase{\XSIMmixedcase{\GetExerciseName}}}}% + \quad + } + {\par\bigskip} + +\begin{document} + +\section{My first set of exercises} +\begin{exercise} + Prove that $\frac{1}{2}\Delta(f_{ij}f^{ij}) + =\nabla^{k}f^{ij}+f^{ij}f^{k}[2\nabla_{i}R_{jk}-\nabla_{k}R_{ij}]$ +\end{exercise} +\begin{solution} + From \dots +\end{solution} + +\begin{exercise} + Prove that Paulinho is smart. +\end{exercise} +\begin{solution} + All ducks are smart. Paulinho is a duck. Therefore, Paulinho is smart. +\end{solution} + +\begin{exercise} + Prove that Paulinho is smart. +\end{exercise} +\begin{solution} + All ducks are smart. Paulinho is a duck. Therefore, Paulinho is smart. +\end{solution} + +\section{My second set of exercises} +\begin{exercise} + Prove that Paulinho is smart. +\end{exercise} +\begin{solution} + All ducks are smart. Paulinho is a duck. Therefore, Paulinho is smart. +\end{solution} + +\begin{exercise} + Prove that Paulinho is smart. +\end{exercise} +\begin{solution} + All ducks are smart. Paulinho is a duck. Therefore, Paulinho is smart. +\end{solution} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369636.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369636.pdf Binary files differnew file mode 100644 index 00000000000..2bc106f3035 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369636.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369636.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369636.tex new file mode 100644 index 00000000000..e13b8653f4c --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369636.tex @@ -0,0 +1,46 @@ +% https://tex.stackexchange.com/q/369686/ +\documentclass[a4paper,11pt]{article} +\usepackage[top=2cm, bottom=3cm, left=4cm, right=4cm]{geometry} + +\usepackage[T1]{fontenc} +\usepackage{fourier} +\usepackage{tgpagella} +\usepackage[utf8]{inputenc} + +\usepackage{xsim,needspace,adjustbox,scrextend} + +\xsimsetup{ + exercise/the-counter = \arabic{exercise}. , + exercise/template = square +} + +\DeclareExerciseEnvironmentTemplate{square} + {% + \Needspace*{2\baselineskip}% + \addmargin[0pt]{.15\textwidth}% + \par\noindent + \adjustbox{ + fbox = 1pt 0pt, + lap = {\textwidth}, + valign = t, + set vsize = {0pt}{0pt} + }{\rule{0pt}{20pt}\hspace{20pt}}% + \textbf{\GetExerciseProperty{counter}} % + } + {\endaddmargin\vspace{\baselineskip}} + +\usepackage{lipsum} + +\begin{document} + +\noindent\hrulefill + +\begin{exercise} + \lipsum[1] +\end{exercise} + +\begin{exercise} + \lipsum[2] +\end{exercise} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369803.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369803.pdf Binary files differnew file mode 100644 index 00000000000..73eab39f10b --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369803.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369803.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369803.tex new file mode 100644 index 00000000000..58b6800f937 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369803.tex @@ -0,0 +1,50 @@ +% https://tex.stackexchange.com/q/369803 +\documentclass[a4paper,parskip=half]{scrartcl} +\usepackage[utf8]{inputenc} +\usepackage[ngerman]{babel} + +\usepackage{amsmath} +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{amssymb} + +\usepackage[left=2cm,right=2.5cm,top=2.5cm,bottom=2cm]{geometry} + +\usepackage{xsim,siunitx} +\DeclareExerciseTagging{difficulty} +\DeclareExerciseEnvironmentTemplate{custom} + {% + \subsection* + {% + \XSIMmixedcase{\GetExerciseName}\nobreakspace + \GetExerciseProperty{counter}% + \IfInsideSolutionF + {% + \IfExercisePropertySetT{subtitle} + { {\normalfont(\GetExerciseProperty{subtitle})}}% + }% + }% + }{} + +\xsimsetup{ + exercise/name = \XSIMtranslate{question} , + exercise/template=custom , + solution/print=true +} + +\begin{document} + +\begin{exercise}[ID=wdsw, subtitle = Widerstandswürfel , difficulty = 2] + Gegeben ist ein Würfel, wobei jede der Kanten einen Widerstand von $R = + \SI{1}{\ohm}$ hat. + + Wie groß ist der Widerstand entlang einer Raumdiagonale? +\end{exercise} +\begin{solution} + Wir wollen den Widerstand zwischen den Punkten $X$ und $Y$ bestimmen, also + entlang der Raumdiagonale (siehe Abb. \ref{fig:wdsws1}). Weil die + Raumdiagonale eine Symmetrieachse ist, sollte das Problem symmetrisch sein, + und deswegen eine recht einfache Lösung haben. +\end{solution} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-15093.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-15093.pdf Binary files differnew file mode 100644 index 00000000000..3dc9fb16494 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-15093.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-15093.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-15093.tex new file mode 100644 index 00000000000..1f3fcfefcb7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-15093.tex @@ -0,0 +1,133 @@ +% http://texwelt.de/wissen/fragen/15093/ +\documentclass[paper=a4]{scrartcl} +\usepackage[utf8]{inputenc} +\usepackage[ngerman]{babel} + +\usepackage{xsim,needspace} + +\DeclareExerciseTagging{AFB} +\DeclareExerciseEnvironmentTemplate{myexam} + { + \par\vspace{\baselineskip} + \Needspace*{3\baselineskip} + \noindent + \textbf{\IfInsideSolutionTF{Lösung}{Aufgabe}~\GetExerciseProperty{counter}.}% + \GetExercisePropertyT{subtitle}{\quad\textit{#1}}% + \hfill + \GetExercisePropertyT{AFB}{Schwierigkeit: #1}% + \GetExercisePropertyT{points}{% + \marginpar{% + \PropertyValue + \GetExercisePropertyT{bonus-points}{+\PropertyValue}% + \,P.% + }% + }% + \par\noindent + } + {} + +\xsimsetup{exercise/template=myexam} + +\begin{document} + +\begin{exercise}[subtitle=Eine Frage, AFB=1, points=3] + Das ist eine sehr tolle Frage. +\end{exercise} + +\begin{exercise}[AFB=2, points=3] + Das ist eine sehr tolle Frage. +\end{exercise} + +\begin{exercise}[AFB=3] + Das ist eine sehr tolle Frage. +\end{exercise} + +\begin{exercise}[subtitle=Eine andere Frage, AFB=4, points=3] + Das ist eine sehr tolle Frage. +\end{exercise} + +\begin{exercise}[subtitle=Eine Frage, AFB=2] + Das ist eine sehr tolle Frage. +\end{exercise} + +\end{document} + +% andere Idee: +\documentclass[paper=a4]{scrartcl} +\usepackage[utf8]{inputenc} +\usepackage[ngerman]{babel} + +\usepackage{xsim} + +\DeclareExerciseTagging{AFB} + +\DeclareExerciseEnvironmentTemplate{AFB}{% + \subsection*{% + \XSIMmixedcase{\GetExerciseName}\nobreakspace + \GetExerciseProperty{counter}% + \IfExercisePropertySetT{subtitle}% + { {\normalfont\itshape\GetExerciseProperty{subtitle}}}% + } + \marginpar{% + \GetExercisePropertyT{AFB}{% + \leavevmode\llap{Schwierigkeit: \PropertyValue\hspace*{\marginparsep}}% + }% + \GetExercisePropertyT{points}{% + \PropertyValue + \nobreakspace\XSIMtranslate{points}% + }% + }% +}{} + +\DeclareExerciseEnvironmentTemplate{AFBsol}{% + \subsection*{% + \XSIMmixedcase{\GetExerciseName}\nobreakspace + \GetExerciseProperty{counter}% + \IfExercisePropertySetT{subtitle}% + { {\normalfont\itshape\GetExerciseProperty{subtitle}}}% + } + \textit{\small + \GetExercisePropertyT{AFB}{Schwierigkeit: \PropertyValue}% + \GetExercisePropertyT{points}{% + \IfExercisePropertySetT{AFB}{ }% + (\PropertyValue\nobreakspace\XSIMtranslate{points})% + }% + }% + \par\noindent +}{} + +\DeclareExerciseTranslation{German}{default-heading}{Lösungen} + +\xsimsetup{ + exercise/template=AFB , + solution/template=AFBsol , + exercise/name=Aufgabe +} + +\begin{document} + +\begin{exercise}[subtitle=Eine Frage, AFB=1, points=3] + Das ist eine sehr tolle Frage. +\end{exercise} +\begin{solution} + Das ist eine tolle Lösung! +\end{solution} +\begin{exercise}[AFB=2, points=3] + Das ist eine sehr tolle Frage. +\end{exercise} + +\begin{exercise}[AFB=3] + Das ist eine sehr tolle Frage. +\end{exercise} + +\begin{exercise}[subtitle=Eine andere Frage, AFB=4, points=3] + Das ist eine sehr tolle Frage. +\end{exercise} + +\begin{exercise}[subtitle=Eine Frage, AFB=2] + Das ist eine sehr tolle Frage. +\end{exercise} + +\printsolutions + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-6698.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-6698.pdf Binary files differnew file mode 100644 index 00000000000..000663bf445 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-6698.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-6698.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-6698.tex new file mode 100644 index 00000000000..9e388b9f690 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-6698.tex @@ -0,0 +1,86 @@ +% http://texwelt.de/wissen/fragen/6698/ +\documentclass{article} +\usepackage[utf8]{inputenc} +\usepackage[ngerman]{babel} + +\usepackage{needspace} +\usepackage{xsim} +\xsimsetup{ + exercise/name = Aufgabe , + solution/name = Lösung , + exercise/within = section , + exercise/the-counter = \thesection.\arabic{exercise} , + exercise/template = mine +} + +\newif\iflist + +\DeclareExerciseEnvironmentTemplate{mine}{ + \par\vspace{\baselineskip} + \Needspace*{3\baselineskip} + \noindent + \textbf{\GetExerciseName~\GetExerciseProperty{counter}}% + \GetExercisePropertyT{subtitle}{\quad\textit{#1}}% + \iflist + \GetExercisePropertyT{page}{ (Seite~#1)}% + \fi + % not necessary if you don't use points: + \GetExercisePropertyT{points}{% + \marginpar{% + \PropertyValue + \GetExercisePropertyT{bonus-points}{+\PropertyValue}% + \,\XSIMtranslate{points-abbr}% + }% + }% + \par\noindent +} +{} + +\usepackage{multicol} + +\begin{document} + +\section{Erstes Kapitel} +\begin{exercise} + Eine erste Aufgabe +\end{exercise} +\begin{exercise} + Eine zweite Aufgabe +\end{exercise} + +\subsection{Erstes Unterkapitel} +\begin{exercise} + Eine Aufgabe in einem Unterkapitel +\end{exercise} +\begin{exercise} + Noch eine Aufgabe in einem Unterkapitel +\end{exercise} + +\subsubsection{Tiefer geschachteltes Unterkapitel} +\begin{exercise} + Noch eine Aufgabe +\end{exercise} + +\subsubsection{Weiter geschachtelt} +\begin{exercise} + Eine weitere Aufgabe +\end{exercise} + +\subsection{Zweites Unterkapitel} +\begin{exercise} + Und eine weitere Aufgabe +\end{exercise} + +\clearpage + +\section{Zweites Kapitel} +\begin{exercise} + Eine Aufgabe in einem anderen Kapitel +\end{exercise} + +\begin{multicols}{2}[\section{Aufgabenübersicht}] + \listtrue + \printcollection{all exercises} +\end{multicols} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.pdf Binary files differnew file mode 100644 index 00000000000..b8f033c7599 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.tex new file mode 100644 index 00000000000..1b7b13f98b3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.tex @@ -0,0 +1,237 @@ +\documentclass{article} +\usepackage{xsim,lipsum,tcolorbox} + +\DeclareExerciseType{question}{ + exercise-env = question , + solution-env = hint , + exercise-name = Question , + solution-name = Hint , + exercise-template = default , + solution-template = default , + counter = exercise % shares a counter with the `exercise' type +} + +\DeclareExerciseType{problem}{ + exercise-env = problem , + solution-env = answer , + exercise-name = Problem , + solution-name = Answer , + exercise-template = tcolorbox , + solution-template = tcolorbox +} + +\DeclareExerciseProperty{grade} +\DeclareExerciseProperty{difficulty} + +\tcbuselibrary{breakable} +\DeclareExerciseEnvironmentTemplate{tcolorbox} + {% + \newcommand*\writehere{% + \IfInsideSolutionTF{}{% + \tcblower + \emph{Your answer:} + \vspace*{4cm} + }% + } + \vspace{\baselineskip} + \tcolorbox[ + colback = red!5!white , + colframe = red!75!black , + colbacktitle = yellow!50!red , + coltitle = red!25!black , + fonttitle = \bfseries , + subtitle style = { + boxrule = 0.4pt , + colback = yellow!50!red!25!white + } , + breakable , + title = \GetExerciseName~\GetExerciseProperty{counter} + \IfExercisePropertySetT{points}{% + (\GetExerciseProperty{points} + \IfExerciseGoalSingularTF{points} + {\XSIMtranslate{point}} + {\XSIMtranslate{points}})% + }] + \IfInsideSolutionF{% + \IfExercisePropertySetT{tags}{% + Tags: \ListExerciseTags{tags}{, } \par + }% + }% + } + {% + \endtcolorbox + \vspace{\baselineskip} + } + +\xsimsetup{ + % tags = {geometry} , + % topics = {geometry} + % tags/ingore-untagged % if true untagged exercise will be printed regardless + % % which tags have been chosen +} + +\begin{document} + +\gradingtable \par \bigskip + +Total: \printtotalpoints \par +from questions: \printpoints{question} \par +from exercises: \printpoints{exercise} \par +from problems: \printpoints{problem} \par \bigskip + +Total bonus: \printtotalbonus \par +from questions: \printbonus{question} \par +from exercises: \printbonus{exercise} \par +from problems: \printbonus{problem} \par + +% 1 +\begin{exercise}[points=4,bonus-points=1,topics=geometry,tags={geometry,triangles},grade=7] + \lipsum[1] +\begin{verbatim} +foo x^2 y^3 \gna +\end{verbatim} +\end{exercise} +\begin{solution}[print] + This is the solution to \ExerciseType\ \GetExerciseProperty{counter}. +\begin{verbatim} +foo x^2 y^3 \gna +\end{verbatim} +\end{solution} + +% 2 +\begin{exercise}[subtitle=Foo,points=5,topics=analysis,tags={analysis,functions},grade=11] + \lipsum[2] +\end{exercise} +\begin{solution} + This is the solution to \ExerciseType\ \GetExerciseProperty{counter}. +\end{solution} + +% 3 +\begin{problem}[tags={analysis,functions}] + \lipsum[3] + \writehere +\end{problem} +\begin{answer} + This is the solution to \ExerciseType\ \GetExerciseProperty{counter}. +\end{answer} + +% 4 +\begin{question} + \lipsum[4] + + \verb+\ExerciseID+: \GetExerciseAliasProperty{ID} + + \verb+\GetExerciseProperty{id}+: \GetExerciseProperty{id} + + \verb+\GetExerciseAliasProperty{ID}+: \GetExerciseAliasProperty{ID} + + \verb+\GetExerciseProperty{ID}+: \GetExerciseProperty{ID} +\end{question} +\begin{hint} + This is the solution to \ExerciseType\ \GetExerciseProperty{counter}. +\end{hint} + +% 5 +\begin{problem}[points=2] + \lipsum[3] + + \verb+\ExerciseID+: \GetExerciseAliasProperty{ID} + + \verb+\GetExerciseProperty{id}+: \GetExerciseProperty{id} + + \verb+\GetExerciseAliasProperty{ID}+: \GetExerciseAliasProperty{ID} + + \verb+\GetExerciseProperty{ID}+: \GetExerciseProperty{ID} + \writehere +\end{problem} +\begin{answer} + This is the solution to \ExerciseType\ \GetExerciseProperty{counter}. +\end{answer} + +% 6 +\begin{problem}[points=1] + \lipsum[3] + + \verb+\ExerciseID+: \GetExerciseAliasProperty{ID} + + \verb+\GetExerciseProperty{id}+: \GetExerciseProperty{id} + + \verb+\GetExerciseAliasProperty{ID}+: \GetExerciseAliasProperty{ID} + + \verb+\GetExerciseProperty{ID}+: \GetExerciseProperty{ID} +\end{problem} +\begin{answer} + This is the solution to \ExerciseType\ \GetExerciseProperty{counter}. +\end{answer} + +% 7 +\begin{exercise}[ID=test] + \lipsum[5] + + \verb+\ExerciseID+: \GetExerciseAliasProperty{ID} + + \verb+\GetExerciseProperty{id}+: \GetExerciseProperty{id} + + \verb+\GetExerciseAliasProperty{ID}+: \GetExerciseAliasProperty{ID} + + \verb+\GetExerciseProperty{ID}+: \GetExerciseProperty{ID} +\end{exercise} +\begin{solution} + This is the solution to \ExerciseType\ \GetExerciseProperty{counter}. +\end{solution} + +% 8 +\begin{exercise}[print=false,use=false] + \lipsum[5] +\end{exercise} +\begin{solution} + This is the solution to \ExerciseType\ \GetExerciseProperty{counter}. +\end{solution} + +% \printsolutionstype{exercise} + +\printsolutions* + +\section{Statistics} + +\ForEachUsedExerciseByType{% + \noindent\XSIMmixedcase{\ExerciseParameterGet{#1}{exercise-name}}~#3: \\ + \hspace*{2em}id: #2, type: #1, subtitle: #4, points: #5, bonus: #6\par \medskip +} + +\bigskip + +\ForEachUsedExerciseByID{% + \noindent\XSIMmixedcase{\ExerciseParameterGet{#1}{exercise-name}}~#3: \\ + \hspace*{2em}id: #2, type: #1, subtitle: #4, points: #5, bonus: #6\par \medskip +} + +\bigskip + +\ForEachUsedExerciseByType{% + \ExercisePropertyIfSetT{#1}{#2}{points} + { \XSIMmixedcase{\ExerciseParameterGet{#1}{exercise-name}}~#3: #5~points\par }% +} + +\bigskip + +Number of questions: \numberofquestions \par +Number of exercises: \numberofexercises \par +Number of problems: \numberofproblems + +\section{Grading tables} + +\gradingtable[template=default*,type=exercise] \par \bigskip + +\gradingtable[template=default*,type=problem] \par \bigskip + +\gradingtable[template=default*] \par \bigskip + +% vertical +\gradingtable[type=exercise] \par \bigskip + +\gradingtable[type=problem] \par \bigskip + +\gradingtable + +\end{document} |