summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/exsol
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-08-30 21:39:23 +0000
committerKarl Berry <karl@freefriends.org>2014-08-30 21:39:23 +0000
commit576d771fa1ee205c48a93cdeeff84ae6eec69f58 (patch)
tree1514af48ae02e293b6841570c32806c70e2051cf /Master/texmf-dist/tex/latex/exsol
parent30819b8aa56e702e34aaaa8d288e4a246b1b5c0c (diff)
exsol (30aug14)
git-svn-id: svn://tug.org/texlive/trunk@35071 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/exsol')
-rw-r--r--Master/texmf-dist/tex/latex/exsol/exsol.sty56
1 files changed, 37 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/exsol/exsol.sty b/Master/texmf-dist/tex/latex/exsol/exsol.sty
index 94f5fc2fc12..4afcf4b74b8 100644
--- a/Master/texmf-dist/tex/latex/exsol/exsol.sty
+++ b/Master/texmf-dist/tex/latex/exsol/exsol.sty
@@ -22,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{exsol}
- [2013/05/12 v0.6 ExSol - Exercises and Solutions package (DMW)]
+ [2014/08/31 v0.91 ExSol - Exercises and Solutions package (DMW)]
\RequirePackage{fancyvrb}
\RequirePackage{ifthen}
\RequirePackage{kvoptions}
@@ -32,6 +32,26 @@
\DeclareBoolOption[false]{minipage}
\ProcessKeyvalOptions*
\newcommand{\exercisesfontsize}{\csname \exsol@exercisesfontsize\endcsname}
+\newlength{\exsolexercisesaboveskip}
+\setlength{\exsolexercisesaboveskip}{1ex plus 1pt minus 1pt}
+\newlength{\exsolexercisesbelowskip}
+\setlength{\exsolexercisesbelowskip}{1ex plus 1pt minus 1pt}
+\newlength{\exsolexercisetopbottomsep}
+\setlength{\exsolexercisetopbottomsep}{0pt plus 0pt minus 1pt}
+\newlength{\exsolexerciseleftmargin}
+\setlength{\exsolexerciseleftmargin}{1em}
+\newlength{\exsolexerciserightmargin}
+\setlength{\exsolexerciserightmargin}{1em}
+\newlength{\exsolexerciseparindent}
+\setlength{\exsolexerciseparindent}{0em}
+\newlength{\exsolexerciselabelsep}
+\setlength{\exsolexerciselabelsep}{0.5em}
+\newlength{\exsolexerciselabelwidth}
+\setlength{\exsolexerciselabelwidth}{0pt}
+\newlength{\exsolexerciseitemindent}
+\setlength{\exsolexerciseitemindent}{0pt}
+\newlength{\exsolexerciseparsep}
+\setlength{\exsolexerciseparsep}{\parskip}
\AtBeginDocument{
\newwrite\solutionstream
\immediate\openout\solutionstream=\jobname.sol.tex
@@ -107,24 +127,22 @@
{%
}%
{%
- \setlength{\topsep}{0pt}%
- \setlength{\leftmargin}{1em}%
- \setlength{\rightmargin}{1em}%
- \setlength{\listparindent}{0em}%
- \setlength{\itemindent}{0em}%
- \setlength{\parsep}{\parskip}}%
- \item[\hspace*{\leftmargin}\textit{\exercisename{}
- \theexercise:}]
+ \setlength{\topsep}{\exsolexercisetopbottomsep}%
+ \setlength{\leftmargin}{\exsolexerciseleftmargin}%
+ \setlength{\rightmargin}{\exsolexerciserightmargin}%
+ \setlength{\listparindent}{\exsolexerciseparindent}%
+ \setlength{\itemindent}{\exsolexerciseitemindent}%
+ \setlength{\parsep}{\exsolexerciseparsep}
+ \setlength{\labelsep}{\exsolexerciselabelsep}
+ \setlength{\labelwidth}{\exsolexerciselabelwidth}}
+ \item[\textit{~\exercisename{} \theexercise:~}]
}%
- {
- \textit{\exercisename{} \theexercise:}~
- }
+ {\textit{\exercisename{} \theexercise:}}
}
{%
- \ifthenelse{\boolean{exsol@exerciseaslist}}
- {\end{list}}{}
- \ifthenelse{\boolean{exsol@minipage}}{\end{minipage}}{}
- \vspace{1ex}\par
+ \ifthenelse{\boolean{exsol@exerciseaslist}}%
+ {\end{list}}{}%
+ \ifthenelse{\boolean{exsol@minipage}}{\end{minipage}}{\par}%
}
\def\solution{\FV@Environment{}{solution}}
\def\FVB@solution{%
@@ -151,9 +169,9 @@
\def\FVE@solution{\endgroup\@esphack}
\DefineVerbatimEnvironment{solution}{solution}{}
\newenvironment{exercises}
-{\par\exercisesfontsize\rule{.25\linewidth}{0.15mm}\\*~\\*%
- \textbf{\normalsize \exercisesname}\vspace*{1ex}\\}
-{~\\*\rule{.25\linewidth}{0.15mm}\par}
+{\par\exercisesfontsize\rule{.25\linewidth}{0.15mm}\vspace*{\exsolexercisesaboveskip}\\*%
+ \textbf{\normalsize \exercisesname}}
+{\vspace*{-\baselineskip}\vspace*{\exsolexercisesbelowskip}\rule{.25\linewidth}{0.15mm}\par}
\newcommand{\exercisename}{Exercise}
\newcommand{\exercisesname}{Exercises}
\newcommand{\solutionname}{Solution}