texlive[69333] Master/texmf-dist: exsol (6jan24)

commits+karl at tug.org commits+karl at tug.org
Sun Jan 7 22:26:22 CET 2024


Revision: 69333
          https://tug.org/svn/texlive?view=revision&revision=69333
Author:   karl
Date:     2024-01-07 22:26:22 +0100 (Sun, 07 Jan 2024)
Log Message:
-----------
exsol (6jan24)

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

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/exsol/example-exercisebook.pdf
    trunk/Master/texmf-dist/doc/latex/exsol/example-exercisebook.tex
    trunk/Master/texmf-dist/doc/latex/exsol/example-external.pdf
    trunk/Master/texmf-dist/doc/latex/exsol/example-external.tex
    trunk/Master/texmf-dist/doc/latex/exsol/example-formulacollection.tex
    trunk/Master/texmf-dist/doc/latex/exsol/example-inline.pdf
    trunk/Master/texmf-dist/doc/latex/exsol/example-inline.tex
    trunk/Master/texmf-dist/doc/latex/exsol/example-local.tex
    trunk/Master/texmf-dist/doc/latex/exsol/example-solutionbook.tex
    trunk/Master/texmf-dist/doc/latex/exsol/example.tex
    trunk/Master/texmf-dist/doc/latex/exsol/manifest.txt

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

Index: trunk/Master/texmf-dist/doc/latex/exsol/example-exercisebook.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exsol/example-exercisebook.pdf	2024-01-07 21:26:03 UTC (rev 69332)
+++ trunk/Master/texmf-dist/doc/latex/exsol/example-exercisebook.pdf	2024-01-07 21:26:22 UTC (rev 69333)

