summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mandi
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-11-24 03:00:51 +0000
committerNorbert Preining <norbert@preining.info>2023-11-24 03:00:51 +0000
commitac5a5e57a4c9b3c436c3bac327fe885acea28ba4 (patch)
tree52e2cdef50f95b55a5cec2f48cc27bfef4ce1a39 /macros/latex/contrib/mandi
parent4b11f001033c31cf22cda6f3d77dc2b5f013cd5b (diff)
CTAN sync 202311240300
Diffstat (limited to 'macros/latex/contrib/mandi')
-rw-r--r--macros/latex/contrib/mandi/README.md39
-rw-r--r--macros/latex/contrib/mandi/mandi.dtx80
-rw-r--r--macros/latex/contrib/mandi/mandi.ins22
-rw-r--r--macros/latex/contrib/mandi/mandi.pdfbin515270 -> 514465 bytes
-rw-r--r--macros/latex/contrib/mandi/mandiexp.dtx20
-rw-r--r--macros/latex/contrib/mandi/mandistudent.dtx41
6 files changed, 105 insertions, 97 deletions
diff --git a/macros/latex/contrib/mandi/README.md b/macros/latex/contrib/mandi/README.md
index bc2d56ec0a..08370223e0 100644
--- a/macros/latex/contrib/mandi/README.md
+++ b/macros/latex/contrib/mandi/README.md
@@ -1,9 +1,34 @@
-`mandi` provides commands for introductory physics. To install, open a command
-line and type the following, repeating 2-4 until there are no warnings:
+# mandi - Macros for introductory physics
- 1. `lualatex mandi.ins` (can also use latex)
- 2. `lualatex mandi.dtx` (lualatex is required)
- 3. `makeindex -s gind.ist -o mandi.ind mandi.idx`
- 4. `makeindex -s gglo.ist -o mandi.gls mandi.glo`
+## Description
+`mandi` (which can be pronounced with two syllables rhyming with _candy_, or with three
+as _M and I_, referencing a popular introductory physics textbook) is for students and
+instructors in an introductory physics course. They can use `mandi` to write solutions,
+class notes, handouts, assessments, and other such documents. Using physical quantities
+(and constants) by name eliminates missing units. Step-by-step solutions and reasoning
+eliminates missing work, and consistent notation can be employed.
-Move the `*.sty` files into a directory searched by TeX. Delete `vdemo.py`.
+### `mandi`
+The `mandi` package defines every physical quantity and constant used in introductory
+physics by its name. SI units are included by default in any of three different kinds
+(base, derived, and alternate). A simple interface for defining additional quantities
+and constants is provided.
+
+### `mandistudent`
+The `mandistudent` package defines additional commands and environments for writing
+solutions to physics problems. The `physicsproblem` and `physicssolution` environments
+allow for semantically structured solutions. Computational problems are accommodated
+as [Web VPython](https://glowscript.org/) and [VPython](https://vpython.org/) code.
+
+### `mandiexp`
+The `mandiexp` package defines commands for typesetting the equations and expressions
+most frequently used in introductory physics. The equations and expressions are based
+on those found in [*Matter & Interactions*](https://matterandinteractions.org/) but
+are certainly applicable to any introductory physics textbook.
+
+## Author and Maintainer
+`mandi` is authored and maintained by
+[Paul J. Heafner](mailto:heafnerj@gmail.com?subject=[Heafner]%20mandi).
+
+## License
+`mandi` is released under [LPPL](https://www.latex-project.org/lppl.txt) 1.3c and later.
diff --git a/macros/latex/contrib/mandi/mandi.dtx b/macros/latex/contrib/mandi/mandi.dtx
index 745b779af6..3907b21e1b 100644
--- a/macros/latex/contrib/mandi/mandi.dtx
+++ b/macros/latex/contrib/mandi/mandi.dtx
@@ -4,10 +4,10 @@
% Copyright (C) 2023 by Paul J. Heafner <heafnerj@gmail.com>
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, either version 1.3 of this license or (at
+% LaTeX Project Public License, either version 1.3c 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
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX version
% 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
@@ -27,10 +27,6 @@
% vdemo.py (not needed)
% ---------------------------------------------------------------------------
%
-% \fi
-%
-% \iffalse
-%
%<*internal>
\iffalse
%</internal>
@@ -58,10 +54,11 @@
% This can be changed in a local ltxdoc.cfg file but it is
% easier to just use the article class and the doc package
% instead and force letterpaper size.
-\documentclass[10pt,letterpaper]{ltxdoc}
-\SetupDoc{reportchangedates}
-%\documentclass[10pt,letterpaper]{article}
-%\usepackage[nohyperref,reportchangedates]{doc} % doc v3 zzzz
+%\documentclass[10pt,letterpaper]{ltxdoc}
+%\SetupDoc{reportchangedates}
+\documentclass[10pt,letterpaper]{article}
+\usepackage[reportchangedates]{doc} % THIS SUDDENLY WORKS!
+%\usepackage{hypdoc} % THIS ALSO WORKS!
\PassOptionsToPackage{listings,documentation}{tcolorbox} % prevent option clash
\usepackage{\jobname} % load mandi.sty
\usepackage{mandistudent} % load mandistudent.sty
@@ -236,15 +233,32 @@
% \listoffigures
% \restoregeometry
%
-% \changes{v3.0.0}{2021-08-22}{\linktoplace{sec:mandia}{mandi} Initial release}
-% \changes{v3.0.0}{2021-08-22}{\linktoplace{sec:mandib}{mandistudent} Initial release}
-% \changes{v3.0.0}{2021-08-22}{\linktoplace{sec:mandic}{mandiexp} Initial release}
-% \changes{v3.0.1}{2021-08-24}{\linktoplace{sec:mandia}{mandi} Minor doc changes}
-% \changes{v3.0.1}{2021-08-24}{\linktoplace{sec:mandib}{mandistudent} Minor doc changes}
-% \changes{v3.0.1}{2021-08-24}{\linktoplace{sec:mandic}{mandiexp} Minor doc changes}
-% \changes{v3.2.0}{2023-08-01}{\linktoplace{sec:mandia}{mandi} Source updated}
-% \changes{v3.2.0}{2023-08-01}{\linktoplace{sec:mandib}{mandistudent} Source updated}
-% \changes{v3.2.0}{2023-08-01}{\linktoplace{sec:mandic}{mandiexp} Source updated}
+% \changes{v3.0.0}{2021-08-22}
+% {\linktoplace{sec:mandia}{mandi} \linktoplace{sec:mandib}{mandistudent}
+% \linktoplace{sec:mandic}{mandiexp} Initial release}
+% \changes{v3.0.1}{2021-08-24}
+% {\linktoplace{sec:mandia}{mandi} \linktoplace{sec:mandib}{mandistudent}
+% \linktoplace{sec:mandic}{mandiexp}Minor doc changes}
+% \changes{v3.1.0}{2022-01-27}
+% {\linktoplace{sec:mandia}{mandi} \linktoplace{sec:mandib}{mandistudent}
+% \linktoplace{sec:mandic}{mandiexp} Code formatted for better readability}
+% \changes{v3.1.0}{2022-01-27}
+% {\linktoplace{sec:mandia}{mandi} \linktoplace{sec:mandib}{mandistudent}
+% \linktoplace{sec:mandic}{mandiexp} \pkg{xparse} is loaded for older formats}
+% \changes{v3.1.0}{2022-01-27}
+% {\linktoplace{sec:mandia}{mandi} \linktoplace{sec:mandib}{mandistudent}
+% \LaTeX3 code now conforms to formatting standards}
+% \changes{v3.2.0}{2023-08-01}
+% {\linktoplace{sec:mandia}{mandi} \linktoplace{sec:mandib}{mandistudent}
+% \linktoplace{sec:mandic}{mandiexp} Source updated}
+% \changes{v3.2.1}{2023-11-22}{Improved \texttt{README.md} at request of \texttt{CTAN}
+% maintainer}
+% \changes{v3.2.1}{2023-11-22}{\linktoplace{sec:mandia}{mandi} Minor changes to
+% \texttt{mandi.ins} inside \texttt{mandi.dtx}}
+% \changes{v3.2.1}{2023-11-22}
+% {\linktoplace{sec:mandia}{mandi} \linktoplace{sec:mandib}{mandistudent}
+% \linktoplace{sec:mandic}{mandiexp} Source updated and bumped version for new
+% \texttt{CTAN} upload}
%
% \section{Introduction}
% The \mandi \footnote{The bundle name can be pronounced either with two
@@ -262,13 +276,13 @@
% {\emph{Matter \& Interactions}} and
% \url{https://matterandinteractions.org/} for details.}
%
-% So many changes have been made that I think the best approach for former,
-% as well as new, users is to treat this as a brand new experience. I think
-% the most important thing to keep in mind is that I assume users,
-% especially new users, will have a relatively recent TeX distribution
-% (like TeX Live) that includes a recently updated \LaTeXe{} kernel. If users
-% report that this is a major problem, I can provide some degree of
-% backwards compatibility. However, I use a fully updated TeX Live distribution.
+% So many changes have been made that I think the best approach for all
+% users is to treat this as a brand new experience. I think the most
+% important thing to keep in mind is that I assume all users will have a
+% relatively recent \TeX\ distribution (like \TeX~Live) that includes an
+% updated kernel. If users report that this is a major problem, I can provide
+% some degree of backwards compatibility. However, I use a fully updated
+% \TeX~Live distribution.
%
% \section{Getting Help}
% If you have a question about \mandi, first please read this documentation to make
@@ -1951,13 +1965,11 @@
% |\makeatother|. This simplifies defining internal commands (with |@|
% in the name) that are not for the user to know about.
%
-% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandia}{mandi} Code formatted for better readability}
% \begin{macrocode}
-\def\mandi@version{3.2.0}
-\def\mandi@date{2023-08-01}
+\def\mandi@version{3.2.1}
+\def\mandi@date{2023-11-22}
\NeedsTeXFormat{LaTeX2e}[2020-02-02]
-\DeclareRelease{v3.2.0}{2023-08-01}{mandi.sty}
+\DeclareRelease{v3.2.1}{2023-11-22}{mandi.sty}
\DeclareCurrentRelease{v\mandi@version}{\mandi@date}
\ProvidesPackage{mandi}
[\mandi@date\space v\mandi@version\space Macros for physical quantities]
@@ -2009,8 +2021,6 @@
%
% Load \pkg{xparse} if necessary.
%
-% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandia}{mandi} \pkg{xparse} is loaded for older formats}
% \begin{macrocode}
\IfFormatAtLeastTF{2020-10-01}
{}%
@@ -2241,8 +2251,6 @@
\NewDocumentCommand{\xtento}{ m }{\times\tento{#1}}
% \end{macrocode}
%
-% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandia}{mandi} \LaTeX3 code now conforms to formatting standards}
% \begin{macrocode}
\ExplSyntaxOn
\cs_new:Npn \__mandi_newscalarquantity:nnnn #1#2#3#4
diff --git a/macros/latex/contrib/mandi/mandi.ins b/macros/latex/contrib/mandi/mandi.ins
index e235a16fbe..a479906b68 100644
--- a/macros/latex/contrib/mandi/mandi.ins
+++ b/macros/latex/contrib/mandi/mandi.ins
@@ -9,10 +9,10 @@
%% Copyright (C) 2023 by Paul J. Heafner <heafnerj@gmail.com>
%% ---------------------------------------------------------------------------
%% This work may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License, either version 1.3 of this license or (at
+%% LaTeX Project Public License, either version 1.3c 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
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
@@ -41,10 +41,10 @@
Copyright (C) 2023 by Paul J. Heafner <heafnerj@gmail.com>
---------------------------------------------------------------------------
This work may be distributed and/or modified under the conditions of the
- LaTeX Project Public License, either version 1.3 of this license or (at
+ LaTeX Project Public License, either version 1.3c 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
+ https://www.latex-project.org/lppl.txt
+ and version 1.3c or later is part of all distributions of LaTeX version
2005/12/01 or later.
This work has the LPPL maintenance status `maintained'.
@@ -75,12 +75,12 @@
\obeyspaces
\Msg{**************************************************************}
\Msg{* *}
-\Msg{* To finish the installation, open a command line and *}
-\Msg{* type the following, repeating 2-4 until there are no *}
+\Msg{* Process this file with lualatex or pdflatex and then *}
+\Msg{* type the following, repeating 1-3 until there are no *}
\Msg{* warnings: *}
-\Msg{* 2. lualatex mandi.dtx (lualatex is required) *}
-\Msg{* 3. makeindex -s gind.ist -o mandi.ind mandi.idx *}
-\Msg{* 4. makeindex -s gglo.ist -o mandi.gls mandi.glo *}
+\Msg{* 1. lualatex mandi.dtx (lualatex is required) *}
+\Msg{* 2. makeindex -s gind.ist -o mandi.ind mandi.idx *}
+\Msg{* 3. makeindex -s gglo.ist -o mandi.gls mandi.glo *}
\Msg{* Move the *.sty files into a directory searched by TeX. *}
\Msg{* Delete vdemo.py. *}
\Msg{* *}
diff --git a/macros/latex/contrib/mandi/mandi.pdf b/macros/latex/contrib/mandi/mandi.pdf
index 02dbcf4efd..9b3fa83b44 100644
--- a/macros/latex/contrib/mandi/mandi.pdf
+++ b/macros/latex/contrib/mandi/mandi.pdf
Binary files differ
diff --git a/macros/latex/contrib/mandi/mandiexp.dtx b/macros/latex/contrib/mandi/mandiexp.dtx
index 3e4f83f419..bbd1501a73 100644
--- a/macros/latex/contrib/mandi/mandiexp.dtx
+++ b/macros/latex/contrib/mandi/mandiexp.dtx
@@ -4,10 +4,10 @@
% Copyright (C) 2023 by Paul J. Heafner <heafnerj@gmail.com>
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, either version 1.3 of this license or (at
+% LaTeX Project Public License, either version 1.3c 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
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX version
% 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
@@ -27,10 +27,6 @@
% vdemo.py (not needed)
% ---------------------------------------------------------------------------
%
-% \fi
-%
-% \iffalse
-%
%<*internal>
\iffalse
%</internal>
@@ -574,13 +570,11 @@
%
% \changes{v3.1.0}{2022-01-27}
% {\linktoplace{sec:mandic}{mandiexp} Version number works}
-% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandic}{mandiexp} Code formatted for better readability}
% \begin{macrocode}
-\def\mandiexp@version{3.2.0}
-\def\mandiexp@date{2023-08-01}
+\def\mandiexp@version{3.2.1}
+\def\mandiexp@date{2023-11-22}
\NeedsTeXFormat{LaTeX2e}[2020-02-02]
-\DeclareRelease{v3.2.0}{2023-08-01}{mandiexp.sty}
+\DeclareRelease{v3.2.1}{2023-11-22}{mandiexp.sty}
\DeclareCurrentRelease{v\mandiexp@version}{\mandiexp@date}
\ProvidesPackage{mandiexp}
[\mandiexp@date\space v\mandiexp@version\space Macros for Matter & Interactions]
@@ -617,8 +611,6 @@
%
% Load \pkg{xparse} if necessary.
%
-% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandic}{mandiexp} \pkg{xparse} is loaded for older formats}
% \begin{macrocode}
\IfFormatAtLeastTF{2020-10-01}%
{}%
diff --git a/macros/latex/contrib/mandi/mandistudent.dtx b/macros/latex/contrib/mandi/mandistudent.dtx
index 90b4a3dbd7..da277a0baa 100644
--- a/macros/latex/contrib/mandi/mandistudent.dtx
+++ b/macros/latex/contrib/mandi/mandistudent.dtx
@@ -4,10 +4,10 @@
% Copyright (C) 2023 by Paul J. Heafner <heafnerj@gmail.com>
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, either version 1.3 of this license or (at
+% LaTeX Project Public License, either version 1.3c 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
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX version
% 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
@@ -27,10 +27,6 @@
% vdemo.py (not needed)
% ---------------------------------------------------------------------------
%
-% \fi
-%
-% \iffalse
-%
%<*internal>
\iffalse
%</internal>
@@ -826,7 +822,7 @@ while t < 10:
},%
}%
Typesets tensor contraction in coordinate-free notation. There
- is no standard on this so we assert one here.
+ is no standard for this so we assert one here.
\end{docCommands}
\begin{dispExample}
\( \contraction{1,2} \) \\
@@ -1246,13 +1242,11 @@ while t < 10:
%
% \changes{v3.1.0}{2022-01-27}
% {\linktoplace{sec:mandib}{mandistudent} Version number works}
-% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandib}{mandistudent} Code formatted for better readability}
% \begin{macrocode}
-\def\mandistudent@version{3.2.0}
-\def\mandistudent@date{2023-08-01}
+\def\mandistudent@version{3.2.1}
+\def\mandistudent@date{2023-11-22}
\NeedsTeXFormat{LaTeX2e}[2020-02-02]
-\DeclareRelease{v3.2.0}{2023-08-01}{mandistudent.sty}
+\DeclareRelease{v3.2.1}{2023-11-22}{mandistudent.sty}
\DeclareCurrentRelease{v\mandistudent@version}{\mandistudent@date}
\ProvidesPackage{mandistudent}
[\mandistudent@date\space v\mandistudent@version\space Macros for introductory physics]
@@ -1364,8 +1358,6 @@ while t < 10:
%
% Load \pkg{xparse} if necessary.
%
-% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandib}{mandistudent} \pkg{xparse} is loaded for older formats}
% \begin{macrocode}
\IfFormatAtLeastTF{2020-10-01}
{}%
@@ -1572,8 +1564,8 @@ while t < 10:
% See also \url{https://tex.stackexchange.com/a/531037/218142}.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandib}{mandistudent} \refCom{vec}%
-% no longer adds \cs{scriptspace} when no sub/superscript is given}
+% {\linktoplace{sec:mandib}{mandistudent} \refCom{vec} and \refCom{dirvec}%
+% no longer add \cs{scriptspace} when no sub/superscript is given}
% \begin{macrocode}
\RenewDocumentCommand{\vec}{ s m e{_^} }%
{%
@@ -1592,16 +1584,12 @@ while t < 10:
{\sb{#3\vphantom{\smash[b]{|}}}}
}%
% \end{macrocode}
-%
-% A command for the direction of a vector.
+%% A command for the direction of a vector.
% We use a slight tweak to get uniform hats that
% requires the \href{https://www.ctan.org/pkg/makebox}{\pkg{makebox}}
% package.\newline
% See \url{https://tex.stackexchange.com/a/391204/218142}.
%
-% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandib}{mandistudent} \refCom{dirvec}%
-% no longer adds \cs{scriptspace} when no sub/superscript is given}
% \begin{macrocode}
\NewDocumentCommand{\dirvec}{ s m e{_^} }%
{%
@@ -1641,8 +1629,6 @@ while t < 10:
% Notation for column and row vectors.\newline
% See \url{https://tex.stackexchange.com/a/39054/218142}.
%
-% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandib}{mandistudent} \LaTeX3 code now conforms to formatting standards}
% \begin{macrocode}
\ExplSyntaxOn
\NewDocumentCommand{\colvec}{ O{,} m }
@@ -2040,8 +2026,8 @@ while t < 10:
% {\linktoplace{sec:mandib}{mandistudent} \refEnv{webvpythonblock} now automatically
% generates QR codes for program listings}
% \changes{v3.2.0}{2023-08-01}
-% {\linktoplace{sec:mandib}{mandistudent} \refEnv{webvpythonblock} now shows
-% URL in header}
+% {\linktoplace{sec:mandib}{mandistudent} \refEnv{webvpythonblock} and
+% \refEnv{webvpythonblock*} now show URL in header}
% \begin{macrocode}
\AtBeginEnvironment{webvpythonblock}{\catcode`\#=12}
\AtEndEnvironment{webvpythonblock}{\catcode`\#=6}
@@ -2076,9 +2062,6 @@ while t < 10:
% \changes{v3.1.0}{2022-01-27}
% {\linktoplace{sec:mandib}{mandistudent} \refEnv{webvpythonblock*} is a variant
% of \refEnv{webvpythonblock} that omits the QR code}
-% \changes{v3.2.0}{2023-08-01}
-% {\linktoplace{sec:mandib}{mandistudent} \refEnv{webvpythonblock*} now shows
-% URL in header}
% \begin{macrocode}
\AtBeginEnvironment{webvpythonblock*}{\catcode`\#=12}
\AtEndEnvironment{webvpythonblock*}{\catcode`\#=6}