diff options
author | Karl Berry <karl@freefriends.org> | 2009-05-19 18:54:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-05-19 18:54:54 +0000 |
commit | 2d248026682e0a02fa2b004a0ad2f13f57d8535c (patch) | |
tree | 7088bbd745de030191c2d843c4b3f4d9d5c46d91 /Master/texmf-dist/doc/latex/latex-tipps-und-tricks/question.sty | |
parent | eecee5a57aa7fbeb22e0df8440fb3b06c5117fc7 (diff) |
move german latex docs out of texmf-doc
git-svn-id: svn://tug.org/texlive/trunk@13264 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/latex-tipps-und-tricks/question.sty')
-rw-r--r-- | Master/texmf-dist/doc/latex/latex-tipps-und-tricks/question.sty | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/question.sty b/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/question.sty new file mode 100644 index 00000000000..4207ecb84cf --- /dev/null +++ b/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/question.sty @@ -0,0 +1,59 @@ +% QUESTION.STY +% Erzeugt Sammlungen von Fragen und Antworten +\RequirePackage{ifthen} +\newsavebox{\collect} + +\@ifundefined{chapter} + {\newcounter{question} + \renewcommand{\thequestion} + {\arabic{question}}} + {\newcounter{question}[chapter] + \renewcommand{\thequestion} + {\thechapter-\arabic{question}} + \newcommand{\p@questioncnt} + {\thechapter-}} + +% Sammelt die Antworten, die zunaechst in Box \tmp +% erstellt werden, in \collect zum Drucken. +% Umgebung fuer die Fragen +\newenvironment{question}[1][] +{\begin{trivlist}\item[]\refstepcounter{question} + \makebox{\bfseries $\triangleright~$% + Frage~\thequestion% + \ifthenelse{\equal{#1}{}}% + {}{~(#1)}\hspace{0,5em}} +} +{\end{trivlist}} + +% Umgebung fuer die Loesungen +\newenvironment{answer}[1][] +{\global\setbox\collect=\vbox\bgroup + \unvbox\collect + \begin{trivlist}\item[] + \makebox{\bfseries $\triangleright~$% + Antwort~\thequestion% + \ifthenelse{\equal{#1}{}}{}{~(#1)}\hspace{0,5em}} +} +{\end{trivlist}\egroup} + +\newenvironment{answer*}[1][] +{\global\setbox\collect=\vbox\bgroup + \unvbox\collect + \begin{trivlist}\item[] + \makebox{\bfseries $\triangleright$~%% + \ifthenelse{\equal{#1}{}}{Antwort}{#1}\hspace{0,5em}} +} +{\end{trivlist}\egroup} + +% chapter* als Gliederung der Loesungen sowie +% Text der Standardueberschrift +\@ifundefined{chapter} + {\newcommand{\questionhead}[1]{\section*{#1}}} + {\newcommand{\questionhead}[1]{\chapter*{#1}}} +\newcommand{\qheadtitle}{Antworten zu den Fragen} + +% drucke die Antwortenbox +\newcommand{\printanswers}[1][\qheadtitle] + {\questionhead{#1} + \unvbox\collect + }
\ No newline at end of file |