texlive[48977] Master/texmf-dist: exsol (23oct18)

commits+karl at tug.org commits+karl at tug.org
Tue Oct 23 22:44:24 CEST 2018


Revision: 48977
          http://tug.org/svn/texlive?view=revision&revision=48977
Author:   karl
Date:     2018-10-23 22:44:24 +0200 (Tue, 23 Oct 2018)
Log Message:
-----------
exsol (23oct18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/exsol/example-formulacollection.pdf
    trunk/Master/texmf-dist/doc/latex/exsol/example-local.pdf
    trunk/Master/texmf-dist/doc/latex/exsol/example-solutionbook.pdf
    trunk/Master/texmf-dist/doc/latex/exsol/example.pdf
    trunk/Master/texmf-dist/doc/latex/exsol/exsol.pdf
    trunk/Master/texmf-dist/source/latex/exsol/exsol.dtx
    trunk/Master/texmf-dist/source/latex/exsol/exsol.ins
    trunk/Master/texmf-dist/tex/latex/exsol/exsol.sty

Modified: trunk/Master/texmf-dist/doc/latex/exsol/example-formulacollection.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/exsol/example-local.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/exsol/example-solutionbook.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/exsol/example.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/exsol/exsol.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/exsol/exsol.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/exsol/exsol.dtx	2018-10-23 20:44:07 UTC (rev 48976)
+++ trunk/Master/texmf-dist/source/latex/exsol/exsol.dtx	2018-10-23 20:44:24 UTC (rev 48977)
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-% Copyright (C) 2016 by Walter Daems <walter.daems at uantwerpen.be>
+% Copyright (C) 2018 by Walter Daems <walter.daems at uantwerpen.be>
 %
 % This work may be distributed and/or modified under the conditions of
 % the LaTeX Project Public License, either version 1.3 of this license
@@ -30,7 +30,7 @@
 %<package|driver>\NeedsTeXFormat{LaTeX2e}
 %<driver>\ProvidesFile{exsol.dtx}
 %<package>\ProvidesPackage{exsol}
-%<package|driver>  [2016/05/13 v1.2 ExSol - Exercises and Solutions package (DMW)]
+%<package|driver>  [2018/10/23 v1.4 ExSol - Exercises and Solutions package (DMW)]
 %<*driver> 
 \documentclass[10pt,a4paper]{ltxdoc}
 \usepackage[english]{babel}
@@ -48,8 +48,8 @@
 \RecordChanges
 \newcommand{\exsol}{\textsc{ExSol}}
 \StopEventually{\PrintChanges\PrintIndex}
-\def\fileversion{1.2}
-\def\filedate{2016/05/05}
+\def\fileversion{1.4}
+\def\filedate{2018/10/23}
 \begin{document}
  \DocInput{exsol.dtx}
 \end{document}
@@ -97,6 +97,9 @@
 % exercises, introduced new options (local, nolabels), separate
 % counter for exerciseseries (only for use local mode), introduced
 % local mode}
+% \changes{v1.3}{2016/08/09}{\@ Correction of spacings and counters}
+% \changes{v1.4}{2018/10/23}{\@ Allowed for adding exerciseseries label in
+% solutionseries using option 'usesolutionserieslabels'}
 %
 % \DoNotIndex{\newcommand,\newenvironment}
 % \setlength{\parindent}{0em}
@@ -116,7 +119,7 @@
 % The package \exsol{} provides macros to allow
 % embedding exercises and solutions in the \LaTeX{} source of an
 % instructional text (e.g., a book or a course text) while keeping the
-% exercises and the solutions apart in the typeset result.
+% exercises and the solutions seperately in the typeset result.
 % 
 % In \emph{global mode} (the default), this corresponds to generating
 % the following separate documents:
@@ -132,7 +135,7 @@
 % the latter, you can generate a nice solution book.
 %
 % In \emph{local mode} (invoked by specifying the package option 'local'),
-% this corresponds to reading in the saved solutions in the current
+% this corresponds to inserting the saved solutions in the current
 % document at a later stage in the text.
 % 
 % \subsection{Why use \exsol{}?}
@@ -139,13 +142,12 @@
 % \begin{itemize}
 % \item It allows to keep the \LaTeX{} source of your exercises and their
 % solutions together in a single file, next to each other. Away with
