diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/listofanswers |
Initial commit
Diffstat (limited to 'macros/latex/contrib/listofanswers')
-rw-r--r-- | macros/latex/contrib/listofanswers/listofanswers.pdf | bin | 0 -> 555688 bytes | |||
-rw-r--r-- | macros/latex/contrib/listofanswers/listofanswers.sty | 80 |
2 files changed, 80 insertions, 0 deletions
diff --git a/macros/latex/contrib/listofanswers/listofanswers.pdf b/macros/latex/contrib/listofanswers/listofanswers.pdf Binary files differnew file mode 100644 index 0000000000..1e0ac9a526 --- /dev/null +++ b/macros/latex/contrib/listofanswers/listofanswers.pdf diff --git a/macros/latex/contrib/listofanswers/listofanswers.sty b/macros/latex/contrib/listofanswers/listofanswers.sty new file mode 100644 index 0000000000..b564c300b8 --- /dev/null +++ b/macros/latex/contrib/listofanswers/listofanswers.sty @@ -0,0 +1,80 @@ +\ProvidesPackage{listofanswers}[06/11/2012] + +% version 1.2 + +\newcounter{group} +\newcounter{exercise}[group] +\newcounter{subexercise}[exercise] + + +\newcommand{\group}{% + \refstepcounter{group} + \subsection*{\centering\exercisesname.\;\groupname\;\thegroup} + \addcontentsline{loa}{group}{\groupname\;\thegroup} +} + +\newcommand{\exercise}{% + \refstepcounter{exercise} + \@ifstar\exerciseStar\exerciseNoStar +} + +\newcommand{\exerciseNoStar}[1]{% + \@ifnextchar\bgroup{\exerciseNoStarTwo{#1}}{\exerciseNoStarOne{#1}} +} + +\newcommand{\exerciseNoStarOne}[1]{% + \textbf{\theexercise.} #1 +} + +\newcommand{\exerciseNoStarTwo}[2]{% + \textbf{\theexercise.} #1 + \addcontentsline{loa}{exercise}{% + \textbf{\theexercise.}~#2\quad + } +} + +\newcommand{\exerciseStar}[2]{% + \textbf{\theexercise*.} #1 + \addcontentsline{loa}{exercise}{% + \textbf{\theexercise.}~#2\quad + } +} + +\newcommand{\subexercise}[1]{% + \refstepcounter{subexercise} + \@ifnextchar\bgroup{\subexerciseTwo{#1}}{\subexerciseOne{#1}} +} + +\newcommand{\subexerciseOne}[1]{% + \@alph\thesubexercise) #1 +} + +\newcommand{\subexerciseTwo}[2]{% + \@alph\thesubexercise) #1 + \addcontentsline{loa}{subexercise}{% + \textbf{\theexercise.}~\@alph\thesubexercise)~#2\quad + } +} + +\newcommand*{\l@group}[2]{\subsection*{\centering #1, p. #2}} + +\newcommand*{\l@exercise}[2]{\noindent #1} + +\newcommand*{\l@subexercise}[2]{\noindent #1} + +\newcommand{\listofanswers}{% + \answershead + \renewcommand{\thefootnote}{\fnsymbol{footnote}} + \@starttoc{loa} + \addcontentsline{toc}{\answerstype}{\answersname} +} + +\@ifclassloaded{book} +{\newcommand{\answershead}{\chapter*{\answersname}} + \newcommand{\answerstype}{chapter}} +{\newcommand{\answershead}{\section*{\answersname}} + \newcommand{\answerstype}{section}} + +\newcommand{\answersname}{Respuestas} +\newcommand{\exercisesname}{EJERCICIOS} +\newcommand{\groupname}{Grupo} |