diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/exsol/exsol.sty | 94 |
1 files changed, 54 insertions, 40 deletions
diff --git a/Master/texmf-dist/tex/latex/exsol/exsol.sty b/Master/texmf-dist/tex/latex/exsol/exsol.sty index 15b81643381..9b7f6a9a8fe 100644 --- a/Master/texmf-dist/tex/latex/exsol/exsol.sty +++ b/Master/texmf-dist/tex/latex/exsol/exsol.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2015 by Walter Daems <walter.daems@uantwerpen.org> +%% Copyright (C) 2018 by Walter Daems <walter.daems@uantwerpen.org> %% %% This file may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license @@ -22,24 +22,28 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{exsol} - [2016/05/13 v1.2 ExSol - Exercises and Solutions package (DMW)] + [2018/10/23 v1.4 ExSol - Exercises and Solutions package (DMW)] \RequirePackage{ifmtarg} \RequirePackage{fancyvrb} \RequirePackage{ifthen} \RequirePackage{kvoptions} \RequirePackage{multicol} +\RequirePackage{varwidth} \DeclareBoolOption[false]{local} \DeclareBoolOption[false]{nolabels} \DeclareStringOption[normalsize]{exercisesfontsize} \DeclareBoolOption[false]{exerciseaslist} \DeclareBoolOption[false]{copyexercisesinsolutions} \DeclareBoolOption[false]{minipage} +\DeclareBoolOption[false]{usesolutionserieslabels} \ProcessKeyvalOptions* \newcommand{\exercisesfontsize}{\csname \exsol@exercisesfontsize\endcsname} \newlength{\exsolexercisesaboveskip} \setlength{\exsolexercisesaboveskip}{0ex plus 1pt minus 1pt} +\addtolength{\exsolexercisesaboveskip}{-2\baselineskip} \newlength{\exsolexercisesbelowskip} \setlength{\exsolexercisesbelowskip}{0ex plus 1pt minus 1pt} +\addtolength{\exsolexercisesbelowskip}{\baselineskip} \newlength{\exsolexercisetopbottomsep} \setlength{\exsolexercisetopbottomsep}{0pt plus 0pt minus 1pt} \newlength{\exsolexerciseleftmargin} @@ -152,28 +156,27 @@ {% \ifthenelse{\boolean{exsol@minipage}}{\begin{minipage}[t]{\textwidth}}{}% \ifthenelse{\boolean{exsol@exerciseaslist}} - {\begin{list}% - {% - }% - {% - \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[\ifexsol@nolabels~#1:\else% - \subparagraph{\exercisename{}~#1:}\fi] - }% - {\ifexsol@nolabels #1:\else% - \subparagraph{\exercisename{}~#1:}\fi} -} -{% - \ifthenelse{\boolean{exsol@exerciseaslist}}% - {\end{list}}{}% - \ifthenelse{\boolean{exsol@minipage}}{\end{minipage}}{\par}% + { + \begin{list}% + {} + {% + \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[\ifexsol@nolabels~#1:\else\exercisename{}~#1:\fi]% + } + {\ifexsol@nolabels #1:\else% + \subparagraph{\exercisename{}~#1:}\fi} + } + {% + \ifthenelse{\boolean{exsol@exerciseaslist}}% + {\end{list}}{}% + \ifthenelse{\boolean{exsol@minipage}}{\end{minipage}}{\par}% } \def\solution{\FV@Environment{}{solution}} \def\FVB@solution{% @@ -217,7 +220,7 @@ \setlength{\labelsep}{\exsolexerciselabelsep} \setlength{\labelwidth}{\exsolexerciselabelwidth}} \item[\ifexsol@nolabels #1:\else% - \subparagraph{\solutionname{}\@ifmtarg{#1}{}{~}#1:}\fi] + \solutionname{}\@ifmtarg{#1}{}{~}#1:\fi] }% {\ifexsol@nolabels #1:\else% \subparagraph{\solutionname{}\@ifmtarg{#1}{}{~}#1:}\fi} @@ -232,20 +235,19 @@ \define@key{exercises}{solsubrule}{\renewcommand\solsubrule{#1}} \define@key{exercises}{subrule}{\renewcommand\exsubrule{#1}\renewcommand\solsubrule{#1}} \newenvironment{exercises}[1][] -{ - \newcommand\columncount{1} % default - \newcommand\exsubrule{} % default - \newcommand\solsubrule{} % default - \setkeys{exercises}{#1} - \par\exercisesfontsize\rule{.25\linewidth}{0.15mm}% - \vspace*{\exsolexercisesaboveskip}% - \paragraph{\exercisesname}~\par - \ifthenelse{\columncount > 1}{\begin{multicols}{\columncount}}{} - } +{% + \newcommand\columncount{1}% default + \newcommand\exsubrule{}% default + \newcommand\solsubrule{}% default + \setkeys{exercises}{#1}% + \exercisesfontsize\rule{.25\linewidth}{0.15mm}% + \vspace*{-1.5\baselineskip}% + \paragraph{\exercisesname}~\\* + \ifthenelse{\columncount > 1}{\begin{multicols}{\columncount}}{}% + }% { - \ifthenelse{\columncount > 1}{\end{multicols}}{}\relax + \ifthenelse{\columncount > 1}{\end{multicols}}{}\relax% \vspace*{-\baselineskip}\vspace*{\exsolexercisesbelowskip}% - %\rule{.25\linewidth}{0.15mm} \exsubrule\par} \define@key{exerciseseries}{columns}{\renewcommand\columncount{#1}} \define@key{exerciseseries}{exsubrule}{\renewcommand\exsubrule{#1}} @@ -257,7 +259,7 @@ \newcommand\columncount{1} % default \newcommand\exsubrule{} % default \newcommand\solsubrule{} % default - \setkeys{exerciseseries}{#1} + \setkeys{exerciseseries}{#1}% \paragraph{\seriesname~\theexerciseseries:~#2}~\par \ifthenelse{\columncount > 1}{\begin{multicols}{\columncount}}{} \immediate\write\solutionstream{\string\begin\string{solutionseries\string}% @@ -273,8 +275,8 @@ \newcommand\columncount{1} % default \newcommand\exsubrule{} % default \newcommand\solsubrule{} % default - \setkeys{exercises}{#1} - \paragraph{\seriesname~#3}~\par + \setkeys{exercises}{#1}% + \paragraph{\seriesname~#3\ifexsol@usesolutionserieslabels: #2\fi}~\par \ifthenelse{\columncount > 1}{\begin{multicols}{\columncount}}{} } { @@ -369,13 +371,21 @@ \renewcommand{\solutionsname}{Soluciones}% \renewcommand{\seriesname}{Serie}% } +\newif\ifnoexinchapter +\noexinchapterfalse \ifexsol@local \else \let\exsol@@makechapterhead\@makechapterhead \def\@makechapterhead#1{% \exsol@@makechapterhead{#1} + \ifnoexinchapter + \noexinchapterfalse + \else + \addtocounter{chapter}{-1} \immediate\write\solutionstream{\string\setcounter{chapter}{\arabic{chapter}}% \string\chapter{#1}}% + \addtocounter{chapter}{1} + \fi } \ifdefined\frontmatter \let\exsol@@frontmatter\frontmatter @@ -406,6 +416,10 @@ } \fi \fi +\newcommand{\noexercisesinnextchapter} +{ + \noexinchaptertrue +} \newcommand{\noexercisesinchapter} { \immediate\write\solutionstream{No exercises in this chapter} |