-% the nightmare to keep your solutions in sync with the exercises.
+% the nightmare to keep your solutions in sync with the exercises!
 % \item It separates exercises and solutions, allowing you
 %   \begin{itemize}
 %   \item to only release the solution book to the instructors of the
 %     course (using global mode);
-%   \item to encourage students that you provide with the solutions
-%   separated from the exercises to first try solving the exercises
+%   \item to encourage students to first try solving the exercises
 %   without peeking into the list of solutions (or the solution book).
 %   \end{itemize}
 % \end{itemize}
@@ -276,7 +278,7 @@
 %
 %   \begin{exercise}
 %     Calculate $y = 5 + 7$
-%   \end{exercises}
+%   \end{exercise}
 %   \begin{solution}
 %     $y = 12$
 %   \end{solution}
@@ -283,7 +285,7 @@
 %
 %   \begin{exercise}
 %     Calculate $y = 7 - 12$
-%   \end{exercises}
+%   \end{exercise}
 %   \begin{solution}
 %     $y = -5$
 %   \end{solution}
@@ -294,7 +296,7 @@
 %
 %   \begin{exercise}
 %     Calculate $y = 5 \cdot 7$
-%   \end{exercises}
+%   \end{exercise}
 %   \begin{solution}
 %     $y = 35$
 %   \end{solution}
@@ -301,7 +303,7 @@
 %
 %   \begin{exercise}
 %     Calculate $y = 8 / 4$
-%   \end{exercises}
+%   \end{exercise}
 %   \begin{solution}
 %     $y = 2$
 %   \end{solution}
@@ -335,7 +337,7 @@
 
 \section{Introduction}
 
-In this text we explain how to wolve second-order polynomial
+In this text we explain how to solve second-order polynomial
 equations. 
 
 \section{Solving second-order polynomial equations}
@@ -414,9 +416,10 @@
     \end{eqnarray}
     Therefore, the length of the hypotenuse equals $5$.
   \end{solution}
-
 \end{exercises}
-
+And now, we can come to conclusion.
+\section{Conclusion}
+Solving second-order polynomial equations is very easy.
 \end{document}
 %</example>
 %\end{Verbatim}
@@ -509,7 +512,7 @@
 
 \usepackage{a4wide}
 \usepackage[german]{babel}
-\usepackage[local,nolabels,exerciseaslist]{exsol}
+\usepackage[local,nolabels,exerciseaslist,usesolutionserieslabels]{exsol}
 \usepackage{enumitem}
 
 \setlength{\exsolexercisetopbottomsep}{0pt plus 0pt minus 1pt}
@@ -695,6 +698,7 @@
 \RequirePackage{ifthen}
 \RequirePackage{kvoptions}
 \RequirePackage{multicol}
+\RequirePackage{varwidth}
 %    \end{macrocode}
 %
 % \subsection{Package options}
@@ -770,6 +774,15 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \changes{v1.4}{2018/10/23}{. added 'usesolutionserieslabels' option}
+% \begin{macro}{usesolutionserieslabels}
+%  This boolean options (true,false) causes the exerciseseries label
+%  to be reused when inserting the corresponding solutionseries.
+%    \begin{macrocode}
+\DeclareBoolOption[false]{usesolutionserieslabels}
+%    \end{macrocode}
+% \end{macro}
+%
 % The options are processed using:
 %    \begin{macrocode}
 \ProcessKeyvalOptions*
@@ -791,8 +804,10 @@
 %    \begin{macrocode}
 \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}
 %    \end{macrocode}
 %
 % Then some lengths to control the spacing for a single
@@ -992,34 +1007,35 @@
 %   default results in non list formatting of exercise}
 %   \changes{v0.5}{2012/01/09}{Changed implementation to allow for
 %   copying the exercises to the solutions file.}