Property changes on: trunk/Master/texmf-dist/doc/latex/exsol/example-exercisebook.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exsol/example-exercisebook.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exsol/example-exercisebook.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exsol/example-exercisebook.tex	2024-01-07 21:26:22 UTC (rev 69333)
@@ -0,0 +1,44 @@
+%%
+%% This is file `example-exercisebook.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exsol.dtx  (with options: `exampleexc')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2019 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
+%% or (at your option) any later version.  The latest version of this
+%% license is in:
+%% 
+%%    http://www.latex-project.org/lppl.txt
+%% 
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%% 
+\documentclass[a4paper,10pt]{article}
+
+\usepackage{a4wide}
+\usepackage[english]{babel}
+\usepackage{exsol}
+
+\setlength{\parindent}{0em}
+
+\title{Exercise book, specified in the example-external of the
+  \textsf{ExSol} package}
+\author{Walter Daems}
+
+\begin{document}
+
+\maketitle
+
+\input{example-external.exc.tex}
+
+\end{document}
+\endinput
+%%
+%% End of file `example-exercisebook.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exsol/example-exercisebook.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exsol/example-external.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/exsol/example-external.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exsol/example-external.pdf	2024-01-07 21:26:03 UTC (rev 69332)
+++ trunk/Master/texmf-dist/doc/latex/exsol/example-external.pdf	2024-01-07 21:26:22 UTC (rev 69333)

Property changes on: trunk/Master/texmf-dist/doc/latex/exsol/example-external.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exsol/example-external.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exsol/example-external.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exsol/example-external.tex	2024-01-07 21:26:22 UTC (rev 69333)
@@ -0,0 +1,124 @@
+%%
+%% This is file `example-external.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exsol.dtx  (with options: `example-external')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2019 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
+%% or (at your option) any later version.  The latest version of this
+%% license is in:
+%% 
+%%    http://www.latex-project.org/lppl.txt
+%% 
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%% 
+\documentclass[a4paper,10pt]{article}
+
+\usepackage{a4wide}
+\usepackage[english]{babel}
+\usepackage[external]{exsol}
+
+\title{External example, from the \textsf{ExSol} package}
+\author{Walter Daems}
+\setlength{\parindent}{0em}
+\begin{document}
+\maketitle
+
+\section{Introduction}
+
+In this text we explain how to solve second-order polynomial
+equations.
+
+\section{Solving second-order polynomial equations}
+
+\begin{informulacollectiononly}
+\section*{Solving second-order polynomial equations}
+\end{informulacollectiononly}
+\begin{informulacollection}
+  The roots of the following equation
+  \begin{equation}
+    a x^2 + bx + c = 0
+  \end{equation}
+  can be determined as:
+  \begin{equation}
+    x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a}
+  \end{equation}
+\end{informulacollection}
+
+\begin{exercises}[columns = 2]
+
+  \begin{exercise}
+    Solve the following equation for $x \in C$, with $C$ the set of
+    complex numbers:
+    \begin{equation}
+      5 x^2 -3 x = 5
+    \end{equation}
+  \end{exercise}
+  \begin{solution}
+    Let's start by rearranging the equation, a bit:
+    \begin{eqnarray}
+      5.7 x^2 - 3.1 x &=& 5.3\\
+      5.7 x^2 - 3.1 x -5.3 &=& 0
+    \end{eqnarray}
+    The equation is now in the standard form:
+    \begin{equation}
+      a x^2 + b x + c = 0
+    \end{equation}
+    For quadratic equations in the standard form, we know that two
+    solutions exist:
+    \begin{equation}
+      x_{1,2} = \frac{ -b \pm \sqrt{d}}{2a}
+    \end{equation}
+    with
+    \begin{equation}
+      d = b^2 - 4 a c
+    \end{equation}
+    If we apply this to our case, we obtain:
+    \begin{equation}
+      d = (-3.1)^2 - 4 \cdot 5.7 \cdot (-5.3) = 130.45
+    \end{equation}
+    and
+    \begin{eqnarray}
+      x_1 &=& \frac{3.1 + \sqrt{130.45}}{11.4} = 1.27\\
+      x_2 &=& \frac{3.1 - \sqrt{130.45}}{11.4} = -0.73
+    \end{eqnarray}
+    The proposed values $x = x_1, x_2$ are solutions to the given equation.
+  \end{solution}
+  \begin{exercise}
+    Consider a 2-dimensional vector space equipped with a Euclidean
+    distance function. Given a right-angled triangle, with the sides
+    $A$ and $B$ adjacent to the right angle having lengths, $3$ and
+    $4$, calculate the length of the hypotenuse, labeled $C$.
+  \end{exercise}
+  \begin{solution}
+    This calls for application of Pythagoras' theorem, which
+    tells us:
+    \begin{equation}
+      \left\|A\right\|^2 + \left\|B\right\|^2 = \left\|C\right\|^2
+    \end{equation}
+    and therefore:
+    \begin{eqnarray}
+      \left\|C\right\|
+      &=& \sqrt{\left\|A\right\|^2 + \left\|B\right\|^2}\\
+      &=& \sqrt{3^2 + 4^2}\\
+      &=& \sqrt{25} = 5
+    \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}
+\endinput
+%%
+%% End of file `example-external.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exsol/example-external.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/exsol/example-formulacollection.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/exsol/example-formulacollection.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exsol/example-formulacollection.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exsol/example-formulacollection.tex	2024-01-07 21:26:22 UTC (rev 69333)
@@ -0,0 +1,44 @@
+%%
+%% This is file `example-formulacollection.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exsol.dtx  (with options: `examplefor')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2019 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
+%% or (at your option) any later version.  The latest version of this
+%% license is in:
+%% 
+%%    http://www.latex-project.org/lppl.txt
+%% 
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%% 
+\documentclass[a4paper,10pt]{article}
+
+\usepackage{a4wide}
+\usepackage[english]{babel}
+\usepackage{exsol}
+
+\setlength{\parindent}{0em}
+
+\title{Formula collection, specified in the example of the
+  \textsf{ExSol} package}
+\author{Walter Daems}
+
+\begin{document}
+
+\maketitle
+
+\input{example.fc.tex}
+
+\end{document}
+\endinput
+%%
+%% End of file `example-formulacollection.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exsol/example-formulacollection.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exsol/example-inline.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/exsol/example-inline.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exsol/example-inline.pdf	2024-01-07 21:26:03 UTC (rev 69332)
+++ trunk/Master/texmf-dist/doc/latex/exsol/example-inline.pdf	2024-01-07 21:26:22 UTC (rev 69333)

Property changes on: trunk/Master/texmf-dist/doc/latex/exsol/example-inline.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exsol/example-inline.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exsol/example-inline.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exsol/example-inline.tex	2024-01-07 21:26:22 UTC (rev 69333)
@@ -0,0 +1,108 @@
+%%
+%% This is file `example-inline.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exsol.dtx  (with options: `example-inline')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2019 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
+%% or (at your option) any later version.  The latest version of this
+%% license is in:
+%% 
+%%    http://www.latex-project.org/lppl.txt
+%% 
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%% 
+\documentclass[11pt,a4paper]{article}
+
+\usepackage[german]{babel}
+\usepackage[inline,usesolutionserieslabels]{exsol}
+\usepackage{enumitem}
+
+\setlength{\exsolexercisetopbottomsep}{0pt plus 0pt minus 1pt}
+\setlength{\exsolexerciseleftmargin}{2em}
+\setlength{\exsolexerciserightmargin}{1em}
+\setlength{\exsolexerciseparindent}{0em}
+\setlength{\exsolexerciselabelsep}{1ex}
+\setlength{\exsolexerciselabelwidth}{30pt}
+\setlength{\exsolexerciseitemindent}{0pt}
+\setlength{\exsolexerciseparsep}{\parskip}
+
+\title{Local inline example, from the \textsf{ExSol} package}
+\author{Philippe Marti}
+\setlength{\parindent}{0em}
+\begin{document}
+\maketitle
+
+\section{Gleichungssysteme und Geraden}
+
+Ein bisschen Theorie\ldots
+
+\begin{exerciseseries}[solsubrule=\hrule]{Gleichungssysteme}
+  \begin{exercise}
+    Die Summe zweier Zahlen ist 17 und ihre Differenz 7. Bestimme die
+    beiden Zahlen!
+  \end{exercise}
+  \begin{solution}
+    5 und 12
+  \end{solution}
+
+  \begin{exercise}
+    Die Differenz einer Zahl und dem Dreifachen einer zweiten Zahl ist
+    14. Bestimme die beiden Zahlen, falls die zweite Zahl ein Zehntel
+    der ersten ist.
+  \end{exercise}
+  \begin{solution}
+    20 und 2
+  \end{solution}
+\end{exerciseseries}
+~\\
+Etwas mehr Theorie\ldots
+
+\begin{exerciseseries}{Geraden}
+  \begin{exercise}
+    Berechne den Schnittpunkt von \mbox{$y=3x+1$} und \mbox{$y=3x-7$}.
+  \end{exercise}
+  \begin{solution}
+    Es gibt keinen Schnittpunkt
+  \end{solution}
+
+  \begin{exercise}
+    Die Familie Meier fordert Offerten f\"ur eine Heizungsreparatur
+    ein. Firma A berechnet f\"ur die Fahrtkosten Fr. 42.- und f\"ur
+    jede Arbeitsstunde 76.-. Bei der Firma B sind die Fahrtkosten
+    Fr. 35.- und jede Arbeitsstunde wird mit Fr. 80.- berechnet.
+    \begin{enumerate}[label=\alph*)]
+    \item Welche Kosten entstehen f\"ur beide Firmen, wenn ein Monteur
+      3.5 Stunden
+      f\"ur die Arbeit benötigt? Welche Firma ist in diesem Fall
+      kostengünstiger?
+
+    \item Wie lauten die Gleichungen derjenigen zwei linearen
+      Funktionen, die jeder Arbeitszeit $x$ (in Stunden) die
+      entstehenden Kosten $y$ (in Franken) zuordnet?
+
+    \item Berechne, bei welcher Arbeitszeit die Kosten bei beiden
+      Firmen gleich sind.
+    \end{enumerate}
+  \end{exercise}
+  \begin{solution}
+    \begin{enumerate}[label=\alph*)]
+    \item Firma A: 308.- $|$ Firma B: 315.-
+    \item A: $y=76x+42$ $|$ B: $y=80x+35$
+    \item Bei $1\frac{3}{4}$ Stunden
+    \end{enumerate}
+  \end{solution}
+\end{exerciseseries}
+
+\end{document}
+\endinput
+%%
+%% End of file `example-inline.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exsol/example-inline.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/exsol/example-local.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/exsol/example-local.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exsol/example-local.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exsol/example-local.tex	2024-01-07 21:26:22 UTC (rev 69333)
@@ -0,0 +1,110 @@
+%%
+%% This is file `example-local.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exsol.dtx  (with options: `example-local')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2019 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
+%% or (at your option) any later version.  The latest version of this
+%% license is in:
+%% 
+%%    http://www.latex-project.org/lppl.txt
+%% 
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%% 
+\documentclass[a4paper,10pt]{article}
+
+\usepackage{a4wide}
+\usepackage[german]{babel}
+\usepackage[local,nolabels,exerciseaslist,usesolutionserieslabels]{exsol}
+\usepackage{enumitem}
+
+\setlength{\exsolexercisetopbottomsep}{0pt plus 0pt minus 1pt}
+\setlength{\exsolexerciseleftmargin}{2em}
+\setlength{\exsolexerciserightmargin}{1em}
+\setlength{\exsolexerciseparindent}{0em}
+\setlength{\exsolexerciselabelsep}{1ex}
+\setlength{\exsolexerciselabelwidth}{30pt}
+\setlength{\exsolexerciseitemindent}{0pt}
+\setlength{\exsolexerciseparsep}{\parskip}
+
+\title{Local example, from the \textsf{ExSol} package}
+\author{Philippe Marti}
+\setlength{\parindent}{0em}
+\begin{document}
+\maketitle
+
+\section{\exercisesname}
+
+\begin{exerciseseries}[columns=2,solsubrule=\hrule]{Gleichungen $|$ Gleichungssysteme}
+
+  \begin{exercise}
+    Die Summe zweier Zahlen ist 17 und ihre Differenz 7. Bestimme die
+    beiden Zahlen!
+  \end{exercise}
+  \begin{solution}
+    5 und 12
+  \end{solution}
+
+  \begin{exercise}
+    Die Differenz einer Zahl und dem Dreifachen einer zweiten Zahl ist
+    14. Bestimme die beiden Zahlen, falls die zweite Zahl ein Zehntel
+    der ersten ist.
+  \end{exercise}
+  \begin{solution}
+    20 und 2
+  \end{solution}
+
+\end{exerciseseries}
+
+\begin{exerciseseries}[columns=2]{Geraden}
+  \begin{exercise}
+    Berechne den Schnittpunkt von \mbox{$y=3x+1$} und \mbox{$y=3x-7$}.
+  \end{exercise}
+  \begin{solution}
+    Es gibt keinen Schnittpunkt
+  \end{solution}
+
+  \begin{exercise}
+    Die Familie Meier fordert Offerten f\"ur eine Heizungsreparatur
+    ein. Firma A berechnet f\"ur die Fahrtkosten Fr. 42.- und f\"ur
+    jede Arbeitsstunde 76.-. Bei der Firma B sind die Fahrtkosten
+    Fr. 35.- und jede Arbeitsstunde wird mit Fr. 80.- berechnet.
+    \begin{enumerate}[label=\alph*)]
+    \item Welche Kosten entstehen f\"ur beide Firmen, wenn ein Monteur
+      3.5 Stunden
+      f\"ur die Arbeit benötigt? Welche Firma ist in diesem Fall
+      kostengünstiger?
+
+    \item Wie lauten die Gleichungen derjenigen zwei linearen
+      Funktionen, die jeder Arbeitszeit $x$ (in Stunden) die
+      entstehenden Kosten $y$ (in Franken) zuordnet?
+
+    \item Berechne, bei welcher Arbeitszeit die Kosten bei beiden
+      Firmen gleich sind.
+    \end{enumerate}
+  \end{exercise}
+  \begin{solution}
+    \begin{enumerate}[label=\alph*)]
+    \item Firma A: 308.- $|$ Firma B: 315.-
+    \item A: $y=76x+42$ $|$ B: $y=80x+35$
+    \item Bei $1\frac{3}{4}$ Stunden
+    \end{enumerate}
+  \end{solution}
+\end{exerciseseries}
+
+\section{\solutionsname}
+\loadSolutions
+
+\end{document}
+\endinput
+%%
+%% End of file `example-local.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exsol/example-local.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/exsol/example-solutionbook.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/exsol/example-solutionbook.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exsol/example-solutionbook.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exsol/example-solutionbook.tex	2024-01-07 21:26:22 UTC (rev 69333)
@@ -0,0 +1,44 @@
+%%
+%% This is file `example-solutionbook.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exsol.dtx  (with options: `examplesol')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2019 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
+%% or (at your option) any later version.  The latest version of this
+%% license is in:
+%% 
+%%    http://www.latex-project.org/lppl.txt
+%% 
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%% 
+\documentclass[a4paper,10pt]{article}
+
+\usepackage{a4wide}
+\usepackage[english]{babel}
+\usepackage{exsol}
+
+\setlength{\parindent}{0em}
+
+\title{Solutions to the exercises, specified in the example of the
+  \textsf{ExSol} package}
+\author{Walter Daems}
+
+\begin{document}
+
+\maketitle
+
+\input{example.sol.tex}
+
+\end{document}
+\endinput
+%%
+%% End of file `example-solutionbook.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exsol/example-solutionbook.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/exsol/example.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/exsol/example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exsol/example.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exsol/example.tex	2024-01-07 21:26:22 UTC (rev 69333)
@@ -0,0 +1,129 @@
+%%
+%% This is file `example.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exsol.dtx  (with options: `example')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2019 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
+%% or (at your option) any later version.  The latest version of this
+%% license is in:
+%% 
+%%    http://www.latex-project.org/lppl.txt
+%% 
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%% 
+\documentclass[a4paper,10pt]{article}
+
+\usepackage{a4wide}
+\usepackage[english]{babel}
+\usepackage[copyexercisesinsolutions]{exsol}
+
+\title{Gobal example, from the \textsf{ExSol} package}
+\author{Walter Daems}
+\setlength{\parindent}{0em}
+\begin{document}
+\maketitle
+
+\section{Introduction}
+
+In this text we explain how to solve second-order polynomial
+equations.
+
+\section{Solving second-order polynomial equations}
+
+\begin{informulacollectiononly}
+\section*{Solving second-order polynomial equations}
+\end{informulacollectiononly}
+\begin{informulacollection}
+  The roots of the following equation
+  \begin{equation}
+    a x^2 + bx + c = 0
+  \end{equation}
+  can be determined as:
+  \begin{equation}
+    x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a}
+  \end{equation}
+\end{informulacollection}
+
+To make sure you master calculating the roots of second-order
+equation, please solve exercise \ref{ex:1}.
+
+\begin{exercises}[columns = 2]
+
+  \begin{exercise}
+    \label{ex:1}
+    Solve the following equation for $x \in C$, with $C$ the set of
+    complex numbers:
+    \begin{equation}
+      5 x^2 -3 x = 5
+    \end{equation}
+  \end{exercise}
+  \begin{solution}
+    Let's start by rearranging the equation, a bit:
+    \begin{eqnarray}
+      5.7 x^2 - 3.1 x &=& 5.3\\
+      5.7 x^2 - 3.1 x -5.3 &=& 0
+    \end{eqnarray}
+    The equation is now in the standard form:
+    \begin{equation}
+      a x^2 + b x + c = 0
+    \end{equation}
+    For quadratic equations in the standard form, we know that two
+    solutions exist:
+    \begin{equation}
+      x_{1,2} = \frac{ -b \pm \sqrt{d}}{2a}
+    \end{equation}
+    with
+    \begin{equation}
+      d = b^2 - 4 a c
+    \end{equation}
+    If we apply this to our case, we obtain:
+    \begin{equation}
+      d = (-3.1)^2 - 4 \cdot 5.7 \cdot (-5.3) = 130.45
+    \end{equation}
+    and
+    \begin{eqnarray}
+      x_1 &=& \frac{3.1 + \sqrt{130.45}}{11.4} = 1.27\\
+      x_2 &=& \frac{3.1 - \sqrt{130.45}}{11.4} = -0.73
+    \end{eqnarray}
+    The proposed values $x = x_1, x_2$ are solutions to the given equation.
+  \end{solution}
+  \begin{exercise}
+    \label{ex:2}
+    Consider a 2-dimensional vector space equipped with a Euclidean
+    distance function. Given a right-angled triangle, with the sides
+    $A$ and $B$ adjacent to the right angle having lengths, $3$ and
+    $4$, calculate the length of the hypotenuse, labeled $C$.
+  \end{exercise}
+  \begin{solution}
+    This calls for application of Pythagoras' theorem, which
+    tells us:
+    \begin{equation}
+      \left\|A\right\|^2 + \left\|B\right\|^2 = \left\|C\right\|^2
+    \end{equation}
+    and therefore:
+    \begin{eqnarray}
+      \left\|C\right\|
+      &=& \sqrt{\left\|A\right\|^2 + \left\|B\right\|^2}\\
+      &=& \sqrt{3^2 + 4^2}\\
+      &=& \sqrt{25} = 5
+    \end{eqnarray}
+    Therefore, the length of the hypotenuse equals $5$.
+  \end{solution}
+\end{exercises}
+
+And now, we can come to the conclusion.
+\section{Conclusion}
+Solving second-order polynomial equations is very easy.
+\end{document}
+\endinput
+%%
+%% End of file `example.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exsol/example.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/exsol/exsol.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/exsol/manifest.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exsol/manifest.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exsol/manifest.txt	2024-01-07 21:26:22 UTC (rev 69333)
@@ -0,0 +1,16 @@
+[       4096]  .
+[       1644]  README
+[        443]  manifest.txt
+[        403]  LICENSE
+[     227438]  exsol.pdf
+[       2547]  exsol.ins
+[      59594]  exsol.dtx
+[      69744]  example-solutionbook.pdf
+[      61820]  example.pdf
+[      55624]  example-local.pdf
+[      56960]  example-inline.pdf
+[      55413]  example-formulacollection.pdf
+[      58600]  example-external.pdf
+[      48449]  example-exercisebook.pdf
+
+1 directory, 13 files


Property changes on: trunk/Master/texmf-dist/doc/latex/exsol/manifest.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/exsol/exsol.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/exsol/exsol.dtx	2024-01-07 21:26:03 UTC (rev 69332)
+++ trunk/Master/texmf-dist/source/latex/exsol/exsol.dtx	2024-01-07 21:26:22 UTC (rev 69333)
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-% Copyright (C) 2018 by Walter Daems <walter.daems at uantwerpen.be>
+% Copyright (C) 2019 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,11 +30,12 @@
 %<package|driver>\NeedsTeXFormat{LaTeX2e}
 %<driver>\ProvidesFile{exsol.dtx}
 %<package>\ProvidesPackage{exsol}
-%<package|driver>  [2018/10/23 v1.4 ExSol - Exercises and Solutions package (DMW)]
+%<package|driver>  [2024/01/07 v1.6 ExSol - Exercises and Solutions package (DMW)]
 %<*driver> 
 \documentclass[10pt,a4paper]{ltxdoc}
 \usepackage[english]{babel}
 \usepackage[exercisesfontsize=small]{exsol}
+\usepackage{booktabs}
 \usepackage{metalogo}
 \EnableCrossrefs
 \CodelineIndex
@@ -48,8 +49,8 @@
 \RecordChanges
 \newcommand{\exsol}{\textsc{ExSol}}
 \StopEventually{\PrintChanges\PrintIndex}
-\def\fileversion{1.4}
-\def\filedate{2018/10/23}
+\def\fileversion{1.6}
+\def\filedate{2024/01/07}
 \begin{document}
  \DocInput{exsol.dtx}
 \end{document}
@@ -100,6 +101,9 @@
 % \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'}
+% \changes{v1.5}{2019/01/02}{\@ Added inline and external mode}
+% \changes{v1.6}{2024/01/07}{\@ Added check to see if babel was
+% loaded, and issue appropriate error}
 %
 % \DoNotIndex{\newcommand,\newenvironment}
 % \setlength{\parindent}{0em}
@@ -134,10 +138,31 @@
 % into a simple document harness, such that when running \LaTeX{} on
 % the latter, you can generate a nice solution book.
 %
+% In \emph{external mode} both the exercises and the solutions are
+% written to secondary files that can be included in a simple document
+% harness, such that when running \LaTeX{} on these, you can generate
+% an exercise as well as a solution book.
+%
 % In \emph{local mode} (invoked by specifying the package option 'local'),
 % this corresponds to inserting the saved solutions in the current
 % document at a later stage in the text.
-% 
+%
+% In \emph{inline mode} (invoked by specifying the package option
+% 'inline'), the solutions are inserted 'on the spot'.
+%
+% This has been conveniently summarized in the table below:
+% \begin{center}
+%   \begin{tabular}{ccc}
+%       \toprule
+%       \bf mode & \bf exercises & \bf solutions\\
+%       \midrule
+%       global   & on the spot   & in separate document\\
+%       external & in separate document & in separate document\\
+%       local    & on the spot   & later in the same document\\
+%       inline   & on the spot   & on the spot \\
+%     \bottomrule
+%   \end{tabular}
+% \end{center}
 % \subsection{Why use \exsol{}?}
 % \begin{itemize}
 % \item It allows to keep the \LaTeX{} source of your exercises and their
@@ -203,9 +228,16 @@
 % \subsubsection{Loading the package}
 % The macro package exsol can be loaded with:
 % \begin{verbatim}
+% \usepackage{babel}
 % \usepackage{exsol}
 % \end{verbatim}
 %
+% Note before we start that you need to load the babel package before
+% you load the exsol package! This is to allow you to load the
+% appropriate languages for your text.
+%
+% OK, now let's get started.
+%
 % Your first choice to make is where you want your solutions to
 % appear. The primary objective of the exsol package was 'global
 % mode', i.e. separating your solutions from the exercises,
@@ -218,8 +250,12 @@
 % Gathering exercises in (numbered) series and 'loading' them locally
 % in your text, allows for simplifying the
 % individual exercise numbers (omitting their prefix containing,
-% chapter number, section number, subsection number a.s.o.). 
+% chapter number, section number, subsection number a.s.o.).
 %
+% A third mode of operation is 'inline mode', in which the
+% solution is inserted in the main text 'on the spot'. You can trigger
+% this, by specifying the package option 'inline'.
+%
 % \subsubsection{Global mode - flat grouping exercises}
 % Adding exercises together with their solutions in your document is
 % easy. Just embed them in a
@@ -259,8 +295,7 @@
 % series (e.g. according to their degree of difficulty). This can be
 % done by using the |exerciseseries| environment instead of the
 % |exercises| environment.
-% This environment takes and also takes a
-% mandatory label argument. 
+% This environment takes and also takes a mandatory label argument. 
 % In addition it takes two optional arguments:
 % \begin{itemize}
 % \item |columns| to specify the amount of clumns 
@@ -311,8 +346,9 @@
 % \end{exerciseseries}
 % \end{verbatim}
 %
+% As an alternative, you can specify the 'inine' option to include
+% the solutions on the spot where you specified them.
 %
-%
 % \subsection{Examples}
 %
 % \subsubsection{Global mode}
@@ -319,7 +355,8 @@
 % \label{examplesglobal}
 % Below, you can find an example of a file that contains a number of
 % exercises and solutions, with the goal to generate a separate
-% solution book.
+% solution book. Note that referencing exercises works just as you
+% would expect it.
 %
 % \begin{Verbatim}[fontsize=\footnotesize]
 %<*example>
@@ -356,9 +393,14 @@
   \end{equation}
 \end{informulacollection}
 
+To make sure you master calculating the roots of second-order
+equation, please solve exercise \ref{ex:1}.
+
+
 \begin{exercises}[columns = 2]
 
   \begin{exercise}
+    \label{ex:1}
     Solve the following equation for $x \in C$, with $C$ the set of
     complex numbers:
     \begin{equation}
@@ -396,6 +438,7 @@
     The proposed values $x = x_1, x_2$ are solutions to the given equation.
   \end{solution}
   \begin{exercise}
+    \label{ex:2}
     Consider a 2-dimensional vector space equipped with a Euclidean
     distance function. Given a right-angled triangle, with the sides
     $A$ and $B$ adjacent to the right angle having lengths, $3$ and
@@ -417,7 +460,8 @@
     Therefore, the length of the hypotenuse equals $5$.
   \end{solution}
 \end{exercises}
-And now, we can come to conclusion.
+
+And now, we can come to the conclusion.
 \section{Conclusion}
 Solving second-order polynomial equations is very easy.
 \end{document}
@@ -428,17 +472,140 @@
 % |example.pdf|. As you can see, the formulacollection entry and the
 % exercise appear. There's no trace of the solution.
 %
-% When running \LaTeX{} on your document (e.g., the file example.tex
-% as part of the exsol package, as a side effect files with the
-% extension |.sol.tex| and |.fc.tex| have been written
-% to disk (in our case, the files |example.sol.tex| and
-% |example.fc.tex|), containing all solutions and entries for
-% the formula collection in sequence.
+% The solution can be recovered by including the |example.sol.tex|
+% file in an appropriate harness. This is explained in
+% section~\ref{harnesses}. 
 %
-% Generating a solution book is as simple as including the solution
-% file into a simple \LaTeX{} harness, that allows you giving it a
-% proper title page and to add other bells and whistles.
-% This can be seen below:
+% \subsubsection{external mode}
+% \label{examplesexternal}
+% Below, you can find an example of a file that contains a number of
+% exercises and solutions, with the goal to generate a separate
+% exercise and solution book.
+%
+% \begin{Verbatim}[fontsize=\footnotesize]
+%<*example-external>
+\documentclass[a4paper,10pt]{article}
+
+\usepackage{a4wide}
+\usepackage[english]{babel}
+\usepackage[external]{exsol}
+
+\title{External example, from the \textsf{ExSol} package}
+\author{Walter Daems}
+\setlength{\parindent}{0em}
+\begin{document}
+\maketitle
+
+\section{Introduction}
+
+In this text we explain how to solve second-order polynomial
+equations. 
+
+\section{Solving second-order polynomial equations}
+
+\begin{informulacollectiononly}
+\section*{Solving second-order polynomial equations}
+\end{informulacollectiononly}
+\begin{informulacollection}
+  The roots of the following equation
+  \begin{equation}
+    a x^2 + bx + c = 0
+  \end{equation}
+  can be determined as:
+  \begin{equation}
+    x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a}
+  \end{equation}
+\end{informulacollection}
+
+\begin{exercises}[columns = 2]
+
+  \begin{exercise}
+    Solve the following equation for $x \in C$, with $C$ the set of
+    complex numbers:
+    \begin{equation}
+      5 x^2 -3 x = 5
+    \end{equation}
+  \end{exercise}
+  \begin{solution}
+    Let's start by rearranging the equation, a bit:
+    \begin{eqnarray}
+      5.7 x^2 - 3.1 x &=& 5.3\\
+      5.7 x^2 - 3.1 x -5.3 &=& 0
+    \end{eqnarray}
+    The equation is now in the standard form:
+    \begin{equation}
+      a x^2 + b x + c = 0
+    \end{equation}
+    For quadratic equations in the standard form, we know that two
+    solutions exist:
+    \begin{equation}
+      x_{1,2} = \frac{ -b \pm \sqrt{d}}{2a}
+    \end{equation}
+    with
+    \begin{equation}
+      d = b^2 - 4 a c
+    \end{equation}
+    If we apply this to our case, we obtain:
+    \begin{equation}
+      d = (-3.1)^2 - 4 \cdot 5.7 \cdot (-5.3) = 130.45
+    \end{equation}
+    and
+    \begin{eqnarray}
+      x_1 &=& \frac{3.1 + \sqrt{130.45}}{11.4} = 1.27\\
+      x_2 &=& \frac{3.1 - \sqrt{130.45}}{11.4} = -0.73
+    \end{eqnarray}
+    The proposed values $x = x_1, x_2$ are solutions to the given equation.
+  \end{solution}
+  \begin{exercise}
+    Consider a 2-dimensional vector space equipped with a Euclidean
+    distance function. Given a right-angled triangle, with the sides
+    $A$ and $B$ adjacent to the right angle having lengths, $3$ and
+    $4$, calculate the length of the hypotenuse, labeled $C$.
+  \end{exercise}
+  \begin{solution}
+    This calls for application of Pythagoras' theorem, which 
+    tells us:
+    \begin{equation}
+      \left\|A\right\|^2 + \left\|B\right\|^2 = \left\|C\right\|^2
+    \end{equation}
+    and therefore:
+    \begin{eqnarray}
+      \left\|C\right\| 
+      &=& \sqrt{\left\|A\right\|^2 + \left\|B\right\|^2}\\
+      &=& \sqrt{3^2 + 4^2}\\
+      &=& \sqrt{25} = 5
+    \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-external>
+%\end{Verbatim}
+%
+% The result in the original document, can be seen in the file
+% |example-external.pdf|. As you can see, only the formulacollection
+% entry appears. There's no trace of the exercises or the solutions.
+%
+% \subsubsection{Harnesses}
+% \label{harnesses}
+%
+% When running \LaTeX{} on your document in global or external mode
+% (e.g., the file example-external.tex as part of the exsol package,
+% as a side effect files with the 
+% extension |.sol.tex|, |.exc.tex| and/or |.fc.tex| have been written
+% to disk (in our case, the files |example-external.sol.tex|,
+% |example-external.exc.tex| and |example-external.fc.tex|),
+% containing all exercises, solutions and entries for the formula
+% collection in sequence. 
+%
+% Generating an exercises/solution book is as simple as including the
+% exercise/solution file into a simple \LaTeX{} harness, that allows
+% you giving it a proper title page and to add other bells and whistles.
+% As an example, you can find a harness for a solution book below.
 % 
 % \begin{Verbatim}[fontsize=\footnotesize]
 %<*examplesol>
@@ -464,11 +631,8 @@
 %</examplesol>
 % \end{Verbatim}
 %
-% Generating a formula collection is as simple as including the
-% formula collectoin file into a simple \LaTeX{} harness, that allows
-% you giving it a proper title page and to add other bells and
-% whistles.
-% This can be seen below:
+% Similar harnesses can be used for the exercise book and the formula
+% collection. 
 % 
 % \begin{Verbatim}[fontsize=\footnotesize]
 %<*examplefor>
@@ -494,6 +658,31 @@
 %</examplefor> 
 % \end{Verbatim}
 %
+% \begin{Verbatim}[fontsize=\footnotesize]
+%<*exampleexc>
+\documentclass[a4paper,10pt]{article}
+
+\usepackage{a4wide}
+\usepackage[english]{babel}
+\usepackage{exsol}
+
+\setlength{\parindent}{0em}
+
+\title{Exercise book, specified in the example-external of the
+  \textsf{ExSol} package}
+\author{Walter Daems}
+
+\begin{document}
+
+\maketitle
+
+\input{example-external.exc.tex}
+
+\end{document}
+%</exampleexc> 
+% \end{Verbatim}
+%
+% 
 % \subsubsection{Local mode}
 %
 % Below, you can find an example of a file that contains a number of
@@ -596,6 +785,103 @@
 %</example-local>
 % \end{Verbatim}
 %
+%
+% \subsubsection{Inline mode}
+%
+% Below, you can find an example of a file that contains a number of
+% exercises and solutions, with the goal to include the solutions on
+% the spot.
+%
+%
+% \begin{Verbatim}[fontsize=\footnotesize]
+%<*example-inline>
+\documentclass[11pt,a4paper]{article}
+
+\usepackage[german]{babel}
+\usepackage[inline,usesolutionserieslabels]{exsol}
+\usepackage{enumitem}
+
+\setlength{\exsolexercisetopbottomsep}{0pt plus 0pt minus 1pt}
+\setlength{\exsolexerciseleftmargin}{2em}
+\setlength{\exsolexerciserightmargin}{1em}
+\setlength{\exsolexerciseparindent}{0em}
+\setlength{\exsolexerciselabelsep}{1ex}
+\setlength{\exsolexerciselabelwidth}{30pt}
+\setlength{\exsolexerciseitemindent}{0pt}
+\setlength{\exsolexerciseparsep}{\parskip}
+
+\title{Local inline example, from the \textsf{ExSol} package}
+\author{Philippe Marti}
+\setlength{\parindent}{0em}
+\begin{document}
+\maketitle
+
+\section{Gleichungssysteme und Geraden}
+
+Ein bisschen Theorie\ldots
+
+\begin{exerciseseries}[solsubrule=\hrule]{Gleichungssysteme}
+  \begin{exercise}
+    Die Summe zweier Zahlen ist 17 und ihre Differenz 7. Bestimme die
+    beiden Zahlen! 
+  \end{exercise}
+  \begin{solution}
+    5 und 12
+  \end{solution}
+  
+  \begin{exercise}
+    Die Differenz einer Zahl und dem Dreifachen einer zweiten Zahl ist
+    14. Bestimme die beiden Zahlen, falls die zweite Zahl ein Zehntel
+    der ersten ist. 
+  \end{exercise}
+  \begin{solution}
+    20 und 2
+  \end{solution}
+\end{exerciseseries}
+~\\
+Etwas mehr Theorie\ldots
+
+\begin{exerciseseries}{Geraden}
+  \begin{exercise}
+    Berechne den Schnittpunkt von \mbox{$y=3x+1$} und \mbox{$y=3x-7$}.
+  \end{exercise}
+  \begin{solution}
+    Es gibt keinen Schnittpunkt
+  \end{solution}
+
+  \begin{exercise}
+    Die Familie Meier fordert Offerten f\"ur eine Heizungsreparatur
+    ein. Firma A berechnet f\"ur die Fahrtkosten Fr. 42.- und f\"ur
+    jede Arbeitsstunde 76.-. Bei der Firma B sind die Fahrtkosten
+    Fr. 35.- und jede Arbeitsstunde wird mit Fr. 80.- berechnet. 
+    \begin{enumerate}[label=\alph*)]
+    \item Welche Kosten entstehen f\"ur beide Firmen, wenn ein Monteur
+      3.5 Stunden  
+      f\"ur die Arbeit benötigt? Welche Firma ist in diesem Fall
+      kostengünstiger? 
+      
+    \item Wie lauten die Gleichungen derjenigen zwei linearen
+      Funktionen, die jeder Arbeitszeit $x$ (in Stunden) die
+      entstehenden Kosten $y$ (in Franken) zuordnet? 
+      
+    \item Berechne, bei welcher Arbeitszeit die Kosten bei beiden
+      Firmen gleich sind.
+    \end{enumerate}
+  \end{exercise}
+  \begin{solution}
+    \begin{enumerate}[label=\alph*)]
+    \item Firma A: 308.- $|$ Firma B: 315.-
+    \item A: $y=76x+42$ $|$ B: $y=80x+35$
+    \item Bei $1\frac{3}{4}$ Stunden
+    \end{enumerate}
+  \end{solution}
+\end{exerciseseries}
+
+\end{document}
+%</example-inline>
+% \end{Verbatim}
+%
+% 
 % \subsection{Fiddling with the spacing}
 %
 % The default spacing provided by the \textsf{ExSol} package should be
@@ -699,6 +985,8 @@
 \RequirePackage{kvoptions}
 \RequirePackage{multicol}
 \RequirePackage{varwidth}
+\@ifpackageloaded{babel}{\typeout{Good: you loaded babel first!}}{\PackageError{exsol}{You forgot to load the
+    babel package before exsol}{}}
 %    \end{macrocode}
 %
 % \subsection{Package options}
@@ -716,6 +1004,26 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \changes{v1.5}{2019/01/02}{Added option external}
+% \begin{macro}{external}
+%  This boolean option (true, false) allows setting the mode of the
+%  package into external, i.e. that the both exercises and solutions
+%  will be written to separate files.
+%    \begin{macrocode}
+\DeclareBoolOption[false]{external}
+%    \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.5}{2019/01/02}{Added option inline}
+% \begin{macro}{inline}
+%  This boolean option (true, false) allows setting the mode of the
+%  package into inline, i.e. that the solutions will be included 'on
+%  the spot'.
+%    \begin{macrocode}
+\DeclareBoolOption[false]{inline}
+%    \end{macrocode}
+% \end{macro}
+%
 % \changes{v1.2}{2016/05/05}{Added option nolabels}
 % \begin{macro}{nolabels}
 %  This boolean option (true, false) allows suppressing the 'Exercise'
@@ -845,8 +1153,14 @@
   \typeout{Writing solutions to solution file \jobname.sol.tex}
   \newwrite\solutionstream
   \immediate\openout\solutionstream=\jobname.sol.tex
+  \ifexsol at external
+  \typeout{Writing exercises to exercise file \jobname.exc.tex}
+  \newwrite\exercisestream
+  \immediate\openout\exercisestream=\jobname.exc.tex
+  \else
   \typeout{Using intermediate exercise file \jobname.exc.tex}
   \newwrite\exercisestream
+  \fi
   \typeout{Writing formulae to formula collection file \jobname.fc.tex}
   \newwrite\formulacollectionstream
   \immediate\openout\formulacollectionstream=\jobname.fc.tex
@@ -953,7 +1267,9 @@
 \def\exercise{\FV at Environment{}{exercise}}
 \def\FVB at exercise{%
   \refstepcounter{exercise}%
+  \ifexsol at external\else
   \immediate\openout\exercisestream=\jobname.exc.tex
+  \fi
   \ifexsol at local
 %  \immediate\write\solutionstream{}
   \else
@@ -961,8 +1277,6 @@
 %    \string\quad\string\newline}
   \fi
   \ifexsol at copyexercisesinsolutions
-  % WDSC tofix
-  % \typeout{Writing exercise to \jobname.sol.tex}
   \immediate\write\solutionstream{\string\begin{exsol at exercise}{\theexercise}}
   \fi
   \immediate\write\exercisestream{\string\begin{exsol at exercise}{\theexercise}}
@@ -988,8 +1302,10 @@
   \ifexsol at copyexercisesinsolutions
     \immediate\write\solutionstream{\string\end{exsol at exercise}}
   \fi
+  \ifexsol at external\else
   \immediate\closeout\exercisestream
   \input{\jobname.exc.tex}
+  \fi
 }
 \DefineVerbatimEnvironment{exercise}{exercise}{}
 %    \end{macrocode}
@@ -1050,12 +1366,22 @@
 %    \begin{macrocode}
 \def\solution{\FV at Environment{}{solution}}
 \def\FVB at solution{%
-  %\typeout{Writing solution to \jobname.sol.tex}
+  % \typeout{Writing solution to \jobname.sol.tex}
+  % WDSC
   \ifexsol at copyexercisesinsolutions
-  \immediate\write\solutionstream{\string\begin{exsol at solution}{}}
+    \immediate\write\solutionstream{\string\begin{exsol at solution}{}}
   \else
-  \immediate\write\solutionstream{\string\begin{exsol at solution}{\theexercise}}
+    \ifexsol at inline
+     \immediate\write\solutionstream{\string\begin{exsol at solution}{}}
+    \else
+      \immediate\write\solutionstream{\string\begin{exsol at solution}{\theexercise}}
+    \fi
   \fi
+  % \ifexsol at copyexercisesinsolutions
+  % \immediate\write\solutionstream{\string\begin{exsol at solution}{}}
+  % \else
+  % \immediate\write\solutionstream{\string\begin{exsol at solution}{\theexercise}}
+  % \fi
   \@bsphack
   \begingroup
     \FV at UseKeyValues
@@ -1071,6 +1397,11 @@
 \def\FVE at solution{
   \endgroup\@esphack
   \immediate\write\solutionstream{\string\end{exsol at solution}}
+  \ifexsol at inline
+    \immediate\closeout\solutionstream
+    \input{\jobname.sol.tex}
+    \immediate\openout\solutionstream=\jobname.sol.tex
+  \fi
 }
 \DefineVerbatimEnvironment{solution}{solution}{}
 %    \end{macrocode}
@@ -1163,13 +1494,17 @@
   \setkeys{exerciseseries}{#1}%
   \paragraph{\seriesname~\theexerciseseries:~#2}~\par
   \ifthenelse{\columncount > 1}{\begin{multicols}{\columncount}}{}
+  \ifexsol at inline\else
     \immediate\write\solutionstream{\string\begin\string{solutionseries\string}%
         \string[#1\string]\string{#2\string}\string{\theexerciseseries\string}}
-    }
-    {
-      \ifthenelse{\columncount > 1}{\end{multicols}}{}\relax
-    \exsubrule\par
+  \fi
+}
+{
+  \ifthenelse{\columncount > 1}{\end{multicols}}{}\relax
+  \exsubrule\par
+  \ifexsol at inline\else
     \immediate\write\solutionstream{\string\end\string{solutionseries\string}}
+  \fi
 }
 %    \end{macrocode}
 % \end{macro}
@@ -1335,6 +1670,8 @@
 % \changes{v1.3}{2016/08/09}{Corrected counter in solutionstream}
 % \changes{v1.3}{2016/08/09}{Added macro to suppress chapter in
 % solution stream}
+% \changes{v1.5}{2019/01/02}{Added writing the sectioning code to the
+% exercise stream in external mode}
 %    \begin{macrocode}
 \newif\ifnoexinchapter
 \noexinchapterfalse
@@ -1349,6 +1686,10 @@
   \addtocounter{chapter}{-1}
   \immediate\write\solutionstream{\string\setcounter{chapter}{\arabic{chapter}}%
     \string\chapter{#1}}%
+  \ifexsol at external
+  \immediate\write\exercisestream{\string\setcounter{chapter}{\arabic{chapter}}%
+    \string\chapter{#1}}%
+  \fi
   \addtocounter{chapter}{1}
   \fi
 }
@@ -1356,6 +1697,9 @@
   \let\exsol@@frontmatter\frontmatter
   \def\frontmatter{%
     \immediate\write\solutionstream{\string\frontmatter}%
+    \ifexsol at external%
+    \immediate\write\exercisestream{\string\frontmatter}%
+    \fi%
     \exsol@@frontmatter
   }
 \fi
@@ -1363,6 +1707,9 @@
   \let\exsol@@mainmatter\mainmatter
   \def\mainmatter{%
     \immediate\write\solutionstream{\string\mainmatter}%
+    \ifexsol at external%
+    \immediate\write\exercisestream{\string\mainmatter}%
+    \fi%
     \exsol@@mainmatter
   }
 \fi
@@ -1370,6 +1717,9 @@
   \let\exsol@@backmatter\backmatter
   \def\backmatter{%
     \immediate\write\solutionstream{\string\backmatter}%
+    \ifexsol at external%
+    \immediate\write\exercisestream{\string\backmatter}%
+    \fi%
     \exsol@@backmatter
   }
 \fi
@@ -1377,6 +1727,9 @@
   \let\exsol@@appendix\appendix
   \def\appendix{%
     \immediate\write\solutionstream{\string\appendix}%
+    \ifexsol at external%
+    \immediate\write\exercisestream{\string\appendix}%
+    \fi%
     \exsol@@appendix
   }
 \fi
@@ -1403,6 +1756,9 @@
 \newcommand{\noexercisesinchapter}
 {
   \immediate\write\solutionstream{No exercises in this chapter}
+  \ifexsol at external%
+  \immediate\write\exercisestream{No exercises in this chapter}%
+  \fi%
 }
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/Master/texmf-dist/source/latex/exsol/exsol.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/exsol/exsol.ins	2024-01-07 21:26:03 UTC (rev 69332)
+++ trunk/Master/texmf-dist/source/latex/exsol/exsol.ins	2024-01-07 21:26:22 UTC (rev 69333)
@@ -1,4 +1,4 @@
-%% Copyright (C) 2018 by Walter Daems <walter.daems at uantwerpen.be>
+%% Copyright (C) 2019 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) 2018 by Walter Daems <walter.daems at uantwerpen.org>
+Copyright (C) 2019 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
@@ -46,7 +46,10 @@
 \generate{\file{example.tex}{\from{exsol.dtx}{example}}}
 \generate{\file{example-solutionbook.tex}{\from{exsol.dtx}{examplesol}}}
 \generate{\file{example-formulacollection.tex}{\from{exsol.dtx}{examplefor}}}
+\generate{\file{example-exercisebook.tex}{\from{exsol.dtx}{exampleexc}}}   
 \generate{\file{example-local.tex}{\from{exsol.dtx}{example-local}}}
+\generate{\file{example-inline.tex}{\from{exsol.dtx}{example-inline}}}
+\generate{\file{example-external.tex}{\from{exsol.dtx}{example-external}}}
 
 
 \obeyspaces

Modified: trunk/Master/texmf-dist/tex/latex/exsol/exsol.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exsol/exsol.sty	2024-01-07 21:26:03 UTC (rev 69332)
+++ trunk/Master/texmf-dist/tex/latex/exsol/exsol.sty	2024-01-07 21:26:22 UTC (rev 69333)
@@ -8,7 +8,7 @@
 %% 
 %% This is a generated file.
 %% 
-%% Copyright (C) 2018 by Walter Daems <walter.daems at uantwerpen.org>
+%% Copyright (C) 2019 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,7 +22,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{exsol}
-  [2018/10/23 v1.4 ExSol - Exercises and Solutions package (DMW)]
+  [2024/01/07 v1.6 ExSol - Exercises and Solutions package (DMW)]
 \RequirePackage{ifmtarg}
 \RequirePackage{fancyvrb}
 \RequirePackage{ifthen}
@@ -29,7 +29,11 @@
 \RequirePackage{kvoptions}
 \RequirePackage{multicol}
 \RequirePackage{varwidth}
+\@ifpackageloaded{babel}{\typeout{Good: you loaded babel first!}}{\PackageError{exsol}{You forgot to load the
+    babel package before exsol}{}}
 \DeclareBoolOption[false]{local}
+\DeclareBoolOption[false]{external}
+\DeclareBoolOption[false]{inline}
 \DeclareBoolOption[false]{nolabels}
 \DeclareStringOption[normalsize]{exercisesfontsize}
 \DeclareBoolOption[false]{exerciseaslist}
@@ -64,8 +68,14 @@
   \typeout{Writing solutions to solution file \jobname.sol.tex}
   \newwrite\solutionstream
   \immediate\openout\solutionstream=\jobname.sol.tex
+  \ifexsol at external
+  \typeout{Writing exercises to exercise file \jobname.exc.tex}
+  \newwrite\exercisestream
+  \immediate\openout\exercisestream=\jobname.exc.tex
+  \else
   \typeout{Using intermediate exercise file \jobname.exc.tex}
   \newwrite\exercisestream
+  \fi
   \typeout{Writing formulae to formula collection file \jobname.fc.tex}
   \newwrite\formulacollectionstream
   \immediate\openout\formulacollectionstream=\jobname.fc.tex
@@ -116,13 +126,13 @@
 \def\exercise{\FV at Environment{}{exercise}}
 \def\FVB at exercise{%
   \refstepcounter{exercise}%
+  \ifexsol at external\else
   \immediate\openout\exercisestream=\jobname.exc.tex
+  \fi
   \ifexsol at local
   \else
   \fi
   \ifexsol at copyexercisesinsolutions
-  % WDSC tofix
-  % \typeout{Writing exercise to \jobname.sol.tex}
   \immediate\write\solutionstream{\string\begin{exsol at exercise}{\theexercise}}
   \fi
   \immediate\write\exercisestream{\string\begin{exsol at exercise}{\theexercise}}
@@ -148,8 +158,10 @@
   \ifexsol at copyexercisesinsolutions
     \immediate\write\solutionstream{\string\end{exsol at exercise}}
   \fi
+  \ifexsol at external\else
   \immediate\closeout\exercisestream
   \input{\jobname.exc.tex}
+  \fi
 }
 \DefineVerbatimEnvironment{exercise}{exercise}{}
 \newenvironment{exsol at exercise}[1]
@@ -180,12 +192,22 @@
 }
 \def\solution{\FV at Environment{}{solution}}
 \def\FVB at solution{%
-  %\typeout{Writing solution to \jobname.sol.tex}
+  % \typeout{Writing solution to \jobname.sol.tex}
+  % WDSC
   \ifexsol at copyexercisesinsolutions
-  \immediate\write\solutionstream{\string\begin{exsol at solution}{}}
+    \immediate\write\solutionstream{\string\begin{exsol at solution}{}}
   \else
-  \immediate\write\solutionstream{\string\begin{exsol at solution}{\theexercise}}
+    \ifexsol at inline
+     \immediate\write\solutionstream{\string\begin{exsol at solution}{}}
+    \else
+      \immediate\write\solutionstream{\string\begin{exsol at solution}{\theexercise}}
+    \fi
   \fi
+  % \ifexsol at copyexercisesinsolutions
+  % \immediate\write\solutionstream{\string\begin{exsol at solution}{}}
+  % \else
+  % \immediate\write\solutionstream{\string\begin{exsol at solution}{\theexercise}}
+  % \fi
   \@bsphack
   \begingroup
     \FV at UseKeyValues
@@ -201,6 +223,11 @@
 \def\FVE at solution{
   \endgroup\@esphack
   \immediate\write\solutionstream{\string\end{exsol at solution}}
+  \ifexsol at inline
+    \immediate\closeout\solutionstream
+    \input{\jobname.sol.tex}
+    \immediate\openout\solutionstream=\jobname.sol.tex
+  \fi
 }
 \DefineVerbatimEnvironment{solution}{solution}{}
 \newenvironment{exsol at solution}[1]
@@ -262,13 +289,17 @@
   \setkeys{exerciseseries}{#1}%
   \paragraph{\seriesname~\theexerciseseries:~#2}~\par
   \ifthenelse{\columncount > 1}{\begin{multicols}{\columncount}}{}
+  \ifexsol at inline\else
     \immediate\write\solutionstream{\string\begin\string{solutionseries\string}%
         \string[#1\string]\string{#2\string}\string{\theexerciseseries\string}}
-    }
-    {
-      \ifthenelse{\columncount > 1}{\end{multicols}}{}\relax
-    \exsubrule\par
+  \fi
+}
+{
+  \ifthenelse{\columncount > 1}{\end{multicols}}{}\relax
+  \exsubrule\par
+  \ifexsol at inline\else
     \immediate\write\solutionstream{\string\end\string{solutionseries\string}}
+  \fi
 }
 \newenvironment{solutionseries}[3][]
 {
@@ -384,6 +415,10 @@
   \addtocounter{chapter}{-1}
   \immediate\write\solutionstream{\string\setcounter{chapter}{\arabic{chapter}}%
     \string\chapter{#1}}%
+  \ifexsol at external
+  \immediate\write\exercisestream{\string\setcounter{chapter}{\arabic{chapter}}%
+    \string\chapter{#1}}%
+  \fi
   \addtocounter{chapter}{1}
   \fi
 }
@@ -391,6 +426,9 @@
   \let\exsol@@frontmatter\frontmatter
   \def\frontmatter{%
     \immediate\write\solutionstream{\string\frontmatter}%
+    \ifexsol at external%
+    \immediate\write\exercisestream{\string\frontmatter}%
+    \fi%
     \exsol@@frontmatter
   }
 \fi
@@ -398,6 +436,9 @@
   \let\exsol@@mainmatter\mainmatter
   \def\mainmatter{%
     \immediate\write\solutionstream{\string\mainmatter}%
+    \ifexsol at external%
+    \immediate\write\exercisestream{\string\mainmatter}%
+    \fi%
     \exsol@@mainmatter
   }
 \fi
@@ -405,6 +446,9 @@
   \let\exsol@@backmatter\backmatter
   \def\backmatter{%
     \immediate\write\solutionstream{\string\backmatter}%
+    \ifexsol at external%
+    \immediate\write\exercisestream{\string\backmatter}%
+    \fi%
     \exsol@@backmatter
   }
 \fi
@@ -412,6 +456,9 @@
   \let\exsol@@appendix\appendix
   \def\appendix{%
     \immediate\write\solutionstream{\string\appendix}%
+    \ifexsol at external%
+    \immediate\write\exercisestream{\string\appendix}%
+    \fi%
     \exsol@@appendix
   }
 \fi
@@ -423,6 +470,9 @@
 \newcommand{\noexercisesinchapter}
 {
   \immediate\write\solutionstream{No exercises in this chapter}
+  \ifexsol at external%
+  \immediate\write\exercisestream{No exercises in this chapter}%
+  \fi%
 }
 \endinput
 %%



More information about the tex-live-commits mailing list.