diff options
author | Karl Berry <karl@freefriends.org> | 2021-12-22 21:19:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-12-22 21:19:16 +0000 |
commit | 1893c64383b19ee50176ff757d31d519b5a38dbc (patch) | |
tree | f28661c2a1ed55d1fc1af52ddee019165b177b43 /Master/texmf-dist/tex | |
parent | 912c1a0f5dd79d444f4edbe0aa624128929bc158 (diff) |
srdp-mathematik (22dec21)
git-svn-id: svn://tug.org/texlive/trunk@61382 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/srdp-mathematik/srdp-mathematik.sty | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/srdp-mathematik/srdp-mathematik.sty b/Master/texmf-dist/tex/latex/srdp-mathematik/srdp-mathematik.sty index 9b9226b916f..2db76e9e25a 100644 --- a/Master/texmf-dist/tex/latex/srdp-mathematik/srdp-mathematik.sty +++ b/Master/texmf-dist/tex/latex/srdp-mathematik/srdp-mathematik.sty @@ -10,7 +10,7 @@ % \NeedsTeXFormat{LaTeX2e}[1996/12/26] -\ProvidesPackage{srdp-mathematik}[2021/11/09 v1.9.2 Standard-Schularbeitsformate] +\ProvidesPackage{srdp-mathematik}[2021/12/22 v1.9.3 Standard-Schularbeitsformate] \usepackage{color} @@ -116,10 +116,10 @@ \ProcessOptions\relax -\newcommand{\antwort}[2][]{\ifthenelse{\theAntworten=1}{\color[rgb]{1,0,0}#2\color[rgb]{0,0,0}}{#1}} +\newcommand{\antwort}[2][]{\ifthenelse{\theAntworten=1}{{\color[rgb]{1,0,0}#2}}{#1}} \newcommand{\info}[2][]{\ifthenelse{\theinfo=1}{ -\color[rgb]{0,0,1}{#2}\color[rgb]{0,0,0} +{\color[rgb]{0,0,1}#2} }{#1}} @@ -169,10 +169,29 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcounter{number} +\newcommand*\rfrac[2]{{}^{#1}\!/_{#2}} \makeatletter +\def\addifisinteger#1{% + \sbox\z@{\@tempcnta=0#1\relax}% + \expandafter\ifdim\wd\z@>\z@\relax + {}\else + \addtocounter{punkte}{#1}\fi} +\makeatother + +\makeatletter +\def\checkifinteger#1#2{% + \sbox\z@{\@tempcnta=0#1\relax}% + \expandafter\ifdim\wd\z@>\z@\relax + \scriptsize$\rfrac{#2}{2}$\small\else#1\fi} +\makeatother -\NewEnviron{beispiel}[2][\unskip]{\begin{minipage}[t]{0.88\textwidth} +\makeatletter + +\NewEnviron{beispiel}[2][\unskip]{\renewcommand{\arraystretch}{0}\tiny% +\begin{spreadtab}[\STsavecell\halbepunkte{a1} \STsavecell\halbepunktetrunc{b1}]{{tabular}{ccc}}\SThidecol#2/2&\SThidecol trunc(a1,0)\\\end{spreadtab}\normalsize\renewcommand{\arraystretch}{1}% + +\begin{minipage}[t]{0.88\textwidth} \addtocounter{number}{1} \begin{enumerate} \item[\thenumber.] {\BODY} @@ -180,17 +199,19 @@ \end{minipage} - \begin{minipage}[t]{0.1\textwidth} \raggedleft \small{\_\_\_/#2\addtocounter{punkte}{#2}\\\ifthenelse{\equal{#1}{\string 1/2}} - {$\left[{}^1{\mskip -5mu/\mskip -3mu}_2\right]$} - {\antwort{\footnotesize #1 \normalsize}}} + \begin{minipage}[t]{0.11\textwidth} \raggedleft \small{\_\_\_/\ifthenelse{\equal{#1}{\string 1/2}}{\checkifinteger{\halbepunkte}{#2}/}{\ifthenelse{\equal{#1}{\string 1}}{1/}{}}#2\addifisinteger{#2}\\ + \ifthenelse{\equal{#1}{\string 1/2}}{}{\antwort{\footnotesize #1 \normalsize}}} \end{minipage} \vspace{\baselineskip} } +% \scriptsize$\rfrac{1}{2}$\small +%\ifthenelse{\equal{#1}{\string 1/2}} +%{$\left[{}^1{\mskip -5mu/\mskip -3mu}_2\right]$} +% \newcommand{\pkte}[2][]{\hfill[0\,/\,\ifthenelse{\equal{#1}{\string 1/2}}{${}^1{\mskip -5mu/\mskip -3mu}_2$\,/\,}{}#2]} -\newcommand{\pkte}[2][]{\hfill[0\,/\,\ifthenelse{\equal{#1}{\string 1/2}}{${}^1{\mskip -5mu/\mskip -3mu}_2$\,/\,}{}#2]} - +\newcommand{\defgesamtpunkte}[1]{\setcounter{punkte}{#1}} % % % |