+%   \changes{v1.3}{2017/01/08}{Corrected formatting error in case of
+%   options exerciseaslist}
 %    \begin{macrocode}
 \newenvironment{exsol at exercise}[1]
 {%
   \ifthenelse{\boolean{exsol at minipage}}{\begin{minipage}[t]{\textwidth}}{}%
     \ifthenelse{\boolean{exsol at 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 at nolabels~#1:\else%
-                   \subparagraph{\exercisename{}~#1:}\fi]
-               }%
-               {\ifexsol at nolabels #1:\else%
-                 \subparagraph{\exercisename{}~#1:}\fi}
+    {
+      \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 at nolabels~#1:\else\exercisename{}~#1:\fi]%
+      }
+      {\ifexsol at nolabels #1:\else%
+        \subparagraph{\exercisename{}~#1:}\fi}
+    }
+    {%
+      \ifthenelse{\boolean{exsol at exerciseaslist}}%
+      {\end{list}}{}%
+    \ifthenelse{\boolean{exsol at minipage}}{\end{minipage}}{\par}%
 }
-{%
-  \ifthenelse{\boolean{exsol at exerciseaslist}}%
-             {\end{list}}{}%
-  \ifthenelse{\boolean{exsol at minipage}}{\end{minipage}}{\par}%
-}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1084,7 +1100,7 @@
           \setlength{\labelsep}{\exsolexerciselabelsep}
           \setlength{\labelwidth}{\exsolexerciselabelwidth}}
       \item[\ifexsol at nolabels #1:\else%
-        \subparagraph{\solutionname{}\@ifmtarg{#1}{}{~}#1:}\fi]
+        \solutionname{}\@ifmtarg{#1}{}{~}#1:\fi]
       }%
       {\ifexsol at nolabels #1:\else%
         \subparagraph{\solutionname{}\@ifmtarg{#1}{}{~}#1:}\fi}
@@ -1112,20 +1128,19 @@
 \define at key{exercises}{solsubrule}{\renewcommand\solsubrule{#1}}
 \define at 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}
 %    \end{macrocode}
 % \end{macro}
@@ -1145,7 +1160,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}%
@@ -1156,13 +1171,23 @@
     \exsubrule\par
     \immediate\write\solutionstream{\string\end\string{solutionseries\string}}
 }
+%    \end{macrocode}
+% \end{macro}
+% \changes{v1.2}{2016/05/05}{Added solutionseries environment}
+% \changes{v1.4}{2018/10/23}{. Implemented option to display
+% solutionserieslabels when option 'usersolutionserieslabels' is true}
+% \begin{macro}{solutionseries}
+%   The |solutionseries| environment helps typesetting your
+%   solutions in series. You don't need to use this function
+%   explicitly. The package does this for you.
+%    \begin{macrocode}
 \newenvironment{solutionseries}[3][]
 { 
   \newcommand\columncount{1} % default
   \newcommand\exsubrule{} % default
   \newcommand\solsubrule{} % default
-  \setkeys{exercises}{#1}
-  \paragraph{\seriesname~#3}~\par
+  \setkeys{exercises}{#1}%
+  \paragraph{\seriesname~#3\ifexsol at usesolutionserieslabels: #2\fi}~\par
   \ifthenelse{\columncount > 1}{\begin{multicols}{\columncount}}{}
   }
   {
@@ -1307,14 +1332,25 @@
 % \changes{v1.1}{2015/09/16}{Corrected congruence of chaptercounter of
 % main document and chapter counter of exercises document (taking
 % intou account alphanumbered chapters}
+% \changes{v1.3}{2016/08/09}{Corrected counter in solutionstream}
+% \changes{v1.3}{2016/08/09}{Added macro to suppress chapter in
+% solution stream}
 %    \begin{macrocode}
+\newif\ifnoexinchapter
+\noexinchapterfalse
 \ifexsol at 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
@@ -1347,11 +1383,23 @@
 \fi
 %    \end{macrocode}
 %
-% \begin{macro}{\noexercisesinchapter}
-%   If you have chapters without exercises, you may want to indicate
-%   this clearly into your source. Otherwise empty chapters may appear
-%   in your solution book.
+% \begin{macro}{\noexercisesinnextchapter}
+%   If you have chapters without exercises, you may want to leave them
+%   out of your solution book. You can do this by putting the
+%   |\noexercisesinnextchapter| macro before your chapter mark.
 %    \begin{macrocode}
+\newcommand{\noexercisesinnextchapter}
+{
+  \noexinchaptertrue
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\noexercisesinnextchapter}
+%   As an alternative you may just want to put this marker in your
+%   text to cause the printing of the sentence ``No exercises in this
+%   chapter'' in your solution book.
+%    \begin{macrocode}
 \newcommand{\noexercisesinchapter}
 {
   \immediate\write\solutionstream{No exercises in this chapter}

Modified: trunk/Master/texmf-dist/source/latex/exsol/exsol.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/exsol/exsol.ins	2018-10-23 20:44:07 UTC (rev 48976)
+++ trunk/Master/texmf-dist/source/latex/exsol/exsol.ins	2018-10-23 20:44:24 UTC (rev 48977)
@@ -1,4 +1,4 @@
-%% Copyright (C) 2015 by Walter Daems <walter.daems at uantwerpen.be>
+%% Copyright (C) 2018 by Walter Daems <walter.daems at uantwerpen.be>
 %%
 %% This work may be distributed and/or modified under the conditions of
 %% the LaTeX Project Public License, either version 1.3 of this license
@@ -27,7 +27,7 @@
 
 This is a generated file.
 
-Copyright (C) 2015 by Walter Daems <walter.daems at uantwerpen.org>
+Copyright (C) 2018 by Walter Daems <walter.daems at 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

Modified: trunk/Master/texmf-dist/tex/latex/exsol/exsol.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exsol/exsol.sty	2018-10-23 20:44:07 UTC (rev 48976)
+++ trunk/Master/texmf-dist/tex/latex/exsol/exsol.sty	2018-10-23 20:44:24 UTC (rev 48977)
@@ -8,7 +8,7 @@
 %% 
 %% This is a generated file.
 %% 
-%% Copyright (C) 2015 by Walter Daems <walter.daems at uantwerpen.org>
+%% Copyright (C) 2018 by Walter Daems <walter.daems at 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,12 +22,13 @@
 %% 
 \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}
@@ -34,12 +35,15 @@
 \DeclareBoolOption[false]{exerciseaslist}
 \DeclareBoolOption[false]{copyexercisesinsolutions}
 \DeclareBoolOption[false]{minipage}
+\DeclareBoolOption[false]{usesolutionserieslabels}
 \ProcessKeyvalOptions*
 \newcommand{\exercisesfontsize}{\csname \exsol at 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,29 +156,28 @@
 {%
   \ifthenelse{\boolean{exsol at minipage}}{\begin{minipage}[t]{\textwidth}}{}%
     \ifthenelse{\boolean{exsol at 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 at nolabels~#1:\else%
-                   \subparagraph{\exercisename{}~#1:}\fi]
-               }%
-               {\ifexsol at nolabels #1:\else%
-                 \subparagraph{\exercisename{}~#1:}\fi}
+    {
+      \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 at nolabels~#1:\else\exercisename{}~#1:\fi]%
+      }
+      {\ifexsol at nolabels #1:\else%
+        \subparagraph{\exercisename{}~#1:}\fi}
+    }
+    {%
+      \ifthenelse{\boolean{exsol at exerciseaslist}}%
+      {\end{list}}{}%
+    \ifthenelse{\boolean{exsol at minipage}}{\end{minipage}}{\par}%
 }
-{%
-  \ifthenelse{\boolean{exsol at exerciseaslist}}%
-             {\end{list}}{}%
-  \ifthenelse{\boolean{exsol at minipage}}{\end{minipage}}{\par}%
-}
 \def\solution{\FV at Environment{}{solution}}
 \def\FVB at solution{%
   %\typeout{Writing solution to \jobname.sol.tex}
@@ -217,7 +220,7 @@
           \setlength{\labelsep}{\exsolexerciselabelsep}
           \setlength{\labelwidth}{\exsolexerciselabelwidth}}
       \item[\ifexsol at nolabels #1:\else%
-        \subparagraph{\solutionname{}\@ifmtarg{#1}{}{~}#1:}\fi]
+        \solutionname{}\@ifmtarg{#1}{}{~}#1:\fi]
       }%
       {\ifexsol at nolabels #1:\else%
         \subparagraph{\solutionname{}\@ifmtarg{#1}{}{~}#1:}\fi}
@@ -232,20 +235,19 @@
 \define at key{exercises}{solsubrule}{\renewcommand\solsubrule{#1}}
 \define at 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 at key{exerciseseries}{columns}{\renewcommand\columncount{#1}}
 \define at 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 at usesolutionserieslabels: #2\fi}~\par
   \ifthenelse{\columncount > 1}{\begin{multicols}{\columncount}}{}
   }
   {
@@ -369,13 +371,21 @@
   \renewcommand{\solutionsname}{Soluciones}%
   \renewcommand{\seriesname}{Serie}%
 }
+\newif\ifnoexinchapter
+\noexinchapterfalse
 \ifexsol at 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}



More information about the tex-live-commits mailing list