summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/eolang/DEPENDS.txt40
-rw-r--r--macros/latex/contrib/eolang/eolang.dtx29
-rw-r--r--macros/latex/contrib/eolang/eolang.pdfbin2103161 -> 1888881 bytes
-rw-r--r--macros/latex/contrib/mandi/README.md11
-rw-r--r--macros/latex/contrib/mandi/mandi.dtx1170
-rw-r--r--macros/latex/contrib/mandi/mandi.ins28
-rw-r--r--macros/latex/contrib/mandi/mandi.pdfbin500572 -> 515270 bytes
-rw-r--r--macros/latex/contrib/mandi/mandiexp.dtx237
-rw-r--r--macros/latex/contrib/mandi/mandistudent.dtx545
-rw-r--r--macros/unicodetex/latex/fontsetup/README2
-rw-r--r--macros/unicodetex/latex/fontsetup/doc/fontsetup-doc.pdfbin556184 -> 584050 bytes
-rw-r--r--macros/unicodetex/latex/fontsetup/doc/fontsetup-doc.tex4
-rw-r--r--macros/unicodetex/latex/fontsetup/fspeulerot.sty61
-rw-r--r--macros/xetex/latex/bidi/README4
-rw-r--r--macros/xetex/latex/bidi/bidi-doc-intro.ltx2
-rw-r--r--macros/xetex/latex/bidi/bidi-doc-title.ltx4
-rw-r--r--macros/xetex/latex/bidi/bidi-doc.ltx2
-rw-r--r--macros/xetex/latex/bidi/bidi-doc.pdfbin176570 -> 176441 bytes
-rw-r--r--macros/xetex/latex/bidi/bidi.dtx113
-rw-r--r--macros/xetex/latex/bidi/bidi.pdfbin3683556 -> 3688262 bytes
20 files changed, 1380 insertions, 872 deletions
diff --git a/macros/latex/contrib/eolang/DEPENDS.txt b/macros/latex/contrib/eolang/DEPENDS.txt
index faa8e162c3..ea34111dee 100644
--- a/macros/latex/contrib/eolang/DEPENDS.txt
+++ b/macros/latex/contrib/eolang/DEPENDS.txt
@@ -1,13 +1,35 @@
-hard stmaryrd
-hard amsmath
+hard adjustbox
hard amsfonts
+hard amsmath
+hard fancyvrb
+hard hyperref
hard iexec
+hard pdftexcmds
hard pgf
-hard fancyvrb
hard pgfopts
-hard pdftexcmds
-hard ifluatex
-hard ifxetex
-hard adjustbox
-hard hyperref
-hard xstring \ No newline at end of file
+hard stmaryrd
+hard xstring
+soft acmart
+soft biber
+soft biblatex
+soft booktabs
+soft caption
+soft cmap
+soft comment
+soft docshots
+soft environ
+soft href-ul
+soft hypdoc
+soft hyperxmp
+soft iexec
+soft ifmtarg
+soft l3build
+soft libertine
+soft ncctools
+soft scheme-basic
+soft setspace
+soft standalone
+soft textcase
+soft tools
+soft totpages
+soft xetex \ No newline at end of file
diff --git a/macros/latex/contrib/eolang/eolang.dtx b/macros/latex/contrib/eolang/eolang.dtx
index 3260d2eacc..a2e4944689 100644
--- a/macros/latex/contrib/eolang/eolang.dtx
+++ b/macros/latex/contrib/eolang/eolang.dtx
@@ -50,7 +50,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{eolang}
%<*package>
-[2023-07-01 0.13.0 Formulas and Graphs for EO Programming Language]
+[2023-08-02 0.14.0 Formulas and Graphs for EO Programming Language]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -219,15 +219,16 @@
% The following markers are supported for a vertex:
% \begin{itemize}\setlength\itemsep{0em}
-% \item ``|tag:<math>|'' puts a custom label |<math>| into the circle,
+% \item ``|tag:<math>|'' puts a custom label |<math>| into the circle;
% \item ``|data:[<box>]|'' makes it a data vertex with an optional attached ``|<box>|''
-% (the content of the box may only be numeric data),
+% (the content of the box may only be numeric data);
% \item ``|atom:[<box>]|'' makes it an atom with an optional attached ``|<box>|''
-% (the content of the box is a math formula),
-% \item ``|box:<txt>|'' attaches a ``|<box>|'' to it,
+% (the content of the box is a math formula);
+% \item ``|box:<txt>|'' attaches a ``|<box>|'' to it;
% \item ``|xy:<v>,<r>,<d>|'' places this vertex in a position relative to the vertex ``|<v>|,''
-% shifting it right by ``|<r>|'' and down by ``|<d>|'' centimetres.
-% \item ``|+:<v>|'' makes a copy of an existing vertex and all its kids.
+% shifting it right by ``|<r>|'' and down by ``|<d>|'' centimetres;
+% \item ``|+:<v>|'' makes a copy of an existing vertex and all its kids;
+% \item ``|edgeless|'' removes the border from the vertex.
% \end{itemize}
% The following markers are supported for an edge:
@@ -691,7 +692,7 @@
% \usetikzlibrary{fit}
% \begin{document}
% \begin{sodg}
-% v0
+% v0 edgeless
% v11 xy:v0,-1,1 \\ v0->v11
% v12 xy:v0,0,1 \\ v0->v12
% v13 xy:v0,1,1 \\ v0->v13
@@ -799,7 +800,7 @@
$macro = $ARGV[0];
open(my $fh, '<', $ARGV[1]);
my $tex; { local $/; $tex = <$fh>; }
-print "% This file is auto-generated by 0.13.0\n";
+print "% This file is auto-generated by 0.14.0\n";
print '% There are ', length($tex),
' chars in the input: ', $ARGV[1], "\n";
print '% ---', "\n";
@@ -1069,6 +1070,7 @@ print '\endinput';
% \changes{0.6.0}{2022/11/13}{The \texttt{rrho} attribute is retired, now \texttt{rho} works just fine in all situations.}
% \changes{0.8.0}{2022/11/20}{The \texttt{tag} attribute is introduced for changing labels inside a vertex circle.}
% \changes{0.12.1}{2023/03/01}{The bug is fixed related to the formatting of indexes of vertices.}
+% \changes{0.14.0}{2023/07/26}{The \texttt{edgeless} tag of a vertex removes the border of it.}
% Then, we create a Perl script for |sodg| graphs processing using |VerbatimOut| from
% \href{https://ctan.org/pkg/fancyvrb}{fancyvrb}:
% \begin{macrocode}
@@ -1135,7 +1137,9 @@ for (my $c = 0; $c < 0+@cmds; $c++) {
my ($q, $t) = split(/:/, $p);
$opts{$q} = $t;
}
- if (index($head, '->') >= 0) {
+ if (index($head, '\\') == 0) {
+ print $cmd;
+ } elsif (index($head, '->') >= 0) {
my $draw = '\draw[';
if (exists $opts{'pi'}) {
$draw = $draw . '<MB:phi-pi><F:draw=none>';
@@ -1306,6 +1310,9 @@ for (my $c = 0; $c < 0+@cmds; $c++) {
} else {
print ',phi-object';
}
+ if (exists $opts{'edgeless'}) {
+ print ',draw=none';
+ }
print ']';
print ' (' . $head . ')';
print ' {';
@@ -1326,8 +1333,6 @@ for (my $c = 0; $c < 0+@cmds; $c++) {
print $head, '.south east) {';
print $opts{'box'}, '}';
}
- } else {
- print $cmd;
}
print ";\n";
}
diff --git a/macros/latex/contrib/eolang/eolang.pdf b/macros/latex/contrib/eolang/eolang.pdf
index 1340ebad23..34a9d5bea0 100644
--- a/macros/latex/contrib/eolang/eolang.pdf
+++ b/macros/latex/contrib/eolang/eolang.pdf
Binary files differ
diff --git a/macros/latex/contrib/mandi/README.md b/macros/latex/contrib/mandi/README.md
index b40227e66d..bc2d56ec0a 100644
--- a/macros/latex/contrib/mandi/README.md
+++ b/macros/latex/contrib/mandi/README.md
@@ -1,10 +1,9 @@
`mandi` provides commands for introductory physics. To install, open a command
line and type the following, repeating 2-4 until there are no warnings:
-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`
+ 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`
-Move the `*.sty` files into a directory searched by TeX.
-The `vdemo.py` file is not needed and can be deleted.
+Move the `*.sty` files into a directory searched by TeX. Delete `vdemo.py`.
diff --git a/macros/latex/contrib/mandi/mandi.dtx b/macros/latex/contrib/mandi/mandi.dtx
index d3313fc5b4..745b779af6 100644
--- a/macros/latex/contrib/mandi/mandi.dtx
+++ b/macros/latex/contrib/mandi/mandi.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
% !TEX program = lualatexmk
%
-% Copyright (C) 2021,2022 by Paul J. Heafner <heafnerj@gmail.com>
+% 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
@@ -24,7 +24,7 @@
% and includes the derived files mandi.sty
% mandistudent.sty
% mandiexp.sty
-% vdemo.py
+% vdemo.py (not needed)
% ---------------------------------------------------------------------------
%
% \fi
@@ -58,9 +58,10 @@
% 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]{ltxdoc}
-\documentclass[10pt,letterpaper]{article}
-\usepackage{doc}
+\documentclass[10pt,letterpaper]{ltxdoc}
+\SetupDoc{reportchangedates}
+%\documentclass[10pt,letterpaper]{article}
+%\usepackage[nohyperref,reportchangedates]{doc} % doc v3 zzzz
\PassOptionsToPackage{listings,documentation}{tcolorbox} % prevent option clash
\usepackage{\jobname} % load mandi.sty
\usepackage{mandistudent} % load mandistudent.sty
@@ -72,6 +73,7 @@
\usepackage[listings,documentation]{tcolorbox} % workhorse package
\tcbset{% % tcolorbox options
index german settings,%
+ index gather commands = false,%
index colorize = false,%
lefthand ratio = 0.50,%
color hyperlink = blue,%
@@ -130,29 +132,6 @@
}%
}%
-% Clean up the Change History entries to get rid of General:
-% and add dates.
-% See https://tex.stackexchange.com/a/283894/218142
-\renewcommand{\generalname}{} % gets rid of General
-\makeatletter
-\renewcommand*{\changes@}[3]{%
- \protected@edef\@tempa{%
- \noexpand\glossary{#1 (#2)\levelchar
- \ifx\saved@macroname\@empty
- \space\actualchar\generalname
- \else
- \expandafter\@gobble\saved@macroname
- \actualchar
- \string\verb\quotechar*\verbatimchar\saved@macroname\verbatimchar
- \fi
- #3}}% gets rid of colon and adjusts spacing
- \@tempa
- \endgroup
- \@esphack
-}%
-\makeatother
-%%%%% End local hacks.
-
% We need a new command for in-line listings to prevent overfull boxes.
% Anything in |...| will be in small plain text.
% Previously used !...! but that conflicts with colors.
@@ -168,31 +147,39 @@
\DocInput{\jobname student.dtx} %
\setcounter{CodelineNo}{0} % reset line numbers if desired
\DocInput{\jobname exp.dtx} %
- \PrintIndex %
+ \phantomsection\addcontentsline{toc}{section}{Index}\PrintIndex%
\end{document} % end main document
%</driver>
% \fi
%
-% \IndexPrologue{\section{Index}Page numbers refer to page where the
-% corresponding entry is documented and/or referenced.}
+% ^^A Put unnumbered Index entry in TOC
+% \IndexPrologue{\section*{Index}Page numbers refer to page where the
+% corresponding entry is documented and/or referenced.\vspace{\baselineskip}}
%
-% \CheckSum{2156}
-%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
+% ^^A Local hack to Change History to remove `General:`
+% ^^A See https://tex.stackexchange.com/a/283894/218142
+% \makeatletter
+% \renewcommand{\generalname}{}
+% \renewcommand{\changes@}[3]{%
+% \protected@edef\@tempa{\noexpand\glossary{#1%
+% \ifdoc@reportchangedates%
+% \space -- #2\fi%
+% \levelchar%
+% \ifx\saved@macroname\@empty%
+% \quotechar!%
+% \actualchar%
+% \generalname%
+% \else%
+% \saved@indexname%
+% \actualchar%
+% \string\verb% % to fool emacs highlighting
+% \quotechar*%
+% \verbatimchar\saved@macroname%
+% \verbatimchar%
+% \fi%
+% #3}}%
+% \@tempa\endgroup\@esphack}%
+% \makeatother
%
% \title{The \href{https://ctan.org/pkg/mandi}{\mandi} Bundle}
% \author{^^A
@@ -201,14 +188,14 @@
% {heafnerj@gmail.com}^^A
% }^^A
% }^^A
-% \date{\today}
+% \date{Printed \today}
%
% \newgeometry{left=1.0in,right=1.0in,top=4.0in}
% \maketitle
% \thispagestyle{empty}
-% \centerline{\mandi\ version \mandiversion}
-% \centerline{\mandistudent\ version \mandistudentversion}
-% \centerline{\mandiexp\ version \mandiexpversion}
+% \centerline{\mandi{} version \mandiversion}
+% \centerline{\mandistudent{} version \mandistudentversion}
+% \centerline{\mandiexp{} version \mandiexpversion}
% ^^A\centerline{\textbf{PLEASE DO NOT DISTRIBUTE THIS BUILD.}}
% \restoregeometry
%
@@ -218,17 +205,17 @@
% \phantomsection
% \addcontentsline{toc}{section}{Acknowledgements}
% \section*{Acknowledgements}
-% To all of the students who have learned \LaTeXe\ in my introductory
+% To all of the students who have learned \LaTeXe{} in my introductory
% physics courses over the years, I say a heartfelt thank you. You
% have contributed directly to the state of this software and to its
% use in introductory physics courses and to innovating how physics
% is taught.
%
-% I also acknowledge the \LaTeXe\ developers who inhabit the
-% \href{https://tex.stackexchange.com/}{\TeX\ StackExchange} site.
+% I also acknowledge the \LaTeXe{} developers who inhabit the
+% \href{https://tex.stackexchange.com/}{\TeX{} StackExchange} site.
% Entering a new culture is daunting for anyone, especially for
-% newcomers; the \LaTeXe\ development culture is no exception. We all
-% share a passion for creating beautiful documents and I have learned
+% newcomers; the \LaTeXe{} development culture is no exception. We all
+% share a passion for creating beautiful documents and I learned
% much over the summers of 2020 and 2021 that improved my ability to
% do just that. There are too many of you to list individually, and I
% would surely accidentally omit some were I to try. Collectively, I
@@ -249,51 +236,53 @@
% \listoffigures
% \restoregeometry
%
-% \changes{v3.0.0}{2021-08-22}{\linktoplace{sec:mandipkg}{mandi} Initial release}
-% \changes{v3.0.0}{2021-08-22}{\linktoplace{sec:mandistudentpkg}{mandistudent} Initial release}
-% \changes{v3.0.0}{2021-08-22}{\linktoplace{sec:mandiexppkg}{mandiexp} Initial release}
-% \changes{v3.0.1}{2021-08-24}{\linktoplace{sec:mandipkg}{mandi} Minor doc changes}
-% \changes{v3.0.1}{2021-08-24}{\linktoplace{sec:mandistudentpkg}{mandistudent} Minor doc changes}
-% \changes{v3.0.1}{2021-08-24}{\linktoplace{sec:mandiexppkg}{mandiexp} Minor doc changes}
+% \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}
%
% \section{Introduction}
-%
% The \mandi \footnote{The bundle name can be pronounced either with two
% syllables, to rhyme with \emph{candy}, or with three syllables, as
% \emph{M and I}.} bundle consists of three packages: \mandi, \mandistudent,
-% and \mandiexp. Package \linktoplace{sec:mandipkg}{mandi} provides the
+% and \mandiexp. Package \linktoplace{sec:mandia}{mandi} provides the
% core functionality, namely correctly typesetting physical quantities
% and constants with their correct SI units as either scalars or vectors,
% depending on which is appropriate. Package
-% \linktoplace{sec:mandistudentpkg}{mandistudent} provides other typesetting
+% \linktoplace{sec:mandib}{mandistudent} provides other typesetting
% capability appropriate for written problem solutions. Finally, package
-% \linktoplace{sec:mandiexppkg}{mandiexp} provides commands for typesetting
+% \linktoplace{sec:mandic}{mandiexp} provides commands for typesetting
% expressions from \emph{Matter \& Interactions}\footnote{See
% \href{https://www.wiley.com/en-us/Matter+and+Interactions%2C+4th+Edition-p-9781118875865}
% {\emph{Matter \& Interactions}} and
% \url{https://matterandinteractions.org/} for details.}
%
-% \mandi\ has been completely rewritten from the ground up. It had gotten too
-% large and clumsy to use and maintain. It (unknowingly) used deprecated
-% packages. It had too many arcane ``features'' that were never used. It
-% did not support Unicode. It was not compatible with modern engines, like
-% \lualatex. It did not have a key-value interface. Options could not be
-% changed on the fly within a document. In short, it was a mess. I hope
-% this rewrite addresses all of the bad things and forms a better code base
-% for maintenance, useability, and future improvements.
-%
% 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,
-% expecially new users, will have a relatively recent TeX distribution
-% (like TeX Live) that includes a recently updated \LaTeXe\ kernel. If 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.
+%
+% \section{Getting Help}
+% If you have a question about \mandi, first please read this documentation to make
+% sure your question is not addressed here. Then if you wish, email me. As a user,
+% you deserve courteous and timely help if you need it. You will never get a
+% response from me saying that because this software is free you are not entitled
+% to help using it. It is sad that some developers take that attitude. Using free
+% software does not absolve the developer of helping users unless the license
+% specifically says so.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandipkg}{mandi} Added GitHub links to code}
+% {\linktoplace{sec:mandia}{mandi} Added GitHub links to code}
% \section{Code Availability}
-% The \mandi\ source repository's \texttt{main} branch is at
+% The \mandi{} source repository's \texttt{main} branch is at
% \url{https://github.com/heafnerj/mandi}. This code will usually coincide
% with that found on \href{https://ctan.org/pkg/mandi}{CTAN}. The very latest
% build can be found on the \texttt{dev} branch found at
@@ -301,9 +290,18 @@
% academic users should probably get the \texttt{dev} branch code since it is
% stable and may contain improvements over the \texttt{main} branch code.
%
+% \changes{v3.2.0}{2023-08-01}
+% {\linktoplace{sec:mandib}{mandistudent} Added statement about \textsc{beamer}
+% compatibility}
+% \section{Compatibility with Other Packages and Classes}
+% When using \textsc{beamer}, certain commands in the \mandistudent{} package
+% are not defined. Because \textsc{beamer} uses the \pkg{enumitem} package,
+% the \refEnv{physicsproblem} and \refEnv{physicsproblem*} environments are not
+% defined. The \refCom{hilite} command is also not defined because it does not
+% work and I do not currently know why.
+%
% \newpage
% \section{Student/Instructor Quick Guide}
-%
% Use \refCom{vec} to typeset the symbol for a vector. Use \refCom{magnitude}
% to typeset the symbol for a vector's magnitude. Use \refCom{dirvec} to
% typeset the symbol for a vector's direction. Use \refCom{changein} to
@@ -382,9 +380,9 @@
% typeset \href{https://\vpurl}{VPython} program files.
%
% \newpage
-% \section{The \mandi\ Package}\setplace{sec:mandipkg}
+% \section{The \mandi{} Package}\setplace{sec:mandia}
%
-% Load \mandi\ as you would any package in your preamble.
+% Load \mandi{} as you would any package in your preamble.
%
%\iffalse
%<*example>
@@ -403,7 +401,7 @@
Typesets the current version and build date.
\end{docCommand}
\begin{dispExample*}{sidebyside = false}
- The version is \mandiversion\ and is a stable build.
+ The version is \mandiversion{} and is a stable build.
\end{dispExample*}
%\iffalse
%</example>
@@ -430,7 +428,7 @@
doc description = {initially unspecified, set to \docValue{false}},%
},%
}%
- Now \mandi\ uses a key-value interface for options.
+ Now \mandi{} uses a key-value interface for options.
The \refKey{units} key can be set to \docValue{base}, \docValue{derived},
or \docValue{alternate}. The \refKey{preciseconstants} key is always
either \docValue{true} or \docValue{false}.
@@ -462,10 +460,10 @@
%</example>
%\fi
%
-% \subsection{\lualatex\ is Required}
+% \subsection{\lualatex{} is Required}
%
-% In order to make use of better fonts and Unicode features, \mandi\ now
-% requires the \lualatex\ engine for processing documents. It will not
+% In order to make use of better fonts and Unicode features, \mandi{} now
+% requires the \lualatex{} engine for processing documents. It will not
% work with other engines.
%
% \newpage
@@ -498,7 +496,7 @@
},%
}%
Command for momentum and its vector variants. The default units will depend
- on the options passed to \mandi\ at load time. Alternate units are the
+ on the options passed to \mandi{} at load time. Alternate units are the
default. Other units can be forced as demonstrated. The vector variants can
take more than three components. Note the other variants for the quantity's
value and units.
@@ -544,7 +542,7 @@
%\iffalse
%<*example>
%\fi
-\begin{docCommand}[doc updated = 2022-01-27]{checkquantity}{\marg{name}}
+\begin{docCommand}[doc updated = 2022-01-27]{CheckQuantity}{\marg{name}}
Command to check and typeset the command, base units,
derived units, and alternate units of a defined physical
quantity.
@@ -558,7 +556,7 @@
% Every other defined physical quantity can be treated similarly. Just replace
% |momentum| with the quantity's name. Obviously, the variants that begin with
% |\vector| will not be defined for scalar quantities. Here are all the
-% physical quantities, with all their units, defined in \mandi. Rememeber that
+% physical quantities, with all their units, defined in \mandi. Remember that
% units are not present with symbolic (algebraic) quantities, so do not use
% the |\vector| variants of these commands for symbolic components.
% Use \refCom{mivector} instead.
@@ -583,10 +581,10 @@
},%
}%
\end{docCommands}
-\checkquantity{acceleration}
+\CheckQuantity{acceleration}
\begin{docCommand}{amount}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{amount}
+\CheckQuantity{amount}
\begin{docCommands}
{%
{%
@@ -604,10 +602,10 @@
},%
}%
\end{docCommands}
-\checkquantity{angularacceleration}
+\CheckQuantity{angularacceleration}
\begin{docCommand}{angularfrequency}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{angularfrequency}
+\CheckQuantity{angularfrequency}
\begin{docCommands}
{%
{%
@@ -625,7 +623,7 @@
},%
}%
\end{docCommands}
-\checkquantity{angularimpulse}
+\CheckQuantity{angularimpulse}
\begin{docCommands}
{%
{%
@@ -643,7 +641,7 @@
},%
}%
\end{docCommands}
-\checkquantity{angularmomentum}
+\CheckQuantity{angularmomentum}
\begin{docCommands}
{%
{%
@@ -661,22 +659,22 @@
},%
}%
\end{docCommands}
-\checkquantity{angularvelocity}
+\CheckQuantity{angularvelocity}
\begin{docCommand}{area}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{area}
+\CheckQuantity{area}
\begin{docCommand}{areachargedensity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{areachargedensity}
+\CheckQuantity{areachargedensity}
\begin{docCommand}{areamassdensity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{areamassdensity}
+\CheckQuantity{areamassdensity}
\begin{docCommand}{capacitance}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{capacitance}
+\CheckQuantity{capacitance}
\begin{docCommand}{charge}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{charge}
+\CheckQuantity{charge}
\begin{docCommands}
{%
{%
@@ -694,19 +692,19 @@
},%
}%
\end{docCommands}
-\checkquantity{cmagneticfield}
+\CheckQuantity{cmagneticfield}
\begin{docCommand}{conductance}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{conductance}
+\CheckQuantity{conductance}
\begin{docCommand}{conductivity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{conductivity}
+\CheckQuantity{conductivity}
\begin{docCommand}{conventionalcurrent}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{conventionalcurrent}
+\CheckQuantity{conventionalcurrent}
\begin{docCommand}{current}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{current}
+\CheckQuantity{current}
\begin{docCommands}
{%
{%
@@ -724,10 +722,10 @@
},%
}%
\end{docCommands}
-\checkquantity{currentdensity}
+\CheckQuantity{currentdensity}
\begin{docCommand}{dielectricconstant}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{dielectricconstant}
+\CheckQuantity{dielectricconstant}
\begin{docCommands}
{%
{%
@@ -745,7 +743,7 @@
},%
}%
\end{docCommands}
-\checkquantity{direction}
+\CheckQuantity{direction}
\begin{docCommands}
{%
{%
@@ -763,10 +761,10 @@
},%
}%
\end{docCommands}
-\checkquantity{displacement}
+\CheckQuantity{displacement}
\begin{docCommand}{duration}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{duration}
+\CheckQuantity{duration}
\begin{docCommands}
{%
{%
@@ -783,7 +781,7 @@
},%
}%
\end{docCommands}
-\checkquantity{electricdipolemoment}
+\CheckQuantity{electricdipolemoment}
\begin{docCommands}
{%
{%
@@ -801,37 +799,37 @@
},%
}%
\end{docCommands}
-\checkquantity{electricfield}
+\CheckQuantity{electricfield}
\begin{docCommand}{electricflux}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{electricflux}
+\CheckQuantity{electricflux}
\begin{docCommand}{electricpotential}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{electricpotential}
+\CheckQuantity{electricpotential}
\begin{docCommand}[doc new = 2021-05-01]{electricpotentialdifference}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{electricpotentialdifference}
+\CheckQuantity{electricpotentialdifference}
\begin{docCommand}{electroncurrent}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{electroncurrent}
+\CheckQuantity{electroncurrent}
\begin{docCommand}{emf}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{emf}
+\CheckQuantity{emf}
\begin{docCommand}{energy}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{energy}
+\CheckQuantity{energy}
\begin{docCommand}[doc new = 2021-04-15]{energyinev}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{energyinev}
+\CheckQuantity{energyinev}
\begin{docCommand}[doc new = 2021-04-15]{energyinkev}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{energyinkev}
+\CheckQuantity{energyinkev}
\begin{docCommand}[doc new = 2021-04-15]{energyinmev}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{energyinmev}
+\CheckQuantity{energyinmev}
\begin{docCommand}{energydensity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{energydensity}
+\CheckQuantity{energydensity}
\begin{docCommands}
{%
{%
@@ -849,10 +847,10 @@
},%
}%
\end{docCommands}
-\checkquantity{energyflux}
+\CheckQuantity{energyflux}
\begin{docCommand}{entropy}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{entropy}
+\CheckQuantity{entropy}
\begin{docCommands}
{%
{%
@@ -870,10 +868,10 @@
},%
}%
\end{docCommands}
-\checkquantity{force}
+\CheckQuantity{force}
\begin{docCommand}{frequency}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{frequency}
+\CheckQuantity{frequency}
\begin{docCommands}
{%
{%
@@ -891,13 +889,13 @@
},%
}%
\end{docCommands}
-\checkquantity{gravitationalfield}
+\CheckQuantity{gravitationalfield}
\begin{docCommand}{gravitationalpotential}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{gravitationalpotential}
+\CheckQuantity{gravitationalpotential}
\begin{docCommand}[doc new = 2021-05-01]{gravitationalpotentialdifference}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{gravitationalpotentialdifference}
+\CheckQuantity{gravitationalpotentialdifference}
\begin{docCommands}
{%
{%
@@ -915,28 +913,28 @@
},%
}%
\end{docCommands}
-\checkquantity{impulse}
+\CheckQuantity{impulse}
\begin{docCommand}{indexofrefraction}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{indexofrefraction}
+\CheckQuantity{indexofrefraction}
\begin{docCommand}{inductance}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{inductance}
+\CheckQuantity{inductance}
\begin{docCommand}{linearchargedensity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{linearchargedensity}
+\CheckQuantity{linearchargedensity}
\begin{docCommand}{linearmassdensity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{linearmassdensity}
+\CheckQuantity{linearmassdensity}
\begin{docCommand}[doc new = 2022-01-27]{lorentzfactor}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{lorentzfactor}
+\CheckQuantity{lorentzfactor}
\begin{docCommand}[doc updated = 2021-05-02]{luminousintensity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{luminousintensity}
+\CheckQuantity{luminousintensity}
\begin{docCommand}{magneticcharge}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{magneticcharge}
+\CheckQuantity{magneticcharge}
\begin{docCommands}
{%
{%
@@ -954,7 +952,7 @@
},%
}%
\end{docCommands}
-\checkquantity{magneticdipolemoment}
+\CheckQuantity{magneticdipolemoment}
\begin{docCommands}
{%
{%
@@ -972,19 +970,19 @@
},%
}%
\end{docCommands}
-\checkquantity{magneticfield}
+\CheckQuantity{magneticfield}
\begin{docCommand}{magneticflux}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{magneticflux}
+\CheckQuantity{magneticflux}
\begin{docCommand}{mass}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{mass}
+\CheckQuantity{mass}
\begin{docCommand}{mobility}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{mobility}
+\CheckQuantity{mobility}
\begin{docCommand}{momentofinertia}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{momentofinertia}
+\CheckQuantity{momentofinertia}
\begin{docCommands}
{%
{%
@@ -1004,7 +1002,7 @@
doc parameter = \marg{\( c_1,\dots,c_n \)} },%
}%
\end{docCommands}
-\checkquantity{momentum}
+\CheckQuantity{momentum}
\begin{docCommands}
{%
{%
@@ -1022,25 +1020,25 @@
},%
}%
\end{docCommands}
-\checkquantity{momentumflux}
+\CheckQuantity{momentumflux}
\begin{docCommand}{numberdensity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{numberdensity}
+\CheckQuantity{numberdensity}
\begin{docCommand}{permeability}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{permeability}
+\CheckQuantity{permeability}
\begin{docCommand}{permittivity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{permittivity}
+\CheckQuantity{permittivity}
\begin{docCommand}{planeangle}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{planeangle}
+\CheckQuantity{planeangle}
\begin{docCommand}{polarizability}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{polarizability}
+\CheckQuantity{polarizability}
\begin{docCommand}{power}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{power}
+\CheckQuantity{power}
\begin{docCommands}
{%
{%
@@ -1058,43 +1056,43 @@
},%
}%
\end{docCommands}
-\checkquantity{poynting}
+\CheckQuantity{poynting}
\begin{docCommand}{pressure}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{pressure}
+\CheckQuantity{pressure}
\begin{docCommand}{relativepermeability}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{relativepermeability}
+\CheckQuantity{relativepermeability}
\begin{docCommand}{relativepermittivity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{relativepermittivity}
+\CheckQuantity{relativepermittivity}
\begin{docCommand}{resistance}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{resistance}
+\CheckQuantity{resistance}
\begin{docCommand}{resistivity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{resistivity}
+\CheckQuantity{resistivity}
\begin{docCommand}{solidangle}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{solidangle}
+\CheckQuantity{solidangle}
\begin{docCommand}{specificheatcapacity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{specificheatcapacity}
+\CheckQuantity{specificheatcapacity}
\begin{docCommand}{springstiffness}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{springstiffness}
+\CheckQuantity{springstiffness}
\begin{docCommand}{springstretch}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{springstretch}
+\CheckQuantity{springstretch}
\begin{docCommand}{stress}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{stress}
+\CheckQuantity{stress}
\begin{docCommand}{strain}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{strain}
+\CheckQuantity{strain}
\begin{docCommand}{temperature}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{temperature}
+\CheckQuantity{temperature}
\begin{docCommands}
{%
{%
@@ -1112,7 +1110,7 @@
},%
}%
\end{docCommands}
-\checkquantity{torque}
+\CheckQuantity{torque}
\begin{docCommands}
{%
{%
@@ -1130,7 +1128,7 @@
},%
}%
\end{docCommands}
-\checkquantity{velocity}
+\CheckQuantity{velocity}
\begin{docCommands}
{%
{%
@@ -1148,19 +1146,19 @@
},%
}%
\end{docCommands}
-\checkquantity{velocityc}
+\CheckQuantity{velocityc}
\begin{docCommand}{volume}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{volume}
+\CheckQuantity{volume}
\begin{docCommand}{volumechargedensity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{volumechargedensity}
+\CheckQuantity{volumechargedensity}
\begin{docCommand}{volumemassdensity}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{volumemassdensity}
+\CheckQuantity{volumemassdensity}
\begin{docCommand}{wavelength}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{wavelength}
+\CheckQuantity{wavelength}
\begin{docCommands}
{%
{%
@@ -1178,13 +1176,13 @@
},%
}%
\end{docCommands}
-\checkquantity{wavenumber}
+\CheckQuantity{wavenumber}
\begin{docCommand}{work}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{work}
+\CheckQuantity{work}
\begin{docCommand}{youngsmodulus}{\marg{magnitude}}
\end{docCommand}
-\checkquantity{youngsmodulus}
+\CheckQuantity{youngsmodulus}
%\iffalse
%</example>
%\fi
@@ -1200,18 +1198,18 @@
{%
{%
doc new = 2021-02-16,%
- doc name = newscalarquantity,%
+ doc name = NewScalarQuantity,%
},%
{%
doc new = 2021-02-21,%
- doc name = renewscalarquantity,%
+ doc name = RenewScalarQuantity,%
},%
}%
Command to (re)define a new/existing scalar quantity.
If the derived or alternate units are omitted, they are
defined to be the same as the base units. Do not use both
this command and
- \refCom{newvectorquantity} or \refCom{renewvectorquantity}
+ \refCom{NewVectorQuantity} or \refCom{RenewVectorQuantity}
to (re)define a quantity.
\end{docCommands}
%\iffalse
@@ -1227,18 +1225,18 @@
{%
{%
doc new = 2021-02-16,%
- doc name = newvectorquantity,%
+ doc name = NewVectorQuantity,%
},%
{%
doc new = 2021-02-21,%
- doc name = renewvectorquantity,%
+ doc name = RenewVectorQuantity,%
},%
}%
Command to (re)define a new/existing vector quantity.
If the derived or alternate units are omitted, they are
defined to be the same as the base units. Do not use both
this command and
- \refCom{newscalarquantity} or \refCom{renewscalarquantity}
+ \refCom{NewScalarQuantity} or \refCom{RenewScalarQuantity}
to (re)define a quantity.
\end{docCommands}
%\iffalse
@@ -1247,7 +1245,7 @@
%
% \subsubsection{Changing Units}\setplace{ssec:chgunits}
%
-% Units are set when \mandi\ is loaded, but the default setting
+% Units are set when \mandi{} is loaded, but the default setting
% can be easily overridden in four ways: command variants that
% are defined when a \linktoplace{ssec:physquants}{physical quantity}
% or \linktoplace{ssec:physconsts}{physical constant} is
@@ -1276,7 +1274,7 @@
},%
}%
Modal commands (switches) for setting the default unit form for the entire
- document. When \mandi\ is loaded, one of these three commands is executed
+ document. When \mandi{} is loaded, one of these three commands is executed
depending on whether the optional |units| key is provided. See the section
on loading the package for details. Alternate units are the default because
they are the most likely ones to be seen in introductory physics textbooks.
@@ -1300,7 +1298,7 @@
doc name = hereusederivedunits,%
},%
{%
- doc name = hereusedalternateunits,%
+ doc name = hereusealternateunits,%
},%
}%
Commands for setting the unit form on the fly for a single instance. The
@@ -1379,7 +1377,7 @@
%\fi
\begin{docCommand}[doc label = oofpezdemo]{oofpez}{}
Command for the Coulomb constant. The constant's numerical precision and
- default units will depend on the options passed to \mandi\ at load time.
+ default units will depend on the options passed to \mandi{} at load time.
Alternate units and approximate numerical values are the defaults. Other
units can be forced as demonstrated.
\end{docCommand}
@@ -1404,7 +1402,7 @@
%\iffalse
%<*example>
%\fi
-\begin{docCommand}[doc updated = 2022-01-27]{checkconstant}{\marg{name}}
+\begin{docCommand}[doc updated = 2022-01-27]{CheckConstant}{\marg{name}}
Command to check and typeset the constant's name, mathematical symbol,
approximate value, precise value, base units, derived units, and
alternate units.
@@ -1429,115 +1427,115 @@
%\fi
\begin{docCommand}[doc description = exact]{avogadro}{}
\end{docCommand}
-\checkconstant{avogadro}
+\CheckConstant{avogadro}
\begin{docCommand}[doc new = 2021-02-02]{biotsavartconstant}{}
\end{docCommand}
-\checkconstant{biotsavartconstant}
+\CheckConstant{biotsavartconstant}
\begin{docCommand}{bohrradius}{}
\end{docCommand}
-\checkconstant{bohrradius}
+\CheckConstant{bohrradius}
\begin{docCommand}[doc description = exact]{boltzmann}{}
\end{docCommand}
-\checkconstant{boltzmann}
+\CheckConstant{boltzmann}
\begin{docCommand}[doc new = 2021-02-02]{coulombconstant}{}
\end{docCommand}
-\checkconstant{coulombconstant}
+\CheckConstant{coulombconstant}
\begin{docCommand}{earthmass}{}
\end{docCommand}
-\checkconstant{earthmass}
+\CheckConstant{earthmass}
\begin{docCommand}{earthmoondistance}{}
\end{docCommand}
-\checkconstant{earthmoondistance}
+\CheckConstant{earthmoondistance}
\begin{docCommand}{earthradius}{}
\end{docCommand}
-\checkconstant{earthradius}
+\CheckConstant{earthradius}
\begin{docCommand}{earthsundistance}{}
\end{docCommand}
-\checkconstant{earthsundistance}
+\CheckConstant{earthsundistance}
\begin{docCommand}{electroncharge}{}
\end{docCommand}
-\checkconstant{electroncharge}
+\CheckConstant{electroncharge}
\begin{docCommand}{electronCharge}{}
\end{docCommand}
-\checkconstant{electronCharge}
+\CheckConstant{electronCharge}
\begin{docCommand}{electronmass}{}
\end{docCommand}
-\checkconstant{electronmass}
+\CheckConstant{electronmass}
\begin{docCommand}[doc description = exact]{elementarycharge}{}
\end{docCommand}
-\checkconstant{elementarycharge}
+\CheckConstant{elementarycharge}
\begin{docCommand}{finestructure}{}
\end{docCommand}
-\checkconstant{finestructure}
+\CheckConstant{finestructure}
\begin{docCommand}{hydrogenmass}{}
\end{docCommand}
-\checkconstant{hydrogenmass}
+\CheckConstant{hydrogenmass}
\begin{docCommand}{moonearthdistance}{}
\end{docCommand}
-\checkconstant{moonearthdistance}
+\CheckConstant{moonearthdistance}
\begin{docCommand}{moonmass}{}
\end{docCommand}
-\checkconstant{moonmass}
+\CheckConstant{moonmass}
\begin{docCommand}{moonradius}{}
\end{docCommand}
-\checkconstant{moonradius}
+\CheckConstant{moonradius}
\begin{docCommand}{mzofp}{}
\end{docCommand}
-\checkconstant{mzofp}
+\CheckConstant{mzofp}
\begin{docCommand}{neutronmass}{}
\end{docCommand}
-\checkconstant{neutronmass}
+\CheckConstant{neutronmass}
\begin{docCommand}{oofpez}{}
\end{docCommand}
-\checkconstant{oofpez}
+\CheckConstant{oofpez}
\begin{docCommand}{oofpezcs}{}
\end{docCommand}
-\checkconstant{oofpezcs}
+\CheckConstant{oofpezcs}
\begin{docCommand}[doc description = exact]{planck}{}
\end{docCommand}
-\checkconstant{planck}
+\CheckConstant{planck}
\begin{docCommand}{planckbar}{}
\end{docCommand}
-\checkconstant{planckbar}
+\CheckConstant{planckbar}
\begin{docCommand}{planckc}{}
\end{docCommand}
-\checkconstant{planckc}
+\CheckConstant{planckc}
\begin{docCommand}{protoncharge}{}
\end{docCommand}
-\checkconstant{protoncharge}
+\CheckConstant{protoncharge}
\begin{docCommand}{protonCharge}{}
\end{docCommand}
-\checkconstant{protonCharge}
+\CheckConstant{protonCharge}
\begin{docCommand}{protonmass}{}
\end{docCommand}
-\checkconstant{protonmass}
+\CheckConstant{protonmass}
\begin{docCommand}{rydberg}{}
\end{docCommand}
-\checkconstant{rydberg}
+\CheckConstant{rydberg}
\begin{docCommand}[doc description = exact]{speedoflight}{}
\end{docCommand}
-\checkconstant{speedoflight}
+\CheckConstant{speedoflight}
\begin{docCommand}{stefanboltzmann}{}
\end{docCommand}
-\checkconstant{stefanboltzmann}
+\CheckConstant{stefanboltzmann}
\begin{docCommand}{sunearthdistance}{}
\end{docCommand}
-\checkconstant{sunearthdistance}
+\CheckConstant{sunearthdistance}
\begin{docCommand}{sunradius}{}
\end{docCommand}
-\checkconstant{sunradius}
+\CheckConstant{sunradius}
\begin{docCommand}{surfacegravfield}{}
\end{docCommand}
-\checkconstant{surfacegravfield}
+\CheckConstant{surfacegravfield}
\begin{docCommand}{universalgrav}{}
\end{docCommand}
-\checkconstant{universalgrav}
+\CheckConstant{universalgrav}
\begin{docCommand}{vacuumpermeability}{}
\end{docCommand}
-\checkconstant{vacuumpermeability}
+\CheckConstant{vacuumpermeability}
\begin{docCommand}{vacuumpermittivity}{}
\end{docCommand}
-\checkconstant{vacuumpermittivity}
+\CheckConstant{vacuumpermittivity}
%\iffalse
%</example>
%\fi
@@ -1556,11 +1554,11 @@
{%
{%
doc new = 2021-02-16,%
- doc name = newphysicalconstant,%
+ doc name = NewPhysicalConstant,%
},%
{%
doc new = 2021-02-21,%
- doc name = renewphysicalconstant,%
+ doc name = RenewPhysicalConstant,%
},%
}%
Command to define/redefine a new/existing physical constant.
@@ -1682,7 +1680,8 @@
},%
{%
doc parameter = \marg{magnitude}\marg{unit},%
- doc name = unit,%
+ doc updated = 2023-08-01,%
+ doc name = units,%
},%
{%
doc name = emptyunit,%
@@ -1829,7 +1828,7 @@
\begin{dispExample}
\( \per \) \\
\( \usk \) \\
- \( \unit{3}{\meter\per\second} \) \\
+ \( \units{3}{\meter\per\second} \) \\
\( \emptyunit \) \\
\( \ampere \) \\
\( \atomicmassunit \) \\
@@ -1939,26 +1938,26 @@
%</example>
%\fi
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \newgeometry{left=0.50in,right=0.50in,top=1.00in,bottom=1.00in}
-% \subsection{\mandi\ Source Code}
+% \subsection{\mandi{} Source Code}
%
% \iffalse
%<*package>
% \fi
-% Definine the package version and date for global use, exploiting the fact
+% Define the package version and date for global use, exploiting the fact
% that in a \pkg{.sty} file there is now no need for |\makeatletter| and
% |\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:mandipkg}{mandi} Code formatted for better readability}
+% {\linktoplace{sec:mandia}{mandi} Code formatted for better readability}
% \begin{macrocode}
-\def\mandi@version{3.1.0}
-\def\mandi@date{2022-01-27}
+\def\mandi@version{3.2.0}
+\def\mandi@date{2023-08-01}
\NeedsTeXFormat{LaTeX2e}[2020-02-02]
-\DeclareRelease{v3.1.0}{2022-01-27}{mandi.sty}
+\DeclareRelease{v3.2.0}{2023-08-01}{mandi.sty}
\DeclareCurrentRelease{v\mandi@version}{\mandi@date}
\ProvidesPackage{mandi}
[\mandi@date\space v\mandi@version\space Macros for physical quantities]
@@ -1972,44 +1971,83 @@
%
% Load third party packages, documenting why each one is needed.
%
+% We need \pkg{pgfopts} for a key-value interface.
+%
+% \begin{macrocode}
+\RequirePackage{pgfopts}
+% \end{macrocode}
+%
+% We need \pkg{array} for |\chkquantity| and |\chkconstant|.
+%
+% \begin{macrocode}
+\RequirePackage{array}
+% \end{macrocode}
+%
+% We need \pkg{iftex} so we can require \lualatex.
+%
% \begin{macrocode}
-\RequirePackage{pgfopts} % needed for key-value interface
-\RequirePackage{array} % needed for \checkquantity and \checkconstant
-\RequirePackage{iftex} % needed for requiring LuaLaTeX
-\RequirePackage{unicode-math} % needed for Unicode support
+\RequirePackage{iftex}
% \end{macrocode}
%
+% We need \pkg{mathtools} for intelligent delimiters.
+%
+% \begin{macrocode}
+\RequirePackage{mathtools}
+% \end{macrocode}
+%
+% We need \pkg{unicode-math} for Unicode support and changing fonts.
+%
+% \begin{macrocode}
+\RequirePackage{unicode-math}
+% \end{macrocode}
+%
+% Suppress some annoying warnings.
+%
+% \begin{macrocode}
+\unimathsetup{warnings-off={mathtools-colon,mathtools-overbracket}}
+% \end{macrocode}
+%
+% Load \pkg{xparse} if necessary.
+%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandipkg}{mandi} \pkg{xparse} is loaded for older formats}
+% {\linktoplace{sec:mandia}{mandi} \pkg{xparse} is loaded for older formats}
% \begin{macrocode}
-\IfFormatAtLeastTF {2020-10-01} % load xparse if necessary
+\IfFormatAtLeastTF{2020-10-01}
{}%
{\RequirePackage{xparse}}%
-\RequireLuaTeX % require this engine
+% \end{macrocode}
+%
+% We require the \lualatex{} engine.
+%
+% \begin{macrocode}
+\RequireLuaTeX
% \end{macrocode}
%
% Parts of the unit engine have been rewritten with
% \href{https://www.ctan.org/pkg/xparse}{\pkg{xparse}} for both clarity
-% and power. Note that \pkg{xparse} is now part of the \LaTeXe\ kernel.
-% Other parts have been rewriten in
+% and power. Note that \pkg{xparse} is now part of the \LaTeXe{} kernel.
+% Other parts have been rewritten in
% \href{https://www.ctan.org/pkg/expl}{\pkg{expl}} with a look to the
% future.
%
-% Generic internal selectors.
+% Define some generic internal selectors.
%
% \begin{macrocode}
\newcommand*{\mandi@selectunits}{}
\newcommand*{\mandi@selectprecision}{}
% \end{macrocode}
%
-% Specific internal selectors.
+% Define some specific internal selectors. The first two are really just
+% workalikes for |\@firstoftwo| and |\@secondoftwo|. The third, fourth,
+% and fifth are |\@firstofthree|, |\@secondofthree|, and |\@thirdofthree|
+% and apparently do not yet exist.
%
% \begin{macrocode}
-\newcommand*{\mandi@selectapproximate}[2]{#1} % really \@firstoftwo
-\newcommand*{\mandi@selectprecise}[2]{#2} % really \@secondoftwo
-\newcommand*{\mandi@selectbaseunits}[3]{#1} % really \@firstofthree
-\newcommand*{\mandi@selectderivedunits}[3]{#2} % really \@secondofthree
-\newcommand*{\mandi@selectalternateunits}[3]{#3} % really \@thirdofthree
+\newcommand*{\mandi@selectapproximate}[2]{#1}
+\newcommand*{\mandi@selectprecise}[2]{#2}
+\newcommand*{\mandi@selectbaseunits}[3]{#1}
+\newcommand*{\mandi@selectderivedunits}[3]{#2}
+\newcommand*{\mandi@selectalternateunits}[3]{#3}
% \end{macrocode}
%
% Document level global switches.
@@ -2047,7 +2085,7 @@
\NewDocumentEnvironment{usepreciseconstants}{}{\alwaysusepreciseconstants}{}%
% \end{macrocode}
%
-% \mandi\ now has a key-value interface, implemented with
+% \mandi{} now has a key-value interface, implemented with
% \href{https://www.ctan.org/pkg/pgfopts}{\pkg{pgfopts}} and
% \href{https://www.ctan.org/pkg/pgfkeys}{\pkg{pgfkeys}}.
% There are two options:\newline
@@ -2061,7 +2099,7 @@
% by the unit engine.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandipkg}{mandi} Unknown package options handled safely}
+% {\linktoplace{sec:mandia}{mandi} Unknown package options handled safely}
% \begin{macrocode}
\newif\ifusingpreciseconstants
\pgfkeys{%
@@ -2119,7 +2157,8 @@
% \end{macrocode}
%
% Define a setup command that overrides the loadtime options
-% when called with new options. A new banner is written to the console.
+% when called with new options. A new banner is written to
+% the console.
%
% \begin{macrocode}
\NewDocumentCommand{\mandisetup}{ m }%
@@ -2141,11 +2180,22 @@
% We make use of |\symup{...}| from the \pkg{unicode-math} package.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandipkg}{mandi} Added a negative space to \refCom{lightspeed}}
+% {\linktoplace{sec:mandia}{mandi} Added a negative space to \refCom{lightspeed}}
+% \changes{v3.2.0}{2023-08-01}
+% {\linktoplace{sec:mandia}{mandi} Changed \cs{unit} to \cs{units}}
% \begin{macrocode}
\NewDocumentCommand{\per}{}{/}
\NewDocumentCommand{\usk}{}{\cdot}
-\NewDocumentCommand{\unit}{ m m }{{#1}{\,#2}}
+\NewDocumentCommand{\units}{ m m }%
+{%
+ \IfValueTF{#2}
+ {%
+ {#1}{\,#2}
+ }%
+ {%
+ {#1}{}
+ }%
+}%
\NewDocumentCommand{\ampere}{}{\symup{A}}
\NewDocumentCommand{\atomicmassunit}{}{\symup{u}}
\NewDocumentCommand{\candela}{}{\symup{cd}}
@@ -2178,13 +2228,13 @@
\NewDocumentCommand{\volt}{}{\symup{V}}
\NewDocumentCommand{\watt}{}{\symup{W}}
\NewDocumentCommand{\weber}{}{\symup{Wb}}
-\NewDocumentCommand{\tothetwo}{}{^2} % postfix 2
-\NewDocumentCommand{\tothethree}{}{^3} % postfix 3
-\NewDocumentCommand{\tothefour}{}{^4} % postfix 4
-\NewDocumentCommand{\inverse}{}{^{-1}} % postfix -1
-\NewDocumentCommand{\totheinversetwo}{}{^{-2}} % postfix -2
-\NewDocumentCommand{\totheinversethree}{}{^{-3}} % postfix -3
-\NewDocumentCommand{\totheinversefour}{}{^{-4}} % postfix -4
+\NewDocumentCommand{\tothetwo}{}{^{2}}
+\NewDocumentCommand{\tothethree}{}{^{3}}
+\NewDocumentCommand{\tothefour}{}{^{4}}
+\NewDocumentCommand{\inverse}{}{^{-1}}
+\NewDocumentCommand{\totheinversetwo}{}{^{-2}}
+\NewDocumentCommand{\totheinversethree}{}{^{-3}}
+\NewDocumentCommand{\totheinversefour}{}{^{-4}}
\NewDocumentCommand{\emptyunit}{}{\mdlgwhtsquare}
\NewDocumentCommand{\tento}{ m }{10^{#1}}
\NewDocumentCommand{\timestento}{ m }{\times\tento{#1}}
@@ -2192,21 +2242,21 @@
% \end{macrocode}
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandipkg}{mandi} \LaTeX3 code now conforms to formatting standards}
+% {\linktoplace{sec:mandia}{mandi} \LaTeX3 code now conforms to formatting standards}
% \begin{macrocode}
\ExplSyntaxOn
\cs_new:Npn \__mandi_newscalarquantity:nnnn #1#2#3#4
{
- \cs_new:cpn {#1} ##1 {\unit{##1}{\mandi@selectunits{#2}{#3}{#4}}}
+ \cs_new:cpn {#1} ##1 {\units{##1}{\mandi@selectunits{#2}{#3}{#4}}}
\cs_new:cpn {#1value} ##1 {##1}
- \cs_new:cpn {#1baseunits} ##1 {\unit{##1}{\mandi@selectbaseunits{#2}{#3}{#4}}}
- \cs_new:cpn {#1derivedunits} ##1 {\unit{##1}{\mandi@selectderivedunits{#2}{#3}{#4}}}
- \cs_new:cpn {#1alternateunits} ##1 {\unit{##1}{\mandi@selectalternateunits{#2}{#3}{#4}}}
+ \cs_new:cpn {#1baseunits} ##1 {\units{##1}{\mandi@selectbaseunits{#2}{#3}{#4}}}
+ \cs_new:cpn {#1derivedunits} ##1 {\units{##1}{\mandi@selectderivedunits{#2}{#3}{#4}}}
+ \cs_new:cpn {#1alternateunits} ##1 {\units{##1}{\mandi@selectalternateunits{#2}{#3}{#4}}}
\cs_new:cpn {#1onlybaseunits} {\mandi@selectbaseunits{#2}{#3}{#4}}
\cs_new:cpn {#1onlyderivedunits} {\mandi@selectderivedunits{#2}{#3}{#4}}
\cs_new:cpn {#1onlyalternateunits} {\mandi@selectalternateunits{#2}{#3}{#4}}
}
-\NewDocumentCommand{\newscalarquantity}{ m m O{#2} O{#2} }
+\NewDocumentCommand{\NewScalarQuantity}{ m m O{#2} O{#2} }
{
\__mandi_newscalarquantity:nnnn { #1 }{ #2 }{ #3 }{ #4 }
}
@@ -2219,16 +2269,16 @@
\ExplSyntaxOn
\cs_new:Npn \__mandi_renewscalarquantity:nnnn #1#2#3#4
{
- \cs_set:cpn {#1} ##1 {\unit{##1}{\mandi@selectunits{#2}{#3}{#4}}}
+ \cs_set:cpn {#1} ##1 {\units{##1}{\mandi@selectunits{#2}{#3}{#4}}}
\cs_set:cpn {#1value} ##1 {##1}
- \cs_set:cpn {#1baseunits} ##1 {\unit{##1}{\mandi@selectbaseunits{#2}{#3}{#4}}}
- \cs_set:cpn {#1derivedunits} ##1 {\unit{##1}{\mandi@selectderivedunits{#2}{#3}{#4}}}
- \cs_set:cpn {#1alternateunits} ##1 {\unit{##1}{\mandi@selectalternateunits{#2}{#3}{#4}}}
+ \cs_set:cpn {#1baseunits} ##1 {\units{##1}{\mandi@selectbaseunits{#2}{#3}{#4}}}
+ \cs_set:cpn {#1derivedunits} ##1 {\units{##1}{\mandi@selectderivedunits{#2}{#3}{#4}}}
+ \cs_set:cpn {#1alternateunits} ##1 {\units{##1}{\mandi@selectalternateunits{#2}{#3}{#4}}}
\cs_set:cpn {#1onlybaseunits} {\mandi@selectbaseunits{#2}{#3}{#4}}
\cs_set:cpn {#1onlyderivedunits} {\mandi@selectderivedunits{#2}{#3}{#4}}
\cs_set:cpn {#1onlyalternateunits} {\mandi@selectalternateunits{#2}{#3}{#4}}
}
-\NewDocumentCommand{\renewscalarquantity}{ m m O{#2} O{#2} }
+\NewDocumentCommand{\RenewScalarQuantity}{ m m O{#2} O{#2} }
{
\__mandi_renewscalarquantity:nnnn { #1 }{ #2 }{ #3 }{ #4 }
}
@@ -2242,16 +2292,16 @@
\cs_new:Npn \__mandi_newvectorquantity:nnnn #1#2#3#4
{
\__mandi_newscalarquantity:nnnn { #1 }{ #2 }{ #3 }{ #4 }
- \cs_new:cpn {vector#1} ##1 {\unit{\mivector{##1}}{\mandi@selectunits{#2}{#3}{#4}}}
- \cs_new:cpn {#1vector} ##1 {\unit{\mivector{##1}}{\mandi@selectunits{#2}{#3}{#4}}}
+ \cs_new:cpn {vector#1} ##1 {\units{\mivector{##1}}{\mandi@selectunits{#2}{#3}{#4}}}
+ \cs_new:cpn {#1vector} ##1 {\units{\mivector{##1}}{\mandi@selectunits{#2}{#3}{#4}}}
\cs_new:cpn {vector#1value} ##1 {\mivector{##1}}
\cs_new:cpn {#1vectorvalue} ##1 {\mivector{##1}}
- \cs_new:cpn {vector#1baseunits} ##1 {\unit{\mivector{##1}}{\mandi@selectbaseunits{#2}{#3}{#4}}}
- \cs_new:cpn {#1vectorbaseunits} ##1 {\unit{\mivector{##1}}{\mandi@selectbaseunits{#2}{#3}{#4}}}
- \cs_new:cpn {vector#1derivedunits} ##1 {\unit{\mivector{##1}}{\mandi@selectderivedunits{#2}{#3}{#4}}}
- \cs_new:cpn {#1vectorderivedunits} ##1 {\unit{\mivector{##1}}{\mandi@selectderivedunits{#2}{#3}{#4}}}
- \cs_new:cpn {vector#1alternateunits} ##1 {\unit{\mivector{##1}}{\mandi@selectalternateunits{#2}{#3}{#4}}}
- \cs_new:cpn {#1vectoralternateunits} ##1 {\unit{\mivector{##1}}{\mandi@selectalternateunits{#2}{#3}{#4}}}
+ \cs_new:cpn {vector#1baseunits} ##1 {\units{\mivector{##1}}{\mandi@selectbaseunits{#2}{#3}{#4}}}
+ \cs_new:cpn {#1vectorbaseunits} ##1 {\units{\mivector{##1}}{\mandi@selectbaseunits{#2}{#3}{#4}}}
+ \cs_new:cpn {vector#1derivedunits} ##1 {\units{\mivector{##1}}{\mandi@selectderivedunits{#2}{#3}{#4}}}
+ \cs_new:cpn {#1vectorderivedunits} ##1 {\units{\mivector{##1}}{\mandi@selectderivedunits{#2}{#3}{#4}}}
+ \cs_new:cpn {vector#1alternateunits} ##1 {\units{\mivector{##1}}{\mandi@selectalternateunits{#2}{#3}{#4}}}
+ \cs_new:cpn {#1vectoralternateunits} ##1 {\units{\mivector{##1}}{\mandi@selectalternateunits{#2}{#3}{#4}}}
\cs_new:cpn {vector#1onlybaseunits} {\mandi@selectbaseunits{#2}{#3}{#4}}
\cs_new:cpn {#1vectoronlybaseunits} {\mandi@selectbaseunits{#2}{#3}{#4}}
\cs_new:cpn {vector#1onlyderivedunits} {\mandi@selectderivedunits{#2}{#3}{#4}}
@@ -2259,7 +2309,7 @@
\cs_new:cpn {vector#1onlyalternateunits} {\mandi@selectalternateunits{#2}{#3}{#4}}
\cs_new:cpn {#1vectoronlyalternateunits} {\mandi@selectalternateunits{#2}{#3}{#4}}
}
-\NewDocumentCommand{\newvectorquantity}{ m m O{#2} O{#2} }
+\NewDocumentCommand{\NewVectorQuantity}{ m m O{#2} O{#2} }
{
\__mandi_newvectorquantity:nnnn { #1 }{ #2 }{ #3 }{ #4 }
}
@@ -2273,16 +2323,16 @@
\cs_new:Npn \__mandi_renewvectorquantity:nnnn #1#2#3#4
{
\__mandi_renewscalarquantity:nnnn { #1 }{ #2 }{ #3 }{ #4 }
- \cs_set:cpn {vector#1} ##1 {\unit{\mivector{##1}}{\mandi@selectunits{#2}{#3}{#4}}}
- \cs_set:cpn {#1vector} ##1 {\unit{\mivector{##1}}{\mandi@selectunits{#2}{#3}{#4}}}
+ \cs_set:cpn {vector#1} ##1 {\units{\mivector{##1}}{\mandi@selectunits{#2}{#3}{#4}}}
+ \cs_set:cpn {#1vector} ##1 {\units{\mivector{##1}}{\mandi@selectunits{#2}{#3}{#4}}}
\cs_set:cpn {vector#1value} ##1 {\mivector{##1}}
\cs_set:cpn {#1vectorvalue} ##1 {\mivector{##1}}
- \cs_set:cpn {vector#1baseunits} ##1 {\unit{\mivector{##1}}{\mandi@selectbaseunits{#2}{#3}{#4}}}
- \cs_set:cpn {#1vectorbaseunits} ##1 {\unit{\mivector{##1}}{\mandi@selectbaseunits{#2}{#3}{#4}}}
- \cs_set:cpn {vector#1derivedunits} ##1 {\unit{\mivector{##1}}{\mandi@selectderivedunits{#2}{#3}{#4}}}
- \cs_set:cpn {#1vectorderivedunits} ##1 {\unit{\mivector{##1}}{\mandi@selectderivedunits{#2}{#3}{#4}}}
- \cs_set:cpn {vector#1alternateunits} ##1 {\unit{\mivector{##1}}{\mandi@selectalternateunits{#2}{#3}{#4}}}
- \cs_set:cpn {#1vectoralternateunits} ##1 {\unit{\mivector{##1}}{\mandi@selectalternateunits{#2}{#3}{#4}}}
+ \cs_set:cpn {vector#1baseunits} ##1 {\units{\mivector{##1}}{\mandi@selectbaseunits{#2}{#3}{#4}}}
+ \cs_set:cpn {#1vectorbaseunits} ##1 {\units{\mivector{##1}}{\mandi@selectbaseunits{#2}{#3}{#4}}}
+ \cs_set:cpn {vector#1derivedunits} ##1 {\units{\mivector{##1}}{\mandi@selectderivedunits{#2}{#3}{#4}}}
+ \cs_set:cpn {#1vectorderivedunits} ##1 {\units{\mivector{##1}}{\mandi@selectderivedunits{#2}{#3}{#4}}}
+ \cs_set:cpn {vector#1alternateunits} ##1 {\units{\mivector{##1}}{\mandi@selectalternateunits{#2}{#3}{#4}}}
+ \cs_set:cpn {#1vectoralternateunits} ##1 {\units{\mivector{##1}}{\mandi@selectalternateunits{#2}{#3}{#4}}}
\cs_set:cpn {vector#1onlybaseunits} {\mandi@selectbaseunits{#2}{#3}{#4}}
\cs_set:cpn {#1vectoronlybaseunits} {\mandi@selectbaseunits{#2}{#3}{#4}}
\cs_set:cpn {vector#1onlyderivedunits} {\mandi@selectderivedunits{#2}{#3}{#4}}
@@ -2290,7 +2340,7 @@
\cs_set:cpn {vector#1onlyalternateunits} {\mandi@selectalternateunits{#2}{#3}{#4}}
\cs_set:cpn {#1vectoronlyalternateunits} {\mandi@selectalternateunits{#2}{#3}{#4}}
}
-\NewDocumentCommand{\renewvectorquantity}{ m m O{#2} O{#2} }
+\NewDocumentCommand{\RenewVectorQuantity}{ m m O{#2} O{#2} }
{
\__mandi_renewvectorquantity:nnnn { #1 }{ #2 }{ #3 }{ #4 }
}
@@ -2303,21 +2353,21 @@
\ExplSyntaxOn
\cs_new:Npn \__mandi_newphysicalconstant:nnnnnnn #1#2#3#4#5#6#7
{
- \cs_new:cpn {#1} {\unit{\mandi@selectprecision{#3}{#4}}{\mandi@selectunits{#5}{#6}{#7}}}
+ \cs_new:cpn {#1} {\units{\mandi@selectprecision{#3}{#4}}{\mandi@selectunits{#5}{#6}{#7}}}
\cs_new:cpn {#1mathsymbol} {#2}
\cs_new:cpn {#1approximatevalue} {#3}
\cs_new:cpn {#1precisevalue} {#4}
\cs_new:cpn {#1baseunits}
- {\unit{\mandi@selectprecision{#3}{#4}}{\mandi@selectbaseunits{#5}{#6}{#7}}}
+ {\units{\mandi@selectprecision{#3}{#4}}{\mandi@selectbaseunits{#5}{#6}{#7}}}
\cs_new:cpn {#1derivedunits}
- {\unit{\mandi@selectprecision{#3}{#4}}{\mandi@selectderivedunits{#5}{#6}{#7}}}
+ {\units{\mandi@selectprecision{#3}{#4}}{\mandi@selectderivedunits{#5}{#6}{#7}}}
\cs_new:cpn {#1alternateunits}
- {\unit{\mandi@selectprecision{#3}{#4}}{\mandi@selectalternateunits{#5}{#6}{#7}}}
+ {\units{\mandi@selectprecision{#3}{#4}}{\mandi@selectalternateunits{#5}{#6}{#7}}}
\cs_new:cpn {#1onlybaseunits} {\mandi@selectbaseunits{#5}{#6}{#7}}
\cs_new:cpn {#1onlyderivedunits} {\mandi@selectderivedunits{#5}{#6}{#7}}
\cs_new:cpn {#1onlyalternateunits} {\mandi@selectalternateunits{#5}{#6}{#7}}
}
-\NewDocumentCommand{\newphysicalconstant}{ m m m m m O{#5} O{#5} }
+\NewDocumentCommand{\NewPhysicalConstant}{ m m m m m O{#5} O{#5} }
{
\__mandi_newphysicalconstant:nnnnnnn { #1 }{ #2 }{ #3 }{ #4 }{ #5 }{ #6 }{ #7 }
}
@@ -2330,21 +2380,21 @@
\ExplSyntaxOn
\cs_new:Npn \__mandi_renewphysicalconstant:nnnnnnn #1#2#3#4#5#6#7
{
- \cs_set:cpn {#1} {\unit{\mandi@selectprecision{#3}{#4}}{\mandi@selectunits{#5}{#6}{#7}}}
+ \cs_set:cpn {#1} {\units{\mandi@selectprecision{#3}{#4}}{\mandi@selectunits{#5}{#6}{#7}}}
\cs_set:cpn {#1mathsymbol} {#2}
\cs_set:cpn {#1approximatevalue} {#3}
\cs_set:cpn {#1precisevalue} {#4}
\cs_set:cpn {#1baseunits}
- {\unit{\mandi@selectprecision{#3}{#4}}{\mandi@selectbaseunits{#5}{#6}{#7}}}
+ {\units{\mandi@selectprecision{#3}{#4}}{\mandi@selectbaseunits{#5}{#6}{#7}}}
\cs_set:cpn {#1derivedunits}
- {\unit{\mandi@selectprecision{#3}{#4}}{\mandi@selectderivedunits{#5}{#6}{#7}}}
+ {\units{\mandi@selectprecision{#3}{#4}}{\mandi@selectderivedunits{#5}{#6}{#7}}}
\cs_set:cpn {#1alternateunits}
- {\unit{\mandi@selectprecision{#3}{#4}}{\mandi@selectalternateunits{#5}{#6}{#7}}}
+ {\units{\mandi@selectprecision{#3}{#4}}{\mandi@selectalternateunits{#5}{#6}{#7}}}
\cs_set:cpn {#1onlybaseunits} {\mandi@selectbaseunits{#5}{#6}{#7}}
\cs_set:cpn {#1onlyderivedunits} {\mandi@selectderivedunits{#5}{#6}{#7}}
\cs_set:cpn {#1onlyalternateunits} {\mandi@selectalternateunits{#5}{#6}{#7}}
}
-\NewDocumentCommand{\renewphysicalconstant}{ m m m m m O{#5} O{#5} }
+\NewDocumentCommand{\RenewPhysicalConstant}{ m m m m m O{#5} O{#5} }
{
\__mandi_renewphysicalconstant:nnnnnnn { #1 }{ #2 }{ #3 }{ #4 }{ #5 }{ #6 }{ #7 }
}
@@ -2352,331 +2402,438 @@
% \end{macrocode}
%
% Define every quantity we need in introductory physics, alphabetically
-% for convenience. This is really the core feature of \mandi\ that no other
+% for convenience. This is really the core feature of \mandi{} that no other
% package offers. There are commands for quantities that have no dimensions
% or units, and these quantities are defined for semantic completeness.
%
% \begin{macrocode}
-\newvectorquantity{acceleration}%
+\NewVectorQuantity{acceleration}%
{\meter\usk\second\totheinversetwo}%
[\newton\per\kilogram]%
[\meter\per\second\tothetwo]%
-\newscalarquantity{amount}%
+\NewScalarQuantity{amount}%
{\mole}%
-\newvectorquantity{angularacceleration}%
+\NewVectorQuantity{angularacceleration}%
{\radian\usk\second\totheinversetwo}%
[\radian\per\second\tothetwo]%
[\radian\per\second\tothetwo]%
-\newscalarquantity{angularfrequency}%
+\NewScalarQuantity{angularfrequency}%
{\radian\usk\second\inverse}%
[\radian\per\second]%
[\radian\per\second]%
-%\ifmandi@rotradians
-% \newphysicalquantity{angularimpulse}%
-% {\meter\tothetwo\usk\kilogram\usk\second\inverse\usk\radian\inverse}%
-% [\joule\usk\second\per\radian]%
-% [\newton\usk\meter\usk\second\per\radian]%
-% \newphysicalquantity{angularmomentum}%
-% {\meter\tothetwo\usk\kilogram\usk\second\inverse\usk\radian\inverse}%
-% [\kilogram\usk\meter\tothetwo\per(\second\usk\radian)]%
-% [\newton\usk\meter\usk\second\per\radian]%
-%\else
-\newvectorquantity{angularimpulse}%
+% \end{macrocode}
+%
+% Angular impulse may also be |\newton\usk\meter\usk\second| or
+% |\joule\usk\second|.
+%
+% \begin{macrocode}
+\NewVectorQuantity{angularimpulse}%
{\kilogram\usk\meter\tothetwo\usk\second\inverse}%
- [\kilogram\usk\meter\tothetwo\per\second]% % also \joule\usk\second
- [\kilogram\usk\meter\tothetwo\per\second]% % also \newton\usk\meter\usk\second
-\newvectorquantity{angularmomentum}%
+ [\kilogram\usk\meter\tothetwo\per\second]%
+ [\kilogram\usk\meter\tothetwo\per\second]%
+% \end{macrocode}
+%
+% Angular momentum may also be |\joule\usk\second| or
+% |\newton\usk\meter\usk\second|.
+%
+% \begin{macrocode}
+\NewVectorQuantity{angularmomentum}%
{\kilogram\usk\meter\tothetwo\usk\second\inverse}%
- [\kilogram\usk\meter\tothetwo\per\second]% % also \joule\usk\second
- [\kilogram\usk\meter\tothetwo\per\second]% % also \newton\usk\meter\usk\second
-%\fi
-\newvectorquantity{angularvelocity}%
+ [\kilogram\usk\meter\tothetwo\per\second]%
+ [\kilogram\usk\meter\tothetwo\per\second]%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewVectorQuantity{angularvelocity}%
{\radian\usk\second\inverse}%
[\radian\per\second]%
[\radian\per\second]%
-\newscalarquantity{area}%
+\NewScalarQuantity{area}%
{\meter\tothetwo}%
-\newscalarquantity{areachargedensity}%
+\NewScalarQuantity{areachargedensity}%
{\ampere\usk\second\usk\meter\totheinversetwo}%
[\coulomb\per\meter\tothetwo]%
[\coulomb\per\meter\tothetwo]%
-\newscalarquantity{areamassdensity}%
+\NewScalarQuantity{areamassdensity}%
{\kilogram\usk\meter\totheinversetwo}%
[\kilogram\per\meter\tothetwo]%
[\kilogram\per\meter\tothetwo]%
-\newscalarquantity{capacitance}%
+% \end{macrocode}
+%
+% Capacitance may also be |\coulomb\tothetwo\per\newton\usk\meter| or
+% |\second\per\ohm|.
+%
+% \begin{macrocode}
+\NewScalarQuantity{capacitance}%
{\ampere\tothetwo\usk\second\tothefour\usk\kilogram\inverse\usk\meter\totheinversetwo}%
[\farad]%
- [\coulomb\per\volt]% % also \coulomb\tothetwo\per\newton\usk\meter, \second\per\ohm
-\newscalarquantity{charge}%
+ [\coulomb\per\volt]%
+% \end{macrocode}
+%
+% Charge may also be |\farad\usk\volt|.
+%
+% \begin{macrocode}
+\NewScalarQuantity{charge}%
{\ampere\usk\second}%
[\coulomb]%
- [\coulomb]% % also \farad\usk\volt
-\newvectorquantity{cmagneticfield}%
+ [\coulomb]%
+% \end{macrocode}
+%
+% Magnetic field times \(\symup{c}\) may also be |\volt\per\meter|.
+%
+% \begin{macrocode}
+\NewVectorQuantity{cmagneticfield}%
{\kilogram\usk\meter\usk\ampere\inverse\usk\second\totheinversethree}%
- [\newton\per\coulomb]% % also \volt\per\meter
[\newton\per\coulomb]%
-\newscalarquantity{conductance}%
+ [\newton\per\coulomb]%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewScalarQuantity{conductance}%
{\ampere\tothetwo\usk\second\tothethree\usk\kilogram\inverse\usk\meter\totheinversetwo}%
[\siemens]%
[\ampere\per\volt]%
-\newscalarquantity{conductivity}%
+\NewScalarQuantity{conductivity}%
{\ampere\tothetwo\usk\second\tothethree\usk\kilogram\inverse\usk\meter\totheinversethree}%
[\siemens\per\meter]%
[\ampere\per\volt\usk\meter]%
-\newscalarquantity{conventionalcurrent}%
+\NewScalarQuantity{conventionalcurrent}%
{\ampere}%
[\coulomb\per\second]%
[\ampere]%
-\newscalarquantity{current}%
+\NewScalarQuantity{current}%
{\ampere}%
-\newscalarquantity{currentdensity}%
+\NewScalarQuantity{currentdensity}%
{\ampere\usk\meter\totheinversetwo}%
[\coulomb\per\second\usk\meter\tothetwo]%
[\ampere\per\meter\tothetwo]%
-\newscalarquantity{dielectricconstant}%
+\NewScalarQuantity{dielectricconstant}%
{}%
-\newvectorquantity{direction}%
+\NewVectorQuantity{direction}%
{}%
-\newvectorquantity{displacement}%
+\NewVectorQuantity{displacement}%
{\meter}
-\newscalarquantity{duration}%
+\NewScalarQuantity{duration}%
{\second}%
-\newvectorquantity{electricdipolemoment}%
+\NewVectorQuantity{electricdipolemoment}%
{\ampere\usk\second\usk\meter}%
[\coulomb\usk\meter]%
[\coulomb\usk\meter]%
-\newvectorquantity{electricfield}%
+\NewVectorQuantity{electricfield}%
{\kilogram\usk\meter\usk\ampere\inverse\usk\second\totheinversethree}%
[\volt\per\meter]%
[\newton\per\coulomb]%
-\newscalarquantity{electricflux}%
+\NewScalarQuantity{electricflux}%
{\kilogram\usk\meter\tothethree\usk\ampere\inverse\usk\second\totheinversethree}%
[\volt\usk\meter]%
[\newton\usk\meter\tothetwo\per\coulomb]%
-\newscalarquantity{electricpotential}%
+% \end{macrocode}
+%
+% Electric potential, electric potential difference, and emf
+% may also be |\joule\per\coulomb|.
+%
+% \begin{macrocode}
+\NewScalarQuantity{electricpotential}%
{\kilogram\usk\meter\tothetwo\usk\ampere\inverse\usk\second\totheinversethree}%
- [\volt]% % also \joule\per\coulomb
[\volt]%
-\newscalarquantity{electricpotentialdifference}%
+ [\volt]%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewScalarQuantity{electricpotentialdifference}%
{\kilogram\usk\meter\tothetwo\usk\ampere\inverse\usk\second\totheinversethree}%
- [\volt]% % also \joule\per\coulomb
[\volt]%
-\newscalarquantity{electroncurrent}%
+ [\volt]%
+\NewScalarQuantity{electroncurrent}%
{\second\inverse}%
[\ensuremath{\symup{e}}\per\second]%
[\ensuremath{\symup{e}}\per\second]%
-\newscalarquantity{emf}%
+\NewScalarQuantity{emf}%
{\kilogram\usk\meter\tothetwo\usk\ampere\inverse\usk\second\totheinversethree}%
- [\volt]% % also \joule\per\coulomb
[\volt]%
-\newscalarquantity{energy}%
+ [\volt]%
+% \end{macrocode}
+%
+% Energy may also be |\newton\usk\meter|.
+%
+% \begin{macrocode}
+\NewScalarQuantity{energy}%
{\kilogram\usk\meter\tothetwo\usk\second\totheinversetwo}%
- [\joule]% % also \newton\usk\meter
[\joule]%
-\newscalarquantity{energyinev}%
+ [\joule]%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewScalarQuantity{energyinev}%
{\electronvolt}%
-\newscalarquantity{energyinkev}%
+\NewScalarQuantity{energyinkev}%
{\kiloelectronvolt}%
-\newscalarquantity{energyinmev}%
+\NewScalarQuantity{energyinmev}%
{\megaelectronvolt}%
-\newscalarquantity{energydensity}%
+\NewScalarQuantity{energydensity}%
{\kilogram\usk\meter\inverse\usk\second\totheinversetwo}%
[\joule\per\meter\tothethree]%
[\joule\per\meter\tothethree]%
-\newscalarquantity{energyflux}%
+\NewScalarQuantity{energyflux}%
{\kilogram\usk\second\totheinversethree}%
[\watt\per\meter\tothetwo]%
[\watt\per\meter\tothetwo]%
-\newscalarquantity{entropy}%
+\NewScalarQuantity{entropy}%
{\kilogram\usk\meter\tothetwo\usk\second\totheinversetwo\usk\kelvin\inverse}%
[\joule\per\kelvin]%
[\joule\per\kelvin]%
-\newvectorquantity{force}%
+% \end{macrocode}
+%
+% Force may also be |\kilogram\usk\meter\per\second\tothetwo|.
+%
+% \begin{macrocode}
+\NewVectorQuantity{force}%
{\kilogram\usk\meter\usk\second\totheinversetwo}%
[\newton]%
- [\newton]% % also \kilogram\usk\meter\per\second\tothetwo
-\newscalarquantity{frequency}%
+ [\newton]%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewScalarQuantity{frequency}%
{\second\inverse}%
[\hertz]%
[\hertz]%
-\newvectorquantity{gravitationalfield}%
+\NewVectorQuantity{gravitationalfield}%
{\meter\usk\second\totheinversetwo}%
[\newton\per\kilogram]%
[\newton\per\kilogram]%
-\newscalarquantity{gravitationalpotential}%
+\NewScalarQuantity{gravitationalpotential}%
{\meter\tothetwo\usk\second\totheinversetwo}%
[\joule\per\kilogram]%
[\joule\per\kilogram]%
-\newscalarquantity{gravitationalpotentialdifference}%
+\NewScalarQuantity{gravitationalpotentialdifference}%
{\meter\tothetwo\usk\second\totheinversetwo}%
[\joule\per\kilogram]%
[\joule\per\kilogram]%
-\newvectorquantity{impulse}%
+\NewVectorQuantity{impulse}%
{\kilogram\usk\meter\usk\second\inverse}%
[\newton\usk\second]%
[\newton\usk\second]%
-\newscalarquantity{indexofrefraction}%
+\NewScalarQuantity{indexofrefraction}%
{}%
-\newscalarquantity{inductance}%
+% \end{macrocode}
+%
+% Inductance may also be |\square\meter\usk\kilogram\per\coulomb\tothetwo| or
+% |\Wb\per\ampere|.
+%
+% \begin{macrocode}
+\NewScalarQuantity{inductance}%
{\kilogram\usk\meter\tothetwo\usk\ampere\totheinversetwo\usk\second\totheinversetwo}%
[\henry]%
- [\volt\usk\second\per\ampere]% % also \square\meter\usk\kilogram\per\coulomb\tothetwo, \Wb\per\ampere
-\newscalarquantity{linearchargedensity}%
+ [\volt\usk\second\per\ampere]%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewScalarQuantity{linearchargedensity}%
{\ampere\usk\second\usk\meter\inverse}%
[\coulomb\per\meter]%
[\coulomb\per\meter]%
-\newscalarquantity{linearmassdensity}%
+\NewScalarQuantity{linearmassdensity}%
{\kilogram\usk\meter\inverse}%
[\kilogram\per\meter]%
[\kilogram\per\meter]%
% \end{macrocode}
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandipkg}{mandi} Added \refCom{lorentzfactor}}
+% {\linktoplace{sec:mandia}{mandi} Added \refCom{lorentzfactor}}
% \begin{macrocode}
-\newscalarquantity{lorentzfactor}%
+\NewScalarQuantity{lorentzfactor}%
{}%
-\newscalarquantity{luminousintensity}%
+\NewScalarQuantity{luminousintensity}%
{\candela}%
-\newscalarquantity{magneticcharge}%
- {\ampere\usk\meter}% % There is another convention. Be careful!
-\newvectorquantity{magneticdipolemoment}%
+% \end{macrocode}
+%
+% There is another convention for magnetic charge, so be careful.
+%
+% \begin{macrocode}
+\NewScalarQuantity{magneticcharge}%
+ {\ampere\usk\meter}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewVectorQuantity{magneticdipolemoment}%
{\ampere\usk\meter\tothetwo}%
[\ampere\usk\meter\tothetwo]%
[\joule\per\tesla]%
-\newvectorquantity{magneticfield}%
+% \end{macrocode}
+%
+% Magnetic field may also be |\Wb\per\meter\tothetwo|.
+%
+% \begin{macrocode}
+\NewVectorQuantity{magneticfield}%
{\kilogram\usk\ampere\inverse\usk\second\totheinversetwo}%
- [\newton\per\ampere\usk\meter]% % also \Wb\per\meter\tothetwo
+ [\newton\per\ampere\usk\meter]%
[\tesla]%
-\newscalarquantity{magneticflux}%
+% \end{macrocode}
+%
+% Magnetic flux may also be |\Wb| or
+% |\joule\per\ampere|.
+%
+% \begin{macrocode}
+\NewScalarQuantity{magneticflux}%
{\kilogram\usk\meter\tothetwo\usk\ampere\inverse\usk\second\totheinversetwo}%
[\tesla\usk\meter\tothetwo]%
- [\volt\usk\second]% % also \Wb and \joule\per\ampere
-\newscalarquantity{mass}%
+ [\volt\usk\second]%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewScalarQuantity{mass}%
{\kilogram}%
-\newscalarquantity{mobility}%
+\NewScalarQuantity{mobility}%
{\kilogram\usk\meter\tothetwo\usk\ampere\inverse\usk\second\totheinversefour}%
[\meter\tothetwo\per\volt\usk\second]%
[\coulomb\usk\meter\per\newton\usk\second]%
-\newscalarquantity{momentofinertia}%
+\NewScalarQuantity{momentofinertia}%
{\kilogram\usk\meter\tothetwo}%
[\joule\usk\second\tothetwo]%
[\kilogram\usk\meter\tothetwo]%
-\newvectorquantity{momentum}%
+\NewVectorQuantity{momentum}%
{\kilogram\usk\meter\usk\second\inverse}%
[\kilogram\usk\meter\per\second]%
[\kilogram\usk\meter\per\second]%
-\newvectorquantity{momentumflux}%
+\NewVectorQuantity{momentumflux}%
{\kilogram\usk\meter\inverse\usk\second\totheinversetwo}%
[\newton\per\meter\tothetwo]%
[\newton\per\meter\tothetwo]%
-\newscalarquantity{numberdensity}%
+\NewScalarQuantity{numberdensity}%
{\meter\totheinversethree}%
[\per\meter\tothethree]%
[\per\meter\tothethree]%
-\newscalarquantity{permeability}%
+\NewScalarQuantity{permeability}%
{\kilogram\usk\meter\usk\ampere\totheinversetwo\usk\second\totheinversetwo}%
[\henry\per\meter]%
[\tesla\usk\meter\per\ampere]%
-\newscalarquantity{permittivity}%
+\NewScalarQuantity{permittivity}%
{\ampere\tothetwo\usk\second\tothefour\usk\kilogram\inverse\usk\meter\totheinversethree}%
[\farad\per\meter]%
[\coulomb\tothetwo\per\newton\usk\meter\tothetwo]%
-\newscalarquantity{planeangle}%
+\NewScalarQuantity{planeangle}%
{\meter\usk\meter\inverse}%
[\radian]%
[\radian]%
-\newscalarquantity{polarizability}%
+\NewScalarQuantity{polarizability}%
{\ampere\tothetwo\usk\second\tothefour\usk\kilogram\inverse}%
[\coulomb\usk\meter\tothetwo\per\volt]%
[\coulomb\tothetwo\usk\meter\per\newton]%
-\newscalarquantity{power}%
+\NewScalarQuantity{power}%
{\kilogram\usk\meter\tothetwo\usk\second\totheinversethree}%
[\watt]%
[\joule\per\second]%
-\newvectorquantity{poynting}%
+\NewVectorQuantity{poynting}%
{\kilogram\usk\second\totheinversethree}%
[\watt\per\meter\tothetwo]%
[\watt\per\meter\tothetwo]%
-\newscalarquantity{pressure}%
+\NewScalarQuantity{pressure}%
{\kilogram\usk\meter\inverse\usk\second\totheinversetwo}%
[\pascal]%
[\newton\per\meter\tothetwo]%
-\newscalarquantity{relativepermeability}
+\NewScalarQuantity{relativepermeability}
{}%
-\newscalarquantity{relativepermittivity}%
+\NewScalarQuantity{relativepermittivity}%
{}%
-\newscalarquantity{resistance}%
+% \end{macrocode}
+%
+% Resistance may also be |\volt\per\ampere|.
+%
+% \begin{macrocode}
+\NewScalarQuantity{resistance}%
{\kilogram\usk\meter\tothetwo\usk\ampere\totheinversetwo\usk\second\totheinversethree}%
- [\ohm]% % also \volt\per\ampere
[\ohm]%
-\newscalarquantity{resistivity}%
+ [\ohm]%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewScalarQuantity{resistivity}%
{\kilogram\usk\meter\tothethree\usk\ampere\totheinversetwo\usk\second\totheinversethree}%
[\ohm\usk\meter]%
[\volt\usk\meter\per\ampere]%
-\newscalarquantity{solidangle}%
+\NewScalarQuantity{solidangle}%
{\meter\tothetwo\usk\meter\totheinversetwo}%
[\steradian]%
[\steradian]%
-\newscalarquantity{specificheatcapacity}%
+\NewScalarQuantity{specificheatcapacity}%
{\meter\tothetwo\usk\second\totheinversetwo\usk\kelvin\inverse}%
[\joule\per\kelvin\usk\kilogram]%
[\joule\per\kelvin\usk\kilogram]
-\newscalarquantity{springstiffness}%
+\NewScalarQuantity{springstiffness}%
{\kilogram\usk\second\totheinversetwo}%
[\newton\per\meter]%
[\newton\per\meter]%
-\newscalarquantity{springstretch}% % This is really just a displacement.
+% \end{macrocode}
+%
+% Spring stretch is really just a displacement.
+%
+% \begin{macrocode}
+\NewScalarQuantity{springstretch}%
{\meter}%
-\newscalarquantity{stress}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewScalarQuantity{stress}%
{\kilogram\usk\meter\inverse\usk\second\totheinversetwo}%
[\pascal]%
[\newton\per\meter\tothetwo]%
-\newscalarquantity{strain}%
+\NewScalarQuantity{strain}%
{}%
-\newscalarquantity{temperature}%
+\NewScalarQuantity{temperature}%
{\kelvin}%
-%\ifmandi@rotradians
-% \newphysicalquantity{torque}%
-% {\kilogram\usk\meter\tothetwo\usk\second\totheinversetwo\usk\radian\inverse}%
-% [\newton\usk\meter\per\radian]%
-% [\newton\usk\meter\per\radian]%
-%\else
-\newvectorquantity{torque}%
+\NewVectorQuantity{torque}%
{\kilogram\usk\meter\tothetwo\usk\second\totheinversetwo}%
[\newton\usk\meter]%
[\newton\usk\meter]%
-%\fi
-\newvectorquantity{velocity}%
+\NewVectorQuantity{velocity}%
{\meter\usk\second\inverse}%
[\meter\per\second]%
[\meter\per\second]%
-\newvectorquantity{velocityc}%
+\NewVectorQuantity{velocityc}%
{\lightspeed}%
[\lightspeed]%
[\lightspeed]%
-\newscalarquantity{volume}%
+\NewScalarQuantity{volume}%
{\meter\tothethree}%
-\newscalarquantity{volumechargedensity}%
+\NewScalarQuantity{volumechargedensity}%
{\ampere\usk\second\per\meter\totheinversethree}%
[\coulomb\per\meter\tothethree]%
[\coulomb\per\meter\tothethree]%
-\newscalarquantity{volumemassdensity}%
+\NewScalarQuantity{volumemassdensity}%
{\kilogram\usk\meter\totheinversethree}%
[\kilogram\per\meter\tothethree]%
[\kilogram\per\meter\tothethree]%
-\newscalarquantity{wavelength}% % This is really just a displacement.
+% \end{macrocode}
+%
+% Wavelength is really just a displacement.
+%
+% \begin{macrocode}
+\NewScalarQuantity{wavelength}%
{\meter}%
-\newvectorquantity{wavenumber}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewVectorQuantity{wavenumber}%
{\meter\inverse}%
[\per\meter]%
[\per\meter]%
-\newscalarquantity{work}%
+% \end{macrocode}
+%
+% Work may also be |\newton\usk\meter| but this
+% is discouraged to avoid confusion with torque.
+%
+% \begin{macrocode}
+\NewScalarQuantity{work}%
{\kilogram\usk\meter\tothetwo\usk\second\totheinversetwo}%
- [\joule]% % also \newton\usk\meter but discouraged
[\joule]%
-\newscalarquantity{youngsmodulus}% % This is really just a stress.
+ [\joule]%
+% \end{macrocode}
+%
+% Young's modulus is really just a stress.
+%
+% \begin{macrocode}
+\NewScalarQuantity{youngsmodulus}%
{\kilogram\usk\meter\inverse\usk\second\totheinversetwo}%
[\pascal]%
[\newton\per\meter\tothetwo]%
@@ -2685,14 +2842,19 @@
% We need a better glyph for Planck's constant over \( 2\pi \).
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandipkg}{mandi} Added \refCom{hbar}}
+% {\linktoplace{sec:mandia}{mandi} Added \refCom{hbar}}
% \begin{macrocode}
\AtBeginDocument{%
\DeclareRobustCommand{\hbar}{{\mathpalette\hbar@\relax\symup{h}}}%
}%
\newcommand*{\hbar@}[2]{%
\makebox[0pt][l]{\raisebox{-0.07\height}{\(\m@th#1\mkern-2mu\mathchar"AF\)}}%
- % optional line to make the bar thicker; must use -0.11
+% \end{macrocode}
+%
+% Optional line to make the bar thicker; must use \(-0.11\)
+% in |\raisebox|.
+%
+% \begin{macrocode}
\makebox[0pt][l]{\raisebox{-0.11\height}{\(\m@th#1\mkern-2mu\mathchar"AF\)}}%
}%
% \end{macrocode}
@@ -2701,119 +2863,129 @@
% for convenience.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandipkg}{mandi} Constants' values now use only \cs{times}}
+% {\linktoplace{sec:mandia}{mandi} Constants' values now use only \cs{times}}
% \begin{macrocode}
-\newphysicalconstant{avogadro}%
- {\symup{N_A}}%
- {6\times10^{23}}{6.02214076\times10^{23}}% % exact 2019 value
+\NewPhysicalConstant{avogadro}%
+ {\symup{N_{A}}}%
+ {6\times10^{23}}{6.02214076\times10^{23}}%
{\mole\inverse}%
[\per\mole]%
[\per\mole]%
-\newphysicalconstant{biotsavartconstant}% % alias for \mzofp
- {\symup{\frac{\mu_o}{4\pi}}}%
+% \end{macrocode}
+%
+% |\biotsavartconstant| is an alias for |\mzofp|.
+%
+% \begin{macrocode}
+\NewPhysicalConstant{biotsavartconstant}%
+ {\symup{\frac{\mu_{o}}{4\pi}}}%
{10^{-7}}{10^{-7}}%
{\kilogram\usk\meter\usk\ampere\totheinversetwo\usk\second\totheinversetwo}%
[\henry\per\meter]%
[\tesla\usk\meter\per\ampere]%
-\newphysicalconstant{bohrradius}%
- {\symup{a_o}}%
+\NewPhysicalConstant{bohrradius}%
+ {\symup{a_{o}}}%
{5.3\times10^{-11}}{5.29177210903\times10^{-11}}%
{\meter}%
-\newphysicalconstant{boltzmann}%
- {\symup{k_B}}%
- {1.4\times10^{-23}}{1.380649\times10^{-23}}% % exact 2019 value
+\NewPhysicalConstant{boltzmann}%
+ {\symup{k_{B}}}%
+ {1.4\times10^{-23}}{1.380649\times10^{-23}}%
{\kilogram\usk\meter\tothetwo\usk\second\totheinversetwo\usk\kelvin\inverse}%
[\joule\per\kelvin]%
[\joule\per\kelvin]%
-\newphysicalconstant{coulombconstant}% % alias for \oofpez
- {\symup{\frac{1}{4\pi\epsilon_o}}}%
+% \end{macrocode}
+%
+% |\coulombconstant| is an alias for |\oofpez|.
+%
+% \begin{macrocode}
+\NewPhysicalConstant{coulombconstant}%
+ {\symup{\frac{1}{4\pi\epsilon_{o}}}}%
{9\times10^{9}}{8.9875517923\times10^{9}}%
{\kilogram\usk\meter\tothethree\usk\ampere\totheinversetwo\usk\second\totheinversefour}%
[\meter\per\farad]%
[\newton\usk\meter\tothetwo\per\coulomb\tothetwo]%
-\newphysicalconstant{earthmass}%
+\NewPhysicalConstant{earthmass}%
{\symup{M_{Earth}}}%
{6.0\times10^{24}}{5.9722\times10^{24}}%
{\kilogram}%
-\newphysicalconstant{earthmoondistance}%
+\NewPhysicalConstant{earthmoondistance}%
{\symup{d_{EM}}}%
{3.8\times10^{8}}{3.81550\times10^{8}}%
{\meter}%
-\newphysicalconstant{earthradius}%
+\NewPhysicalConstant{earthradius}%
{\symup{R_{Earth}}}%
{6.4\times10^{6}}{6.3781\times10^{6}}%
{\meter}%
-\newphysicalconstant{earthsundistance}%
+\NewPhysicalConstant{earthsundistance}%
{\symup{d_{ES}}}%
{1.5\times10^{11}}{1.496\times10^{11}}%
{\meter}%
-\newphysicalconstant{electroncharge}%
- {\symup{q_e}}%
+\NewPhysicalConstant{electroncharge}%
+ {\symup{q_{e}}}%
{-\elementarychargeapproximatevalue}{-\elementarychargeprecisevalue}%
{\ampere\usk\second}%
[\coulomb]%
[\coulomb]%
-\newphysicalconstant{electronCharge}%
- {\symup{Q_e}}%
+\NewPhysicalConstant{electronCharge}%
+ {\symup{Q_{e}}}%
{-\elementarychargeapproximatevalue}{-\elementarychargeprecisevalue}%
{\ampere\usk\second}%
[\coulomb]%
[\coulomb]%
-\newphysicalconstant{electronmass}%
- {\symup{m_e}}%
+\NewPhysicalConstant{electronmass}%
+ {\symup{m_{e}}}%
{9.1\times10^{-31}}{9.1093837015\times10^{-31}}%
{\kilogram}%
-\newphysicalconstant{elementarycharge}%
+\NewPhysicalConstant{elementarycharge}%
{\symup{e}}%
- {1.6\times10^{-19}}{1.602176634\times10^{-19}}% % exact 2019 value
+ {1.6\times10^{-19}}{1.602176634\times10^{-19}}%
{\ampere\usk\second}%
[\coulomb]%
[\coulomb]%
-\newphysicalconstant{finestructure}%
+\NewPhysicalConstant{finestructure}%
{\symup{\alpha}}%
{\frac{1}{137}}{7.2973525693\times10^{-3}}%
{}%
-\newphysicalconstant{hydrogenmass}%
- {\symup{m_H}}%
+\NewPhysicalConstant{hydrogenmass}%
+ {\symup{m_{H}}}%
{1.7\times10^{-27}}{1.6737236\times10^{-27}}%
{\kilogram}%
-\newphysicalconstant{moonearthdistance}%
+\NewPhysicalConstant{moonearthdistance}%
{\symup{d_{ME}}}%
{3.8\times10^{8}}{3.81550\times10^{8}}%
{\meter}%
-\newphysicalconstant{moonmass}%
+\NewPhysicalConstant{moonmass}%
{\symup{M_{Moon}}}%
{7.3\times10^{22}}{7.342\times10^{22}}%
{\kilogram}%
-\newphysicalconstant{moonradius}%
+\NewPhysicalConstant{moonradius}%
{\symup{R_{Moon}}}%
{1.7\times10^{6}}{1.7371\times10^{6}}%
{\meter}%
-\newphysicalconstant{mzofp}%
- {\symup{\frac{\mu_o}{4\pi}}}%
+\NewPhysicalConstant{mzofp}%
+ {\symup{\frac{\mu_{o}}{4\pi}}}%
{10^{-7}}{10^{-7}}%
{\kilogram\usk\meter\usk\ampere\totheinversetwo\usk\second\totheinversetwo}%
[\henry\per\meter]%
[\tesla\usk\meter\per\ampere]%
-\newphysicalconstant{neutronmass}%
- {\symup{m_n}}%
+\NewPhysicalConstant{neutronmass}%
+ {\symup{m_{n}}}%
{1.7\times10^{-27}}{1.67492749804\times10^{-27}}%
{\kilogram}%
-\newphysicalconstant{oofpez}%
- {\symup{\frac{1}{4\pi\epsilon_o}}}%
+\NewPhysicalConstant{oofpez}%
+ {\symup{\frac{1}{4\pi\epsilon_{o}}}}%
{9\times10^{9}}{8.9875517923\times10^{9}}%
{\kilogram\usk\meter\tothethree\usk\ampere\totheinversetwo\usk\second\totheinversefour}%
[\meter\per\farad]%
[\newton\usk\meter\tothetwo\per\coulomb\tothetwo]%
-\newphysicalconstant{oofpezcs}%
- {\symup{\frac{1}{4\pi\epsilon_o c^2}}}%
+\NewPhysicalConstant{oofpezcs}%
+ {\symup{\frac{1}{4\pi\epsilon_{o} c^2}}}%
{10^{-7}}{10^{-7}}%
{\kilogram\usk\meter\usk\ampere\totheinversetwo\usk\second\totheinversetwo}%
[\tesla\usk\meter\tothetwo]%
[\newton\usk\second\tothetwo\per\coulomb\tothetwo]%
-\newphysicalconstant{planck}%
+\NewPhysicalConstant{planck}%
{\symup{h}}%
- {6.6\times10^{-34}}{6.62607015\times10^{-34}}% % exact 2019 value
+ {6.6\times10^{-34}}{6.62607015\times10^{-34}}%
{\kilogram\usk\meter\tothetwo\usk\second\inverse}%
[\joule\usk\second]%
[\joule\usk\second]%
@@ -2822,81 +2994,93 @@
% See \url{https://tex.stackexchange.com/a/448565/218142}.
%
% \begin{macrocode}
-\newphysicalconstant{planckbar}%
+\NewPhysicalConstant{planckbar}%
{\hbar}%
{1.1\times10^{-34}}{1.054571817\times10^{-34}}%
{\kilogram\usk\meter\tothetwo\usk\second\inverse}%
[\joule\usk\second]%
[\joule\usk\second]
-\newphysicalconstant{planckc}%
+\NewPhysicalConstant{planckc}%
{\symup{hc}}%
{2.0\times10^{-25}}{1.98644586\times10^{-25}}%
{\kilogram\usk\meter\tothethree\usk\second\totheinversetwo}%
[\joule\usk\meter]%
[\joule\usk\meter]%
-\newphysicalconstant{protoncharge}%
+\NewPhysicalConstant{protoncharge}%
{\symup{q_p}}%
{+\elementarychargeapproximatevalue}{+\elementarychargeprecisevalue}%
{\ampere\usk\second}%
[\coulomb]%
[\coulomb]%
-\newphysicalconstant{protonCharge}%
+\NewPhysicalConstant{protonCharge}%
{\symup{Q_p}}%
{+\elementarychargeapproximatevalue}{+\elementarychargeprecisevalue}%
{\ampere\usk\second}%
[\coulomb]%
[\coulomb]%
-\newphysicalconstant{protonmass}%
+\NewPhysicalConstant{protonmass}%
{\symup{m_p}}%
{1.7\times10^{-27}}{1.672621898\times10^{-27}}%
{\kilogram}%
-\newphysicalconstant{rydberg}%
+\NewPhysicalConstant{rydberg}%
{\symup{R_{\infty}}}%
{1.1\times10^{7}}{1.0973731568160\times10^{7}}%
{\meter\inverse}%
-\newphysicalconstant{speedoflight}%
+\NewPhysicalConstant{speedoflight}%
{\symup{c}}%
- {3\times10^{8}}{2.99792458\times10^{8}}% % exact value
+ {3\times10^{8}}{2.99792458\times10^{8}}%
{\meter\usk\second\inverse}%
[\meter\per\second]%
[\meter\per\second]
-\newphysicalconstant{stefanboltzmann}%
+\NewPhysicalConstant{stefanboltzmann}%
{\symup{\sigma}}%
{5.7\times10^{-8}}{5.670374\times10^{-8}}%
{\kilogram\usk\second\totheinversethree\usk\kelvin\totheinversefour}%
[\watt\per\meter\tothetwo\usk\kelvin\tothefour]%
[\watt\per\meter\tothetwo\usk\kelvin\tothefour]
-\newphysicalconstant{sunearthdistance}%
+\NewPhysicalConstant{sunearthdistance}%
{\symup{d_{SE}}}%
{1.5\times10^{11}}{1.496\times10^{11}}%
{\meter}%
-\newphysicalconstant{sunmass}%
+\NewPhysicalConstant{sunmass}%
{\symup{M_{Sun}}}%
{2.0\times10^{30}}{1.98855\times10^{30}}%
{\kilogram}%
-\newphysicalconstant{sunradius}%
+\NewPhysicalConstant{sunradius}%
{\symup{R_{Sun}}}%
{7.0\times10^{8}}{6.957\times10^{8}}%
{\meter}%
-\newphysicalconstant{surfacegravfield}%
+\NewPhysicalConstant{surfacegravfield}%
{\symup{g}}%
{9.8}{9.807}%
{\meter\usk\second\totheinversetwo}%
[\newton\per\kilogram]%
[\newton\per\kilogram]%
-\newphysicalconstant{universalgrav}%
+% \end{macrocode}
+%
+% The gravitational constant may also have units of
+% |\joule\usk\meter\per\kilogram\tothetwo|.
+%
+% \begin{macrocode}
+\NewPhysicalConstant{universalgrav}%
{\symup{G}}%
{6.7\times10^{-11}}{6.67430\times10^{-11}}%
{\meter\tothethree\usk\kilogram\inverse\usk\second\totheinversetwo}%
- [\newton\usk\meter\tothetwo\per\kilogram\tothetwo]% % also \joule\usk\meter\per\kilogram\tothetwo
[\newton\usk\meter\tothetwo\per\kilogram\tothetwo]%
-\newphysicalconstant{vacuumpermeability}%
+ [\newton\usk\meter\tothetwo\per\kilogram\tothetwo]%
+% \end{macrocode}
+%
+% As of 2018 the vacuum permeability is no longer defined as
+% \( 4\pi\times10^{-7} \).
+%
+% \begin{macrocode}
+\NewPhysicalConstant{vacuumpermeability}%
{\symup{\mu_o}}%
- {4\pi\times10^{-7}}{4\pi\times10^{-7}}% % as of 2018 no longer 4\pi\times10^{-7}
+ {4\pi\times10^{-7}}{4\pi\times10^{-7}}%
{\kilogram\usk\meter\usk\ampere\totheinversetwo\usk\second\totheinversetwo}%
[\henry\per\meter]%
[\tesla\usk\meter\per\ampere]%
-\newphysicalconstant{vacuumpermittivity}%
+\NewPhysicalConstant{vacuumpermittivity}%
{\symup{\epsilon_o}}%
{9\times10^{-12}}{8.854187817\times10^{-12}}%
{\ampere\tothetwo\usk\second\tothefour\usk\kilogram\inverse\usk\meter\totheinversethree}%
@@ -2908,9 +3092,9 @@
% represent physical quantities and constants.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandipkg}{mandi} Improved \refCom{checkquantity}}
+% {\linktoplace{sec:mandia}{mandi} Improved \refCom{CheckQuantity}}
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandipkg}{mandi} Improved \refCom{checkconstant}}
+% {\linktoplace{sec:mandia}{mandi} Improved \refCom{CheckConstant}}
% \begin{macrocode}
\ExplSyntaxOn
\NewDocumentCommand{\@aux}{ m }
@@ -2923,7 +3107,7 @@
}
\ExplSyntaxOff
\newcolumntype{M}{>{\(}p{0.25\linewidth}<{\)}}
-\NewDocumentCommand{\checkquantity}{ m }
+\NewDocumentCommand{\CheckQuantity}{ m }
{%
\begin{center}
\begin{tabular}{MMM}
@@ -2933,7 +3117,7 @@
\end{tabular}
\end{center}
}%
-\NewDocumentCommand{\checkconstant}{ m }
+\NewDocumentCommand{\CheckConstant}{ m }
{%
\begin{center}
\begin{tabular}{MMM}
@@ -2951,7 +3135,7 @@
% See \url{https://tex.stackexchange.com/a/39054/218142}.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandipkg}{mandi} \refCom{mivector} now
+% {\linktoplace{sec:mandia}{mandi} \refCom{mivector} now
% requires more than one component}
% \begin{macrocode}
\ExplSyntaxOn
diff --git a/macros/latex/contrib/mandi/mandi.ins b/macros/latex/contrib/mandi/mandi.ins
index 45abce7e59..e235a16fbe 100644
--- a/macros/latex/contrib/mandi/mandi.ins
+++ b/macros/latex/contrib/mandi/mandi.ins
@@ -6,7 +6,7 @@
%%
%% mandi.dtx (with options: `install')
%%
-%% Copyright (C) 2021,2022 by Paul J. Heafner <heafnerj@gmail.com>
+%% 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
@@ -38,7 +38,7 @@
\usedir{tex/latex/mandi}
\preamble
- Copyright (C) 2021,2022 by Paul J. Heafner <heafnerj@gmail.com>
+ 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
@@ -73,18 +73,18 @@
\file{vdemo.py}{\from{mandistudent.dtx}{vdemo}}}
\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{* 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{* Move the *.sty files into a directory searched by TeX. *}
-\Msg{* The vdemo.py file can be deleted. *}
-\Msg{* *}
-\Msg{*************************************************************}
+\Msg{**************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation, open a command line and *}
+\Msg{* type the following, repeating 2-4 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{* Move the *.sty files into a directory searched by TeX. *}
+\Msg{* Delete vdemo.py. *}
+\Msg{* *}
+\Msg{**************************************************************}
\endbatchfile
\endinput
%%
diff --git a/macros/latex/contrib/mandi/mandi.pdf b/macros/latex/contrib/mandi/mandi.pdf
index 4fb21eac80..02dbcf4efd 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 507263bd63..3e4f83f419 100644
--- a/macros/latex/contrib/mandi/mandiexp.dtx
+++ b/macros/latex/contrib/mandi/mandiexp.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
% !TEX program = lualatexmk
%
-% Copyright (C) 2021,2022 by Paul J. Heafner <heafnerj@gmail.com>
+% 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
@@ -24,7 +24,7 @@
% and includes the derived files mandi.sty
% mandistudent.sty
% mandiexp.sty
-% vdemo.py
+% vdemo.py (not needed)
% ---------------------------------------------------------------------------
%
% \fi
@@ -65,40 +65,24 @@
%</driver>
% \fi
%
-% \CheckSum{225}
-%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-%
% ^^A DO NOT TRY TO COMPILE THIS DTX FILE BY ITSELF. IT WILL FAIL.
%
-% \section{The \mandiexp\ Package}\setplace{sec:mandiexppkg}
+% \section{The \mandiexp{} Package}\setplace{sec:mandic}
%
-% \mandi\ comes with an accessory package \mandiexp\
-% which includes commands specific to
+% \mandi{} comes with an accessory package \mandiexp{}
+% which extends \mandi{} with commands specific to
% \emph{Matter \& Interactions}.\footnote{See
% \href{https://www.wiley.com/en-us/Matter+and+Interactions%2C+4th+Edition-p-9781118875865}
% {\emph{Matter \& Interactions}} and
% \url{https://matterandinteractions.org/} for details.}
% The commands are primarily for typesetting
-% mathematical expressions used in that text. Note that \mandiexp\
-% requires, and loads, \mandi\ but \mandi\ doesn't require,
-% and doesn't load, \mandiexp.
+% mathematical expressions used in that text. \mandiexp{}
+% requires, and loads, \mandi{} but \mandi{} doesn't require,
+% and doesn't load, \mandiexp. \mandiexp{} requires the \cs{vec*}
+% command and so loads \mandistudent{} if it has not already been
+% loaded.
%
-% Load \mandiexp\ as you would any package in your preamble.
+% Load \mandiexp{} as you would any package in your preamble.
% There are no package options.
%
%\iffalse
@@ -118,7 +102,7 @@
Typesets the current version and build date.
\end{docCommand}
\begin{dispExample*}{sidebyside = false}
- The version is \mandiexpversion\ and is a stable build.
+ The version is \mandiexpversion{} and is a stable build.
\end{dispExample*}
%\iffalse
%</example>
@@ -334,7 +318,7 @@
%</example>
%\fi
%
-% \subsection{Other Expressions}
+% \subsection{Other Symbols}
%
%\iffalse
%<*example>
@@ -575,10 +559,10 @@
%</example>
%\fi
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \newgeometry{left=0.50in,right=0.50in,top=1.00in,bottom=1.00in}
-% \subsection{\mandiexp\ Source Code}
+% \subsection{\mandiexp{} Source Code}
%
% \iffalse
%<*package>
@@ -589,14 +573,14 @@
% in the name, that are not for the user to know about.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandiexppkg}{mandiexp} Version number works}
+% {\linktoplace{sec:mandic}{mandiexp} Version number works}
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandiexppkg}{mandiexp} Code formatted for better readability}
+% {\linktoplace{sec:mandic}{mandiexp} Code formatted for better readability}
% \begin{macrocode}
-\def\mandiexp@version{3.1.0}
-\def\mandiexp@date{2022-01-27}
+\def\mandiexp@version{3.2.0}
+\def\mandiexp@date{2023-08-01}
\NeedsTeXFormat{LaTeX2e}[2020-02-02]
-\DeclareRelease{v3.1.0}{2022-01-27}{mandiexp.sty}
+\DeclareRelease{v3.2.0}{2023-08-01}{mandiexp.sty}
\DeclareCurrentRelease{v\mandiexp@version}{\mandiexp@date}
\ProvidesPackage{mandiexp}
[\mandiexp@date\space v\mandiexp@version\space Macros for Matter & Interactions]
@@ -608,26 +592,55 @@
\newcommand*{\mandiexpversion}{v\mandiexp@version\space dated \mandiexp@date}
% \end{macrocode}
%
+% We need \mandi{} to load \pkg{mathtools} and \pkg{unicode-math}.
+%
+% \begin{macrocode}
+\IfPackageLoadedTF{mandi}%
+ {}%
+ {%
+ \RequirePackage{mandi}%
+ }%
+% \end{macrocode}
+%
+% \changes{v3.2.0}{2023-08-01}
+% {\linktoplace{sec:mandic}{mandiexp} \pkg{mandistudent} is loaded for \cs{vec*}}
+%
+% We need \mandistudent{} for the new \cs{vec*} command.
+%
% \begin{macrocode}
-\RequirePackage{mandi}
+\IfPackageLoadedTF{mandistudent}%
+ {}%
+ {%
+ \RequirePackage{mandistudent}%
+ }%
% \end{macrocode}
%
+% Load \pkg{xparse} if necessary.
+%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandiexppkg}{mandiexp} \pkg{xparse} is loaded for older formats}
+% {\linktoplace{sec:mandic}{mandiexp} \pkg{xparse} is loaded for older formats}
% \begin{macrocode}
-\IfFormatAtLeastTF {2020-10-01} % load xparse if necessary
+\IfFormatAtLeastTF{2020-10-01}%
{}%
{\RequirePackage{xparse}}%
% \end{macrocode}
%
+% We require the \lualatex{} engine.
+%
+% \begin{macrocode}
+\RequireLuaTeX
+% \end{macrocode}
+%
% \begin{macrocode}
\typeout{}%
\typeout{mandiexp: You are using mandiexp \mandiexpversion.}
\typeout{mandiexp: This package requires LuaLaTeX.}%
\typeout{}%
+% \end{macrocode}
+%
+% The momentum principle's lefthand and righthand sides.
%
-% Commands specific to Matter & Interactions
-% The momentum principle
+% \begin{macrocode}
\NewDocumentCommand{\lhsmomentumprinciple}{ s }%
{%
\Delta
@@ -651,6 +664,12 @@
}%
\sb{\symup{sys,net}}\,\Delta t%
}%
+% \end{macrocode}
+%
+% The momentum principle in update form, lefthand and
+% righthand sides.
+%
+% \begin{macrocode}
\NewDocumentCommand{\lhsmomentumprincipleupdate}{ s }%
{%
\IfBooleanTF{#1}%
@@ -681,6 +700,11 @@
}%
\sb{\symup{sys,net}}\,\Delta t%
}%
+% \end{macrocode}
+%
+% The full momentum principle as an expression.
+%
+% \begin{macrocode}
\NewDocumentCommand{\momentumprinciple}{ s }%
{%
\IfBooleanTF{#1}%
@@ -691,6 +715,11 @@
\lhsmomentumprinciple = \rhsmomentumprinciple%
}%
}%
+% \end{macrocode}
+%
+% The full momentum principle in update form as an expression.
+%
+% \begin{macrocode}
\NewDocumentCommand{\momentumprincipleupdate}{ s }%
{%
\IfBooleanTF{#1}%
@@ -701,7 +730,11 @@
\lhsmomentumprincipleupdate = \rhsmomentumprincipleupdate%
}%
}%
-% The momentum principle
+% \end{macrocode}
+%
+% The energy principle's lefthand and righthand sides.
+%
+% \begin{macrocode}
\NewDocumentCommand{\lhsenergyprinciple}{}%
{%
\Delta E_{\symup{sys}}%
@@ -710,6 +743,12 @@
{%
W_{\symup{ext}}#1%
}%
+% \end{macrocode}
+%
+% The energy principle in update form, lefthand and
+% righthand sides.
+%
+% \begin{macrocode}
\NewDocumentCommand{\lhsenergyprincipleupdate}{}%
{%
E_{\symup{sys,final}}%
@@ -719,15 +758,29 @@
E_{\symup{sys,initial}}+%
W_{\symup{ext}}#1%
}%
+% \end{macrocode}
+%
+% The full energy principle as an expression.
+%
+% \begin{macrocode}
\NewDocumentCommand{\energyprinciple}{ O{} }%
{%
\lhsenergyprinciple = \rhsenergyprinciple[#1]%
}%
+% \end{macrocode}
+%
+% The full energy principle in update form as an expression.
+%
+% \begin{macrocode}
\NewDocumentCommand{\energyprincipleupdate}{ O{} }%
{%
\lhsenergyprincipleupdate = \rhsenergyprincipleupdate[#1]%
}%
-% The angular momentum principle
+% \end{macrocode}
+%
+% The angular momentum principle's lefthand and righthand sides.
+%
+% \begin{macrocode}
\NewDocumentCommand{\lhsangularmomentumprinciple}{ s }%
{%
\Delta%
@@ -751,6 +804,12 @@
}%
\sb{A\symup{,sys,net}}\,\Delta t%
}%
+% \end{macrocode}
+%
+% The energy principle in update form, lefthand and
+% righthand sides.
+%
+% \begin{macrocode}
\NewDocumentCommand{\lhsangularmomentumprincipleupdate}{ s }%
{%
\IfBooleanTF{#1}%
@@ -781,6 +840,11 @@
}%
\sb{A\symup{,sys,net}}\,\Delta t%
}%
+% \end{macrocode}
+%
+% The full angular momentum principle as an expression.
+%
+% \begin{macrocode}
\NewDocumentCommand{\angularmomentumprinciple}{ s }%
{%
\IfBooleanTF{#1}%
@@ -791,6 +855,11 @@
\lhsangularmomentumprinciple = \rhsangularmomentumprinciple%
}%
}%
+% \end{macrocode}
+%
+% The full angular momentum principle in update form as an expression.
+%
+% \begin{macrocode}
\NewDocumentCommand{\angularmomentumprincipleupdate}{ s }%
{%
\IfBooleanTF{#1}%
@@ -801,6 +870,11 @@
\lhsangularmomentumprincipleupdate = \rhsangularmomentumprincipleupdate%
}%
}%
+% \end{macrocode}
+%
+% The symbol for an arbitrary entity.
+%
+% \begin{macrocode}
\NewDocumentCommand{\energyof}{ m o }%
{%
E_{#1%
@@ -808,6 +882,11 @@
{,#2}%
}%
}%
+% \end{macrocode}
+%
+% The symbol for a system's energy.
+%
+% \begin{macrocode}
\NewDocumentCommand{\systemenergy}{ o }%
{%
E_{\symup{sys}%
@@ -815,6 +894,11 @@
{,#1}%
}%
}%
+% \end{macrocode}
+%
+%
+%
+% \begin{macrocode}
\NewDocumentCommand{\particleenergy}{ o }%
{%
E_{\symup{particle}%
@@ -822,6 +906,11 @@
{,#1}%
}%
}%
+% \end{macrocode}
+%
+% The symbol for a particle's rest energy.
+%
+% \begin{macrocode}
\NewDocumentCommand{\restenergy}{ o }%
{%
E_{\symup{rest}%
@@ -829,6 +918,11 @@
{,#1}%
}%
}%
+% \end{macrocode}
+%
+% The symbol for a system's internal energy.
+%
+% \begin{macrocode}
\NewDocumentCommand{\internalenergy}{ o }%
{%
E_{\symup{internal}%
@@ -836,6 +930,11 @@
{,#1}%
}%
}%
+% \end{macrocode}
+%
+% The symbol for a system's chemical energy.
+%
+% \begin{macrocode}
\NewDocumentCommand{\chemicalenergy}{ o }%
{%
E_{\symup{chem}%
@@ -843,6 +942,11 @@
{,#1}%
}%
}%
+% \end{macrocode}
+%
+% The symbol for a system's thermal energy.
+%
+% \begin{macrocode}
\NewDocumentCommand{\thermalenergy}{ o }%
{%
E_{\symup{therm}%
@@ -850,6 +954,11 @@
{,#1}%
}%
}%
+% \end{macrocode}
+%
+% The symbol for a photon's energy.
+%
+% \begin{macrocode}
\NewDocumentCommand{\photonenergy}{ o }%
{%
E_{\symup{photon}%
@@ -857,11 +966,16 @@
{,#1}%
}%
}%
+% \end{macrocode}
+%
+% The symbol for translational kinetic energy.
+% |d[]| must be used because of the way consecutive optional
+% arguments are handled. See \pkg{xparse} docs for details.\newline
+% See \url{https://tex.stackexchange.com/a/569011/218142}.
+%
+% \begin{macrocode}
\NewDocumentCommand{\translationalkineticenergy}{ s d[] }%
{%
- % d[] must be used because of the way consecutive optional
- % arguments are handled. See xparse docs for details.
- % See https://tex.stackexchange.com/a/569011/218142
\IfBooleanTF{#1}%
{%
E_\bgroup \symup{K}%
@@ -872,11 +986,13 @@
\IfValueT{#2}{,#2}%
\egroup%
}%
+% \end{macrocode}
+%
+% The symbol for rotational kinetic energy.
+%
+% \begin{macrocode}
\NewDocumentCommand{\rotationalkineticenergy}{ s d[] }%
{%
- % d[] must be used because of the way consecutive optional
- % arguments are handled. See xparse docs for details.
- % See https://tex.stackexchange.com/a/569011/218142
\IfBooleanTF{#1}%
{%
E_\bgroup%
@@ -887,11 +1003,13 @@
\symup{rot}\IfValueT{#2}{,#2}%
\egroup%
}%
+% \end{macrocode}
+%
+% The symbol for vibrational kinetic energy.
+%
+% \begin{macrocode}
\NewDocumentCommand{\vibrationalkineticenergy}{ s d[] }%
{%
- % d[] must be used because of the way consecutive optional
- % arguments are handled. See xparse docs for details.
- % See https://tex.stackexchange.com/a/569011/218142
\IfBooleanTF{#1}%
{%
E_\bgroup%
@@ -902,6 +1020,11 @@
\symup{vib}\IfValueT{#2}{,#2}%
\egroup%
}%
+% \end{macrocode}
+%
+% The symbol for a system's gravitational potential energy.
+%
+% \begin{macrocode}
\NewDocumentCommand{\gravitationalpotentialenergy}{ o }%
{%
U_{\symup{g}%
@@ -909,6 +1032,11 @@
{,#1}%
}%
}%
+% \end{macrocode}
+%
+% The symbol for a system's electric potential energy.
+%
+% \begin{macrocode}
\NewDocumentCommand{\electricpotentialenergy}{ o }%
{%
U_{\symup{e}%
@@ -916,6 +1044,11 @@
{,#1}%
}%
}%
+% \end{macrocode}
+%
+% The symbol for a system's spring potential energy.
+%
+% \begin{macrocode}
\NewDocumentCommand{\springpotentialenergy}{ o }%
{%
U_{\symup{s}%
diff --git a/macros/latex/contrib/mandi/mandistudent.dtx b/macros/latex/contrib/mandi/mandistudent.dtx
index d27bc93ac5..90b4a3dbd7 100644
--- a/macros/latex/contrib/mandi/mandistudent.dtx
+++ b/macros/latex/contrib/mandi/mandistudent.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
% !TEX program = lualatexmk
%
-% Copyright (C) 2021,2022 by Paul J. Heafner <heafnerj@gmail.com>
+% 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
@@ -24,7 +24,7 @@
% and includes the derived files mandi.sty
% mandistudent.sty
% mandiexp.sty
-% vdemo.py
+% vdemo.py (not needed)
% ---------------------------------------------------------------------------
%
% \fi
@@ -111,37 +111,19 @@ while t < 10:
%</driver>
% \fi
%
-% \CheckSum{745}
-%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-%
% ^^A DO NOT TRY TO COMPILE THIS DTX FILE BY ITSELF. IT WILL FAIL.
%
-% \section{The \mandistudent\ Package}\setplace{sec:mandistudentpkg}
+% \section{The \mandistudent{} Package}\setplace{sec:mandib}
%
-% \mandi\ comes with an accessory package \mandistudent,
-% which provides a collection of commands physics students can
-% use for writing problem solutions. This package focuses on
-% the most frequently needed tools. These commands should always
-% be used in math mode. Note that \mandistudent\ requires, and
-% loads, \mandi\ but \mandi\ doesn't require, and doesn't load,
-% \mandistudent.
+% \mandi{} comes with an accessory package \mandistudent,
+% which extends \mandi{} with a collection of commands physics
+% students can use for writing problem solutions. This package
+% focuses on the most frequently needed tools. These commands
+% should always be used in math mode. \mandistudent{} requires,
+% and loads, \mandi{} but \mandi{} doesn't require, and doesn't
+% load, \mandistudent.
%
-% Load \mandistudent\ as you would any package in your preamble.
+% Load \mandistudent{} as you would any package in your preamble.
% There are no package options.
%
%\iffalse
@@ -161,7 +143,7 @@ while t < 10:
Typesets the current version and build date.
\end{docCommand}
\begin{dispExample*}{sidebyside = false}
- The version is \mandistudentversion\ and is a stable build.
+ The version is \mandistudentversion{} and is a stable build.
\end{dispExample*}
%\iffalse
%</example>
@@ -470,7 +452,7 @@ while t < 10:
%<*example>
%\fi
\begin{docEnvironments}[%
- doc new = 2021-02-03,%
+ doc updated = 2023-08-01,%
doc parameter = \marg{title},%
doclang/environment content = problem,%
]%
@@ -490,11 +472,14 @@ while t < 10:
}%
Provides an environment for stating physics problems. Each problem will
begin on a new page. See the examples for how to handle single and
- multiple part problems.
+ multiple part problems. Due to incompatibilities with \textsc{beamer}
+ and the \pkg{enumitem} package, these environments are not defined if
+ \textsc{beamer} is loaded.
\end{docEnvironments}
-\begin{docCommand}[doc new = 2021-02-03]{problempart}{}
+\begin{docCommand}[doc updated = 2023-08-01]{problempart}{}
Denotes a part of a problem within a \refEnv{parts}
- environment.
+ environment. This command is not defined if \textsc{beamer}
+ is loaded.
\end{docCommand}
\begin{dispExample*}{sidebyside = false}
\begin{physicsproblem}{Problem 1}
@@ -629,12 +614,12 @@ while t < 10:
%\iffalse
%<*example>
%\fi
-\begin{docCommand}[doc new = 2021-02-06]{hilite}{%
+\begin{docCommand}[doc updated = 2023-08-01]{hilite}{%
\oarg{color}\marg{target}\oarg{shape}
}%
Hilites the desired target, which can be an entire mathematical expression
or a part thereof. The default color is magenta and the default shape is a
- rectangle.
+ rectangle. This command is not defined if \textsc{beamer} is loaded.
\end{docCommand}
\begin{dispListing*}{sidebyside = false,listing only}
\begin{align*}
@@ -880,7 +865,7 @@ while t < 10:
%\fi
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} \cs{diff} renamed to
+% {\linktoplace{sec:mandib}{mandistudent} \cs{diff} renamed to
% \refCom{df} for compatibility with the \pkg{numerica} package}
%\iffalse
%<*example>
@@ -905,9 +890,9 @@ while t < 10:
%\fi
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} All instances of
+% {\linktoplace{sec:mandib}{mandistudent} All instances of
% \texttt{GlowScript} have been changed to \texttt{Web VPython}}
-% \subsection{\WebVPython\ and \VPython\ Program Listings}
+% \subsection{\WebVPython{} and \VPython{} Program Listings}
%
% \href{https://\gsurl}{\WebVPython}
% \footnote{On November 9, 2021 \texttt{GlowScript} was renamed to
@@ -917,7 +902,7 @@ while t < 10:
% \href{https://\vpurl}{VPython}\footnote{\href{https://\vpurl}{https://\vpurl}}
% are programming environments (both use \href{https://www.python.org}{Python})
% frequently used in introductory physics to introduce students
-% for modeling physical systems. \mandi\ makes including code listings
+% for modeling physical systems. \mandi{} makes including code listings
% very simple for students.
%
% \subsection{The \texttt{\small webvpythonblock} Environment}
@@ -931,29 +916,32 @@ while t < 10:
]%
{%
{%
- doc updated = 2022-01-27,%
+ doc updated = 2023-08-01,%
doc name = webvpythonblock,%
doc description = now includes a QR code,%
},%
{%
- doc new = 2022-01-27,%
+ doc updated = 2023-08-01,%
doc name = webvpythonblock*,%
doc description = use this variant to omit QR code,%
},%
}%
Code placed here is nicely formatted and optionally linked to its source on
\href{https://\gsurl}{\WebVPythonorg}, which must be in a public (not private)
- folder. Clicking anywhere in the code window will open the link in the default
- browser. A caption is mandatory, and a label is internally generated. The
- listing always begins on a new page. A URL shortening utility is recommended
- to keep the URL from getting unruly. For convenience, |https://| is
- automatically prepended to the URL and can thus be omitted. The |#| character
- in a URL should not cause problems. The default URL is that of the \WebVPython\
+ folder. Clicking anywhere in the code window (between the black horizontal bars)
+ or on the URL will open the link in the default browser. A caption is mandatory,
+ and a label is internally generated. The listing always begins on a new page.
+ A URL shortening utility is recommended to keep the URL from getting unruly
+ especially if it generates an overfull box error. For convenience, |https://|
+ is automatically prepended to the URL and can be omitted. The |#| character
+ in a URL should not cause problems. The default URL is that of the \WebVPython{}
home page.
\end{docEnvironments}
\begin{dispListing*}{sidebyside = false}
-\begin{webvpythonblock}(tinyurl.com/y3lnqyn3){A \texttt{Web VPython} Program With QR Code}
-GlowScript 3.0 vpython
+\begin{webvpythonblock}
+ (glowscript.org/#/user/heafnerj/folder/mandidemo/program/mandidemo)
+ {Example With QR Code}
+Web VPython 3.2
scene.width = 400
scene.height = 760
@@ -998,8 +986,10 @@ while t < 10:
t = t + deltat
\end{webvpythonblock}
\end{dispListing*}
-\begin{webvpythonblock}(tinyurl.com/y3lnqyn3){A \texttt{Web VPython} Program With QR Code}
-GlowScript 3.0 vpython
+\begin{webvpythonblock}
+ (glowscript.org/#/user/heafnerj/folder/mandidemo/program/mandidemo)
+ {Example With QR Code}
+Web VPython 3.2
scene.width = 400
scene.height = 760
@@ -1056,7 +1046,7 @@ while t < 10:
%<*example>
%\fi
\begin{dispExample*}{sidebyside = false}
- \WebVPython\ program \ref{gs:1} is nice.
+ \WebVPython{} program \ref{gs:1} is nice.
It's called \nameref{gs:1} and is on page \pageref{gs:1}.
\end{dispExample*}
%\iffalse
@@ -1069,8 +1059,10 @@ while t < 10:
%<*example>
%\fi
\begin{dispListing*}{sidebyside = false}
-\begin{webvpythonblock*}(tinyurl.com/y3lnqyn3){A \texttt{Web VPython} Program Without QR Code}
-GlowScript 3.0 vpython
+\begin{webvpythonblock*}
+ (glowscript.org/#/user/heafnerj/folder/mandidemo/program/mandidemo)
+ {Example Without QR Code}
+Web VPython 3.2
scene.width = 400
scene.height = 760
@@ -1115,8 +1107,10 @@ while t < 10:
t = t + deltat
\end{webvpythonblock*}
\end{dispListing*}
-\begin{webvpythonblock*}(tinyurl.com/y3lnqyn3){A \texttt{Web VPython} Program Without QR Code}
-GlowScript 3.0 vpython
+\begin{webvpythonblock*}
+ (glowscript.org/#/user/heafnerj/folder/mandidemo/program/mandidemo)
+ {Example Without QR Code}
+Web VPython 3.2
scene.width = 400
scene.height = 760
@@ -1161,7 +1155,7 @@ while t < 10:
t = t + deltat
\end{webvpythonblock*}
\begin{dispExample*}{sidebyside = false}
- \WebVPython\ program \ref{gs:2} is nice.
+ \WebVPython{} program \ref{gs:2} is nice.
It's called \nameref{gs:2} and is on page \pageref{gs:2}.
\end{dispExample*}
%
@@ -1174,20 +1168,21 @@ while t < 10:
%\iffalse
%<*example>
%\fi
-\begin{docCommand}[doc updated = 2022-01-27]{vpythonfile}
+\begin{docCommand}[doc updated = 2023-08-01]{vpythonfile}
{\oarg{options}(\meta{link})\marg{file}\marg{caption}}
- Command to load and typeset a \VPython\ program, read from local file
- \marg{file}. Clicking anywhere in the code window can optionally open
- a link, passed as an option, in the default browser. A caption is mandatory,
- and a label is internally generated. The listing always begins on a new page.
- A URL shortening utility is recommended to keep the URL from getting unruly.
- For convenience, |https://| is automatically prepended to the URL and can
- thus be omitted. The default URL is that of the \VPython\ home page.
+ Command to load and typeset a \VPython{} program, read from local file
+ \marg{file}. Clicking anywhere in the code window (between the black
+ horizontal bars) or on the URL will open the link in the default browser.
+ A caption is mandatory, and a label is internally generated. The listing
+ always begins on a new page. A URL shortening utility is recommended to
+ keep the URL from getting unruly especially if it generates an overfull
+ box error. For convenience, |https://| is automatically prepended to the
+ URL and can be omitted. The default URL is that of the \VPython{} home page.
\end{docCommand}
\begin{dispListing*}{sidebyside = false}
-\vpythonfile{vdemo.py}{A \VPython\ Program}
+\vpythonfile{vdemo.py}{A \VPython{} Program}
\end{dispListing*}
-\vpythonfile{vdemo.py}{A \VPython\ Program}
+\vpythonfile{vdemo.py}{A \VPython{} Program}
%\iffalse
%</example>
%\fi
@@ -1196,7 +1191,7 @@ while t < 10:
%<*example>
%\fi
\begin{dispExample*}{sidebyside = false}
- \VPython\ program \ref{vp:1} is nice.
+ \VPython{} program \ref{vp:1} is nice.
It's called \nameref{vp:1} and is on page \pageref{vp:1}.
\end{dispExample*}
%
@@ -1227,17 +1222,19 @@ while t < 10:
less than one line long.
\end{docCommands}
\begin{dispExample*}{sidebyside = false}
- \WebVPython\ programs begin with \webvpythoninline{GlowScript 3.0 VPython}
- and \VPython\ programs begin with \vpythoninline{from vpython import *}.
+ \WebVPython{} programs begin with \webvpythoninline{Web VPython 3.2}.
+\end{dispExample*}
+\begin{dispExample*}{sidebyside = false}
+ \VPython{} programs begin with \vpythoninline{from vpython import *}.
\end{dispExample*}
%\iffalse
%</example>
%\fi
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \newgeometry{left=0.50in,right=0.50in,top=1.00in,bottom=1.00in}
-% \subsection{\mandistudent\ Source Code}
+% \subsection{\mandistudent{} Source Code}
%
% \iffalse
%<*package>
@@ -1248,14 +1245,14 @@ while t < 10:
% in the name, that are not for the user to know about.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} Version number works}
+% {\linktoplace{sec:mandib}{mandistudent} Version number works}
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} Code formatted for better readability}
+% {\linktoplace{sec:mandib}{mandistudent} Code formatted for better readability}
% \begin{macrocode}
-\def\mandistudent@version{3.1.0}
-\def\mandistudent@date{2022-01-27}
+\def\mandistudent@version{3.2.0}
+\def\mandistudent@date{2023-08-01}
\NeedsTeXFormat{LaTeX2e}[2020-02-02]
-\DeclareRelease{v3.1.0}{2022-01-27}{mandistudent.sty}
+\DeclareRelease{v3.2.0}{2023-08-01}{mandistudent.sty}
\DeclareCurrentRelease{v\mandistudent@version}{\mandistudent@date}
\ProvidesPackage{mandistudent}
[\mandistudent@date\space v\mandistudent@version\space Macros for introductory physics]
@@ -1269,70 +1266,157 @@ while t < 10:
%
% Load third party packages, documenting why each one is needed.
%
+% AMS goodness. Don't load \pkg{amssymb} or \pkg{amsfonts}.
+%
+% \begin{macrocode}
+\RequirePackage{amsmath}
+% \end{macrocode}
+%
+% We need \pkg{enumitem} for the |physicsproblem| environment.
+%
+% \textsc{beamer} is not compatible with \pkg{enumitem} so if
+% \textsc{beamer} is loaded certain commands are not defined.
+%
+% \begin{macrocode}
+\IfClassLoadedTF{beamer}%
+ {}%
+ {%
+ \RequirePackage[inline]{enumitem}%
+ }%
+% \end{macrocode}
+%
+% We need \pkg{eso-pic} for |\hilite|.
+%
+% \begin{macrocode}
+\RequirePackage{eso-pic}
+% \end{macrocode}
+%
+% We need \pkg{esvect} for nice vector arrows, style g.
+%
% \begin{macrocode}
-\RequirePackage{amsmath} % AMS goodness (don't load amssymb or amsfonts)
-\RequirePackage[inline]{enumitem} % needed for physicsproblem environment
-\RequirePackage{eso-pic} % needed for \hilite
-\RequirePackage[g]{esvect} % needed for nice vector arrow, style g
-\RequirePackage{pgfopts} % needed for key-value interface
-\RequirePackage{iftex} % needed for requiring LuaLaTeX
-\RequirePackage{makebox} % needed for consistent \dirvect; \makebox
-\RequirePackage{mandi}
-\RequirePackage{mathtools} % needed for paired delimiters; extends amsmath
-\RequirePackage{nicematrix} % needed for column and row vectors
-\RequirePackage{qrcode} % needed for QR codes in webvpythonblock
-\qrset{height=1.5cm} % set default size of QR code
-\RequirePackage[most]{tcolorbox} % needed for program listings
-\RequirePackage{tensor} % needed for index notation
-\RequirePackage{tikz} % needed for \hilite
-\usetikzlibrary{shapes,fit,tikzmark} % needed for \hilite
-\RequirePackage{unicode-math} % needed for Unicode support
+\RequirePackage[g]{esvect}
% \end{macrocode}
%
+% We need \pkg{pgfopts} for a key-value interface.
+%
+% \begin{macrocode}
+\RequirePackage{pgfopts}
+% \end{macrocode}
+%
+% We need \pkg{iftex} so we can require \lualatex.
+%
+% \begin{macrocode}
+\RequirePackage{iftex}
+% \end{macrocode}
+%
+% We need \pkg{makebox} for consistent |\dirvect| notation.
+%
+% \begin{macrocode}
+\RequirePackage{makebox}
+% \end{macrocode}
+%
+% We need \mandi{} to load \pkg{mathtools} and \pkg{unicode-math}.
+%
+% \begin{macrocode}
+\IfPackageLoadedTF{mandi}%
+ {}%
+ {%
+ \RequirePackage{mandi}%
+ }%
+% \end{macrocode}
+%
+% We need \pkg{nicematrix} for column and row vectors.
+%
+% \begin{macrocode}
+\RequirePackage{nicematrix}
+% \end{macrocode}
+%
+% We need \pkg{qrcode} for QR codes in |webvpythonblock|.
+%
+% \begin{macrocode}
+\RequirePackage{qrcode}
+% \end{macrocode}
+%
+% Set the default size for QR codes.
+%
+% \begin{macrocode}
+\qrset{height=1.5cm}
+% \end{macrocode}
+%
+% We need \pkg{tcolorbox} for program listings.
+%
+% \begin{macrocode}
+\RequirePackage[most]{tcolorbox}
+% \end{macrocode}
+%
+% We need \pkg{tensor} for index notation.
+%
+% \begin{macrocode}
+\RequirePackage{tensor}
+% \end{macrocode}
+% \begin{macrocode}
+%
+% We need \pkg{tikz} for |\hilite|..
+%
+\RequirePackage{tikz}
+\usetikzlibrary{shapes,fit,tikzmark}
+% \end{macrocode}
+%
+% Load \pkg{xparse} if necessary.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} \pkg{xparse} is loaded for older formats}
+% {\linktoplace{sec:mandib}{mandistudent} \pkg{xparse} is loaded for older formats}
% \begin{macrocode}
-\IfFormatAtLeastTF {2020-10-01} % load xparse if necessary
+\IfFormatAtLeastTF{2020-10-01}
{}%
{\RequirePackage{xparse}}%
-\RequirePackage{hyperref} % load last
-\RequireLuaTeX % require this engine
+% \end{macrocode}
+%
+% Always load \pkg{hyperref} last if possible.
+%
+% \begin{macrocode}
+\RequirePackage{hyperref}
+% \end{macrocode}
+%
+% We require the \lualatex{} engine.
+%
+% \begin{macrocode}
+\RequireLuaTeX
% \end{macrocode}
%
% Set up the fonts to be consistent with ISO 80000-2 notation.
% The \href{https://www.ctan.org/pkg/unicode-math}{\pkg{unicode-math}} package
% loads the \href{https://www.ctan.org/pkg/fontspec}{\pkg{fontspec}} and
% \href{https://www.ctan.org/pkg/xparse}{\pkg{xparse}}
-% packages. Note that \pkg{xparse} is now part of the \LaTeXe\ kernel.
-% Because \pkg{unicode-math} is required, all documents using \mandi\ must
-% be compiled with an engine that supports Unicode. We recommend \lualatex.
+% packages. Note that \pkg{xparse} is now part of the \LaTeXe{} kernel.
+% Because \pkg{unicode-math} is required, all documents using \mandi{} must
+% be compiled with an engine that supports Unicode, and I recommend \lualatex.
%
% \begin{macrocode}
\unimathsetup{math-style=ISO}
-\unimathsetup{warnings-off={mathtools-colon,mathtools-overbracket}}
% \end{macrocode}
%
% Use normal math letters from Latin Modern Math for familiarity with
-% textbooks.
+% textbooks. This gives a better J.
%
% \begin{macrocode}
\setmathfont[Scale=MatchLowercase]
- {Latin Modern Math} % default math font; better J
+ {Latin Modern Math}
% \end{macrocode}
%
-% Borrow from TeX Gyre DejaVu Math for vectors and tensors to get single-storey g.
+% Borrow from TeX Gyre DejaVu Math for vectors and tensors to get
+% single-storey lowercase g.
%
% \begin{macrocode}
\setmathfont[Scale=MatchLowercase,range={sfit/{latin},bfsfit/{latin}}]
- {TeX Gyre DejaVu Math} % single-storey lowercase g
+ {TeX Gyre DejaVu Math}
% \end{macrocode}
%
-% Borrow from TeX Gyre DejaVu Math to get single-storey g.
+% Borrow from TeX Gyre DejaVu Math to get single-storey lowercase g.
%
% \begin{macrocode}
\setmathfont[Scale=MatchLowercase,range={sfup/{latin},bfsfup/{latin}}]
- {TeX Gyre DejaVu Math} % single-storey lowercase g
+ {TeX Gyre DejaVu Math}
% \end{macrocode}
%
% Borrow |mathscr| and |mathbfscr| from XITS Math.\newline
@@ -1349,14 +1433,18 @@ while t < 10:
\setmathfont[Scale=MatchLowercase,range={\mathcal,\mathbfcal},StylisticSet=1]{XITS Math}
% \end{macrocode}
%
-% Borrow Greek sfup and sfit letters from STIX Two Math.
+% Borrow Greek |sfup| and |sfit| letters from STIX Two Math.
% Since this isn't officially supported in \pkg{unicode-math}
% we have to manually set this up.
%
% \begin{macrocode}
\setmathfont[Scale=MatchLowercase,range={"E17C-"E1F6}]{STIX Two Math}
\newfontfamily{\symsfgreek}{STIX Two Math}
-% I don't understand why \text{...} is necessary.
+% \end{macrocode}
+%
+% I don't understand why |\text{...}| is necessary.
+%
+% \begin{macrocode}
\newcommand{\symsfupalpha} {\text{\symsfgreek{^^^^e196}}}
\newcommand{\symsfupbeta} {\text{\symsfgreek{^^^^e197}}}
\newcommand{\symsfupgamma} {\text{\symsfgreek{^^^^e198}}}
@@ -1465,12 +1553,17 @@ while t < 10:
\typeout{mandistudent: This package requires LuaLaTeX.}%
\typeout{mandistudent: This package changes the default math font(s).}%
\typeout{mandistudent: This package redefines the \protect\vec\space command.}%
+\IfClassLoadedTF{beamer}%
+ {%
+ \typeout{mandistudent: BEAMER detected. Certain commands will not be defined.}%
+ }%
+ {}%
\typeout{}%
% \end{macrocode}
%
% A better, intelligent coordinate-free \refCom{vec} command. Note the use of
% the |e{_^}| type of optional argument. This accounts for much of the
-% flexibility and power of this command. Also note the use of the \TeX\
+% flexibility and power of this command. Also note the use of the \TeX{}
% primitives |\sb{}| and |\sp{}|. Why doesn't it work when I put spaces
% around |#3| or |#4|? Because outside of |\ExplSyntaxOn...\ExplSyntaxOff|,
% the |_| character has a different catcode and is treated as a mathematical
@@ -1479,28 +1572,22 @@ while t < 10:
% See also \url{https://tex.stackexchange.com/a/531037/218142}.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} \refCom{vec}%
+% {\linktoplace{sec:mandib}{mandistudent} \refCom{vec}%
% no longer adds \cs{scriptspace} when no sub/superscript is given}
% \begin{macrocode}
\RenewDocumentCommand{\vec}{ s m e{_^} }%
{%
- % Note the \, used to make superscript look better.
\IfBooleanTF{#1}
{%
- \vv{#2}% % * gives an arrow
- % Use \sp{} primitive for superscript.
- % Adjust superscript for the arrow.
+ \vv{#2}%
\IfValueT{#4}%
{\sp{\,#4\vphantom{\smash[t]{\big|}}}}
}%
{%
- \symbfit{#2} % no * gives us bold
- % Use \sp{} primitive for superscript.
- % No superscript adjustment needed.
+ \symbfit{#2}
\IfValueT{#4}%
{\sp{#4\vphantom{\smash[t]{\big|}}}}
}%
- % Use \sb{} primitive for subscript.
\IfValueT{#3}%
{\sb{#3\vphantom{\smash[b]{|}}}}
}%
@@ -1513,7 +1600,7 @@ while t < 10:
% See \url{https://tex.stackexchange.com/a/391204/218142}.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} \refCom{dirvec}%
+% {\linktoplace{sec:mandib}{mandistudent} \refCom{dirvec}%
% no longer adds \cs{scriptspace} when no sub/superscript is given}
% \begin{macrocode}
\NewDocumentCommand{\dirvec}{ s m e{_^} }%
@@ -1555,7 +1642,7 @@ while t < 10:
% See \url{https://tex.stackexchange.com/a/39054/218142}.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} \LaTeX3 code now conforms to formatting standards}
+% {\linktoplace{sec:mandib}{mandistudent} \LaTeX3 code now conforms to formatting standards}
% \begin{macrocode}
\ExplSyntaxOn
\NewDocumentCommand{\colvec}{ O{,} m }
@@ -1621,34 +1708,41 @@ while t < 10:
% \end{macrocode}
%
% An environment for problem statements. The starred variant gives
-% in-line lists.
+% in-line lists. These are not defined if \textsc{beamer} is loaded.
%
+% \changes{v3.2.0}{2023-08-01}
+% {\linktoplace{sec:mandib}{mandistudent} \refEnv{physicsproblem} and
+% \refEnv{physicsproblem*} are not defined if \textsc{beamer} is loaded}
% \begin{macrocode}
-\NewDocumentEnvironment{physicsproblem}{ m }%
- {%
- \newpage%
- \section*{#1}%
- \newlist{parts}{enumerate}{2}%
- \setlist[parts]{label=\bfseries(\alph*)}%
- }%
+\IfClassLoadedTF{beamer}
{}%
-\NewDocumentEnvironment{physicsproblem*}{ m }%
{%
- \newpage%
- \section*{#1}%
- \newlist{parts}{enumerate*}{2}%
- \setlist[parts]{label=\bfseries(\alph*)}%
+ \NewDocumentEnvironment{physicsproblem}{ m }%
+ {%
+ \newpage%
+ \section*{#1}%
+ \newlist{parts}{enumerate}{2}%
+ \setlist[parts]{label=\bfseries(\alph*)}%
+ }%
+ {}%
+ \NewDocumentEnvironment{physicsproblem*}{ m }%
+ {%
+ \newpage%
+ \section*{#1}%
+ \newlist{parts}{enumerate*}{2}%
+ \setlist[parts]{label=\bfseries(\alph*)}%
+ }%
+ {}%
+ \NewDocumentCommand{\problempart}{}{\item}%
}%
- {}%
-\NewDocumentCommand{\problempart}{}{\item}%
% \end{macrocode}
%
-% An environment for problem solutions.
+% An environment for problem solutions. Equation numbering
+% is consecutive through the document.
%
% \begin{macrocode}
\NewDocumentEnvironment{physicssolution}{ +b }%
{%
- % Make equation numbering consecutive through the document.
\begin{align}
#1
\end{align}
@@ -1656,7 +1750,6 @@ while t < 10:
{}%
\NewDocumentEnvironment{physicssolution*}{ +b }%
{%
- % Make equation numbering consecutive through the document.
\begin{align*}
#1
\end{align*}
@@ -1664,7 +1757,7 @@ while t < 10:
{}%
% \end{macrocode}
%
-% See \url{https://tex.stackexchange.com/q/570223/218142}.
+% See \url{https://tex.stackexchange.com/q/570223/218142}.
%
% \begin{macrocode}
\NewDocumentCommand{\reason}{ O{4cm} m }%
@@ -1674,14 +1767,18 @@ while t < 10:
% \end{macrocode}
%
% Command for highlighting parts of, or entire, mathematical expressions.\newline
-% See \url{https://texample.net/tikz/examples/beamer-arrows/}.\newline
-% See also \url{https://tex.stackexchange.com/a/406084/218142}.\newline
-% See also \url{https://tex.stackexchange.com/a/570858/218142}.\newline
-% See also \url{https://tex.stackexchange.com/a/570789/218142}.\newline
-% See also \url{https://tex.stackexchange.com/a/79659/218142}.\newline
-% See also \url{https://tex.stackexchange.com/q/375032/218142}.\newline
-% See also \url{https://tex.stackexchange.com/a/571744/218142}%
-%
+% This command is not defined if \textsc{beamer} is loaded.\newline
+% See \url{https://texample.net/tikz/examples/beamer-arrows/}.\newline
+% See also \url{https://tex.stackexchange.com/a/406084/218142}.\newline
+% See also \url{https://tex.stackexchange.com/a/570858/218142}.\newline
+% See also \url{https://tex.stackexchange.com/a/570789/218142}.\newline
+% See also \url{https://tex.stackexchange.com/a/79659/218142}.\newline
+% See also \url{https://tex.stackexchange.com/q/375032/218142}.\newline
+% See also \url{https://tex.stackexchange.com/a/571744/218142}%
+%
+% \changes{v3.2.0}{2023-08-01}
+% {\linktoplace{sec:mandib}{mandistudent} \refCom{hilite} is
+% not defined if \textsc{beamer} is loaded}
% \begin{macrocode}
\newcounter{tikzhighlightnode}
\NewDocumentCommand{\hilite}{ O{magenta!60} m O{rectangle} }%
@@ -1705,7 +1802,7 @@ while t < 10:
% See \url{https://tex.stackexchange.com/a/614478/218142}.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} Slightly modified \refCom{image}}
+% {\linktoplace{sec:mandib}{mandistudent} Slightly modified \refCom{image}}
% \begin{macrocode}
\NewDocumentCommand{\image}{ O{scale=1} m m m }%
{%
@@ -1725,10 +1822,11 @@ while t < 10:
% notations. Use starred form for index notation, unstarred form for
% coordinate-free.
%
+% Consider renaming these to |\vectorsym| and |\tensorsym|.
+%
% \begin{macrocode}
\NewDocumentCommand{\veccomp}{ s m }%
{%
- % Consider renaming this to \vectorsym.
\IfBooleanTF{#1}
{%
\symnormal{#2}%
@@ -1739,7 +1837,6 @@ while t < 10:
}%
\NewDocumentCommand{\tencomp}{ s m }%
{%
- % Consider renaming this to \tensororsym.
\IfBooleanTF{#1}%
{%
\symsfit{#2}%
@@ -1782,28 +1879,48 @@ while t < 10:
% \end{macrocode}
%
% Intelligent slot command for coordinate-free tensor notation.
+% |d[]| must be used because of the way consecutive optional
+% arguments are handled. See \pkg{xparse} docs for details.
%
% \begin{macrocode}
\NewDocumentCommand{\slot}{ s d[] }%
{%
- % d[] must be used because of the way consecutive optional
- % arguments are handled. See xparse docs for details.
\IfBooleanTF{#1}
{%
\IfValueTF{#2}
- {% Insert a vector, but don't show the slot.
+% \end{macrocode}
+%
+% Insert a vector, but don't show the slot.
+%
+% \begin{macrocode}
+ {%
\smash{\makebox[1.5em]{\ensuremath{#2}}}
}%
- {% No vector, no slot.
+% \end{macrocode}
+%
+% No vector, no slot.
+%
+% \begin{macrocode}
+ {%
\smash{\makebox[1.5em]{\ensuremath{}}}
}%
}%
{%
\IfValueTF{#2}
- {% Insert a vector and show the slot.
+% \end{macrocode}
+%
+% Insert a vector and show the slot.
+%
+% \begin{macrocode}
+ {%
\underline{\smash{\makebox[1.5em]{\ensuremath{#2}}}}
}%
- {% No vector; just show the slot.
+% \end{macrocode}
+%
+% No vector; just show the slot.
+%
+% \begin{macrocode}
+ {%
\underline{\smash{\makebox[1.5em]{\ensuremath{}}}}
}%
}%
@@ -1843,36 +1960,39 @@ while t < 10:
% \href{https://www.ctan.org/pkg/tcolorbox}{\pkg{tcolorbox}}.\newline
% See \url{https://tex.stackexchange.com/a/529421/218142}.
%
+% We set a new font for listings and some new colors (background gray, gray,
+% green, orange, peach, pearl, and plum).
+%
% \begin{macrocode}
-\newfontfamily{\gsfontfamily}{DejaVuSansMono} % new font for listings
-\definecolor{gsbggray} {rgb}{0.90,0.90,0.90} % background gray
-\definecolor{gsgray} {rgb}{0.30,0.30,0.30} % gray
-\definecolor{gsgreen} {rgb}{0.00,0.60,0.00} % green
-\definecolor{gsorange} {rgb}{0.80,0.45,0.12} % orange
-\definecolor{gspeach} {rgb}{1.00,0.90,0.71} % peach
-\definecolor{gspearl} {rgb}{0.94,0.92,0.84} % pearl
-\definecolor{gsplum} {rgb}{0.74,0.46,0.70} % plum
+\newfontfamily{\gsfontfamily}{DejaVuSansMono}
+\definecolor{gsbggray} {rgb}{0.90,0.90,0.90}
+\definecolor{gsgray} {rgb}{0.30,0.30,0.30}
+\definecolor{gsgreen} {rgb}{0.00,0.60,0.00}
+\definecolor{gsorange} {rgb}{0.80,0.45,0.12}
+\definecolor{gspeach} {rgb}{1.00,0.90,0.71}
+\definecolor{gspearl} {rgb}{0.94,0.92,0.84}
+\definecolor{gsplum} {rgb}{0.74,0.46,0.70}
\lstdefinestyle{vpython}%
- {% % style for listings
- backgroundcolor=\color{gsbggray},% % background color
- basicstyle=\colordigits\footnotesize,% % default style
- breakatwhitespace=true% % break at whitespace
- breaklines=true,% % break long lines
- captionpos=b,% % position caption
- classoffset=1,% % STILL DON'T UNDERSTAND THIS
- commentstyle=\color{gsgray},% % font for comments
- deletekeywords={print},% % delete keywords from the given language
- emph={self,cls,@classmethod,@property},% % words to emphasize
- emphstyle=\color{gsorange}\itshape,% % font for emphasis
+ {%
+ backgroundcolor=\color{gsbggray},% % background color
+ basicstyle=\colordigits\footnotesize,% % default style
+ breakatwhitespace=true% % break at whitespace
+ breaklines=true,% % break long lines
+ captionpos=b,% % position caption
+ classoffset=1,% % STILL DON'T UNDERSTAND THIS
+ commentstyle=\color{gsgray},% % font for comments
+ deletekeywords={print},% % delete keywords from the given language
+ emph={self,cls,@classmethod,@property},% % words to emphasize
+ emphstyle=\color{gsorange}\itshape,% % font for emphasis
escapeinside={(*@}{@*)},% % add LaTeX within your code
- frame=tb,% % frame style
- framerule=2.0pt,% % frame thickness
- framexleftmargin=5pt,% % extra frame left margin
- %identifierstyle=\sffamily,% % style for identifiers
- keywordstyle=\gsfontfamily\color{gsplum},% % color for keywords
- language=Python,% % select language
- linewidth=\linewidth,% % width of listings
- morekeywords={% % VPython/Web VPython specific keywords
+ frame=tb,% % frame style
+ framerule=2.0pt,% % frame thickness
+ framexleftmargin=5pt,% % extra frame left margin
+ %identifierstyle=\sffamily,% % style for identifiers
+ keywordstyle=\gsfontfamily\color{gsplum},% % color for keywords
+ language=Python,% % select language
+ linewidth=\linewidth,% % width of listings
+ morekeywords={% % VPython/Web VPython specific keywords
__future__,abs,acos,align,ambient,angle,append,append_to_caption,%
append_to_title,arange,arrow,asin,astuple,atan,atan2,attach_arrow,%
attach_trail,autoscale,axis,background,billboard,bind,black,blue,border,%
@@ -1896,18 +2016,18 @@ while t < 10:
texture,textures,thickness,title,trail_color,trail_object,trail_radius,%
trail_type,triangle,trigger,True,twist,unbind,up,upper_left,upper_right,%
userpan,userspin,userzoom,vec,vector,vertex,vertical_spacing,visible,%
- visual,vpython,VPython,waitfor,WebVPython,white,width,world,xtitle,%
+ visual,vpython,VPython,waitfor,Web,VPython,white,width,world,xtitle,%
yellow,yoffset,ytitle%
},%
- morekeywords={print,None,TypeError},% % additional keywords
- morestring=[b]{"""},% % treat triple quotes as strings
- numbers=left,% % where to put line numbers
- numbersep=10pt,% % how far line numbers are from code
- numberstyle=\bfseries\tiny,% % set to 'none' for no line numbers
- showstringspaces=false,% % show spaces in strings
- showtabs=false,% % show tabs within strings
- stringstyle=\gsfontfamily\color{gsgreen},% % color for strings
- upquote=true,% % how to typeset quotes
+ morekeywords={print,None,TypeError},% % additional keywords
+ morestring=[b]{"""},% % treat triple quotes as strings
+ numbers=left,% % where to put line numbers
+ numbersep=10pt,% % how far line numbers are from code
+ numberstyle=\bfseries\tiny,% % set to 'none' for no line numbers
+ showstringspaces=false,% % show spaces in strings
+ showtabs=false,% % show tabs within strings
+ stringstyle=\gsfontfamily\color{gsgreen},% % color for strings
+ upquote=true,% % how to typeset quotes
}%
% \end{macrocode}
%
@@ -1915,10 +2035,13 @@ while t < 10:
% See \url{https://tex.stackexchange.com/a/232208/218142}.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} URLs fixed in \refEnv{webvpythonblock}}
+% {\linktoplace{sec:mandib}{mandistudent} URLs fixed in \refEnv{webvpythonblock}}
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} \refEnv{webvpythonblock} now automatically
+% {\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}
% \begin{macrocode}
\AtBeginEnvironment{webvpythonblock}{\catcode`\#=12}
\AtEndEnvironment{webvpythonblock}{\catcode`\#=6}
@@ -1939,8 +2062,9 @@ while t < 10:
title = \begin{minipage}{1.5cm}%
\protect\qrcode*{https://#2}%
\end{minipage}\hspace{5mm}%
- \begin{minipage}{0.7\textwidth}%
- \texttt{Web VPython} Program \thetcbcounter: #3%
+ \begin{minipage}{0.8\textwidth}%
+ \texttt{Web VPython} Program \thetcbcounter: #3\\
+ \footnotesize{\href{https://#2}{\color{white}{https://#2}}}%
\end{minipage},%
width = 0.9\textwidth,%
{#1},
@@ -1950,8 +2074,11 @@ while t < 10:
% Here is a variant that omits the QR code.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} \refEnv{webvpythonblock*} is a variant
+% {\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}
@@ -1970,13 +2097,14 @@ while t < 10:
listing only,%
listing style = vpython,%
nameref = {#3},%
- title = \texttt{Web VPython} Program \thetcbcounter: #3,%
+ title = \texttt{Web VPython} Program \thetcbcounter: #3\\%
+ \footnotesize{\href{https://#2}{\color{white}{https://#2}}},%
width = 0.9\textwidth,%
{#1},
}%
% \end{macrocode}
%
-% A new command for generating a list of \WebVPython\ programs.
+% A new command for generating a list of \WebVPython{} programs.
%
% \begin{macrocode}
\NewDocumentCommand{\listofwebvpythonprograms}{}%
@@ -1989,10 +2117,13 @@ while t < 10:
% See \url{https://tex.stackexchange.com/q/616205/218142}.
%
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} URLs fixed in \refCom{vpythonfile}}
+% {\linktoplace{sec:mandib}{mandistudent} URLs fixed in \refCom{vpythonfile}}
% \changes{v3.1.0}{2022-01-27}
-% {\linktoplace{sec:mandistudentpkg}{mandistudent} Default URL for \refCom{vpythonfile}
+% {\linktoplace{sec:mandib}{mandistudent} Default URL for \refCom{vpythonfile}
% is now \vpurl}
+% \changes{v3.2.0}{2023-08-01}
+% {\linktoplace{sec:mandib}{mandistudent} \refCom{vpythonfile} now shows
+% URL in header}
% \begin{macrocode}
\newcommand*{\vpythonfile}{\catcode`\#=12 \vpythonfile@auxA}
\NewDocumentCommand{\vpythonfile@auxA}{ O{} D(){vpython.org} m m }%
@@ -2022,7 +2153,7 @@ while t < 10:
}%
% \end{macrocode}
%
-% A new command for generating a list of \VPython\ programs.
+% A new command for generating a list of \VPython{} programs.
%
% \begin{macrocode}
\NewDocumentCommand{\listofvpythonprograms}{}%
@@ -2054,7 +2185,7 @@ while t < 10:
{\lstinline[style = vpython]{#1}}%
% \end{macrocode}
%
-% Define \refCom{vpythoninline}, a semantic alias for \VPython\
+% Define \refCom{vpythoninline}, a semantic alias for \VPython{}
% in-line listings.
%
% \begin{macrocode}
diff --git a/macros/unicodetex/latex/fontsetup/README b/macros/unicodetex/latex/fontsetup/README
index 2c6b3916cd..472a898d2f 100644
--- a/macros/unicodetex/latex/fontsetup/README
+++ b/macros/unicodetex/latex/fontsetup/README
@@ -1,5 +1,5 @@
The fontsetup package
- (Version 1.5, GPL3)
+ (Version 1.6, GPL3)
This simple package makes it trivial to switch quickly between
different quality fonts supporting Mathematics.
diff --git a/macros/unicodetex/latex/fontsetup/doc/fontsetup-doc.pdf b/macros/unicodetex/latex/fontsetup/doc/fontsetup-doc.pdf
index 5b0cedc0dc..6b90a5bab1 100644
--- a/macros/unicodetex/latex/fontsetup/doc/fontsetup-doc.pdf
+++ b/macros/unicodetex/latex/fontsetup/doc/fontsetup-doc.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/fontsetup/doc/fontsetup-doc.tex b/macros/unicodetex/latex/fontsetup/doc/fontsetup-doc.tex
index f56fcc39c9..870bc36f03 100644
--- a/macros/unicodetex/latex/fontsetup/doc/fontsetup-doc.tex
+++ b/macros/unicodetex/latex/fontsetup/doc/fontsetup-doc.tex
@@ -14,8 +14,8 @@
\textit{by}\\[1ex]
{\large Antonis Tsolomitis}\\
University of the Aegean\\ Department of Mathematics\\[1ex]
- \textsc{28} July \textsc{2023}\\[1ex]
- Version 1.5, \textsc{gpl3}
+ \textsc{2} August \textsc{2023}\\[1ex]
+ Version 1.6, \textsc{gpl3}
\end{center}
This package is a simple wrapper-type package that makes the setup of fonts easy and
diff --git a/macros/unicodetex/latex/fontsetup/fspeulerot.sty b/macros/unicodetex/latex/fontsetup/fspeulerot.sty
index 3be2bc9f5f..55442dfe1c 100644
--- a/macros/unicodetex/latex/fontsetup/fspeulerot.sty
+++ b/macros/unicodetex/latex/fontsetup/fspeulerot.sty
@@ -4,58 +4,25 @@
\setmainfont[ItalicFont=cmunoti.otf,
BoldFont=cmunobx.otf,
BoldItalicFont=cmunobi.otf,
- % RawFeature=+pnum,% variable width numbers
-SmallCapsFeatures={Numbers=OldStyle}]{cmunorm.otf}
+ % RawFeature=+pnum,% variable width numbers
+ SmallCapsFeatures={Numbers=OldStyle}]{cmunorm.otf}
\defaultfontfeatures{Scale=MatchLowercase}
%\setmathfont{LibertinusMath-Regular.otf}
-\setmathfont{texgyrepagella-math.otf}
+\setmathfont{euler-math.otf}
+%Get missing glyphs (in euler-math) from Tex Gyre Pagella Math
\setmathfont[%
- range={"21-"7E,"A0,"A3,"A5,"A7-"A8,"AC,"AE-"AF,"B1,"B4-"B7,"D7,"F0,"F7,"127,
- "131,"1B5,"237,"2C6-"2C7,"2D8-"2DA,"2DC,"300-"30C,"30F,"311,"323-"325,"32E-"332,"338,
- "34D,"391-"3A1,"3A3-"3A9,"3B1-"3C1,"3C3-"3C9,"3D1,"3D5-"3D6,"3F0,"3F4-"3F6,"2000-"200A,
- "2010-"2016,"2018-"2019,"2020-"2022,"2026,"2030-"2037,"2044,"2057,"20AC,"20D0-"20D2,
- "20D5-"20D7,"20DB-"20DF,"20E1,"20E4,"20E8-"20E9,"20EC-"20F0,"2102,"2107,"210B-"2113,
- "2115,"2118-"211D,"2124,"2126-"2128,"212B-"212D,"2130-"2133,"2135-"2138,"213C-"2141,
- "214B,"2190-"219B,"219E-"21A7,"21A9-"21AE,"21B0-"21B3,"21B6-"21B7,"21BA-"21DD,
- "21E0-"21E3,"21E6-"21E9,"21F5-"21F6,"2200-"22AF,"22B2-"22F1,"2300,"2305-"2306,
- "2308-"230B,"2310,"2319,"231C-"2323,"2329-"232A,"239B-"23B1,"23B4-"23B5,"23B7,
- "23DC-"23DF,"2422-"2423,"24C7-"24C8,"25A0-"25A1,"25AA-"25AD,"25B2-"25B9,
- "25BC-"25C3,"25C6-"25C7,"25CA-"25CB,"25CF,"25E6,"25EF,"25FB-"25FE,"2605,"2660-"2667,
- "266D-"266F,"26AA-"26AC,"2713,"2720,"27C2,"27CB,"27CD,"27D8-"27DE,"27E0-"27E3,
- "27E6-"27EB,"27F4-"27FF,"2906-"2907,"2933,"2980-"2981,"29EB,"29F5,"2A00-"2A06,"2A09,
- "2A0C,"2A11,"2A1D,"2A2F,"2A3F,"2A5E-"2A5F,"2A7D-"2A7E,"2A85-"2A8C,"2A95-"2A96,
- "2A9B-"2A9C,"2AAF-"2ABA,"2AC5-"2AC6,"2ACB-"2ACC,"2AF9-"2AFA,"2B1A-"2B1E,"2B24-"2B2B,
- "2B31,"2B33,"2B3F,"E010-"E01F,"E021,"E045-"E048,"E08D-"E08F,"E098-"E099,"E09C-"E09F,
- "E0A2-"E0AF,"E0C0-"E0C9,"E0CB,"E0D0-"E0D9,"E0DB,"E143-"E14D,"E1D3-"E1D4,"E1E3,
- "E1F3,"E223,"E22A-"E22B,"E22E-"E22F,"E233,"E243,"E253,"E263,"E283,"E293,"E2A3,
- "E311-"E318,"E321-"E328,"E331-"E338,"E341-"E348,"E351-"E358,"E35A-"E35F,"E361-"E368,
- "E371-"E378,"E381-"E388,"E391-"E398,"E3A1-"E3A4,"E3AA-"E3AB,"E3D1-"E3D4,"E3D9,
- "E3E1-"E3E4,"E3E9,"E3F1-"E3F4,"E3F9,"E4A0-"E4BB,"E4BD-"E4C7,"E500-"E507,"E50E-"E517,
- "E520-"E527,"E530-"E544,"E551-"E554,"E561-"E564,"E570-"E57F,"E581-"E584,"E590-"E591,
- "E593-"E596,"E598-"E599,"E59B-"E59E,"E5A0-"E5B1,"E5B3,"E5B8-"E5BA,"E5BF-"E5CF,
- "E741-"E75A,"E761-"E77A,"E800-"E809,"E80B,"E810-"E819,"E820-"E853,"E856,"E862,"E867,
- "E86A,"E86D,"E86F,"E871,"E873-"E874,"E876,"E878-"E882,"E884-"E885,"E887-"E893,
- "E8A0-"E8D3,"E8D5-"E8DC,"E8E0-"E8F9,"E900-"E909,"E90B,"E910-"E919,"E920-"E953,
- "E958-"E95A,"E962-"E963,"E967,"E96A,"E96D,"E96F,"E971,"E973-"E974,"E976-"E986,
- "E988-"E995,"E9A0-"E9D3,"E9D5-"E9DA,"E9DE-"E9F9,"EA00-"EA01,"EA05-"EA0B,"EA0D-"EA14,
- "EA16-"EA19,"EA1C-"EA1E,"EA21,"EA23,"EA25,"EA27,"EA29-"EA36,"EA38,"EA3B,"EA3D-"EA4B,
- "EA50-"EA61,"EA6C-"EA6F,"EA71-"EA7B,"EA7F-"EA81,"EA85-"EA86,"EA88-"EA90,"EA99-"EA9A,
- "EAA8-"EAAA,"EAAC-"EAAD,"EABE-"EACF,"EAD8-"EAD9,"EADD-"EADF,"EB00-"EB0E,"EB10-"EB14,
- "EB20-"EB23,"EB30-"EB33,"EC00-"EC09,"EC0B,"EC10-"EC19,"EC20-"EC53,"EC56,"EC62,"EC67,
- "EC6A,"EC6D,"EC6F,"EC71,"EC73-"EC74,"EC76,"EC78-"EC82,"EC84-"EC85,"EC87-"EC93,
- "ECA0-"ECD3,"ECD5-"ECDC,"ECE0-"ECF9,"ED00-"ED09,"ED0B,"ED10-"ED19,"ED20-"ED53,
- "ED58-"ED5A,"ED62-"ED63,"ED67,"ED6A,"ED6D,"ED6F,"ED71,"ED73-"ED74,"ED76-"ED86,
- "ED88-"ED95,"EDA0-"EDD3,"EDD5-"EDDA,"EDDE-"EDF9,"EE00-"EE01,"EE05-"EE0B,"EE0D-"EE14,
- "EE16-"EE19,"EE1C-"EE1E,"EE21,"EE23,"EE25,"EE27,"EE29-"EE36,"EE38,"EE3B,"EE3D-"EE41,
- "EE60-"EE61,"EE6C-"EE6F,"EE71-"EE76,"EE7A-"EE7B,"EE7F-"EE81,"EE86,"EE88-"EE8B,
- "EE99-"EE9A,"EEA8-"EEAA,"EEAC-"EEAD,"EEBE-"EECF,"EED8-"EED9,"EEDD-"EEDF,
- "1D400-"1D49C,"1D49E-"1D49F,"1D4A2,"1D4A5-"1D4A6,"1D4A9-"1D4AC,"1D4AE-"1D4B5,
- "1D4D0-"1D4E9,"1D504-"1D505,"1D507-"1D50A,"1D50D-"1D514,"1D516-"1D51C,"1D51E-"1D539,
- "1D53B-"1D53E,"1D540-"1D544,"1D546,"1D54A-"1D550,"1D552-"1D6A5,"1D6A8-"1D6D2,
- "1D6D4-"1D6DF,"1D6E1-"1D70C,"1D70E-"1D719,"1D71B-"1D746,"1D748-"1D753,"1D755-"1D789,
- "1D790-"1D7C3,"1D7CE-"1D7FF}]{Euler-Math.otf}
+ range={"00A2,"00A6,"00A9,"00AB,"00B0,"00B8,"00BB,"00BF,"00C0-"00D6,"00D8-"00EF,
+ "00F1-"00F6,"00F8-"0107,"010C-"0126,"0128-"130,"0132-"01B4,"0218-"021B,
+ "02DB,"02DD,"0326,"032C,"032D,"0333,"033F,"03C2,"03F1,"0E3F,"1EA0-"1EF9,
+ "2017,"201A,"201C-"201D,"2039-"203D,"2052,"2061,"20A1,"20AB,"20B1,"20B2,
+ "20D3,"20D4,"20D8,"20DC,"20DB,"20D5,"20D6,"20EA,"20EB,"2103,"2109,"210A,
+ "2116,"2117,"211E-"2122,"212A,"212E,"212F,"2134,"2145,"2149,"21B4,"21B5,
+ "21F3,"23B2,"23B3,"23D0,"23E0,"23E1,"2500-"259F,"266A,"26AD,"26AE,"27A1,
+ "27EE,"27EF,"2B04-"2B07,"2B0C,"2B0D,"2E18,"3016,"3017,"01D4B6-"01D4CF,
+ "01D4EA-"01D503,"01D6D3-"01D6E0,"01D70D-"01D71A,"01D747-"01D754,
+ "01D78A-"01D78F,"01D764-"01D7C9}]{texgyrepagella-math.otf}
\setmathfont[range=up/{greek,Greek}, script-features={}, sscript-features={}
]{Euler-Math.otf}
\setmathfont[range=up/{latin,Latin,num}, script-features={}, sscript-features={}
diff --git a/macros/xetex/latex/bidi/README b/macros/xetex/latex/bidi/README
index 60fcee8d1c..29b3fad76c 100644
--- a/macros/xetex/latex/bidi/README
+++ b/macros/xetex/latex/bidi/README
@@ -1,6 +1,6 @@
___________________
The bidi package
-v39.7
+v39.8
This package provides a convenient interface for typesetting
bidirectional texts in Plain TeX and LaTeX, using XeTeX engine.
@@ -25,7 +25,7 @@ The announcements for the new releases of the package will
also appear in the Discussions space under the Announcements
category.
-Current version release date: 2023/01/18
+Current version release date: 2023/08/02
___________________________________________
Vafa Khalighi
diff --git a/macros/xetex/latex/bidi/bidi-doc-intro.ltx b/macros/xetex/latex/bidi/bidi-doc-intro.ltx
index 91de6e02ef..cfea0b9ca2 100644
--- a/macros/xetex/latex/bidi/bidi-doc-intro.ltx
+++ b/macros/xetex/latex/bidi/bidi-doc-intro.ltx
@@ -20,7 +20,7 @@ If you use \textsf{bidi} package to write any input \TeX\ document, and then run
* Copyright (c) 2007--2023 Vafa Khalighi
* Copyright (c) 2018--2020 bidi-tex GitHub Organization
*
-* v39.7 (Release Serge Lang), 2023/01/18
+* v39.8 (Release Donald Ervin Knuth), 2023/08/02
*
* License: LaTeX Project Public License, version
* 1.3c or higher (your choice)
diff --git a/macros/xetex/latex/bidi/bidi-doc-title.ltx b/macros/xetex/latex/bidi/bidi-doc-title.ltx
index 49d6163ff2..91bb5e5ed6 100644
--- a/macros/xetex/latex/bidi/bidi-doc-title.ltx
+++ b/macros/xetex/latex/bidi/bidi-doc-title.ltx
@@ -3,7 +3,7 @@
\begin{document}
\title{\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}\\
\LARGE Bidirectional typesetting in plain \TeX{} and \LaTeX, using \XeTeX{} engine\\[5pt]
-\large User documentation for \textcolor{blue!65!black}{version 39.7}}
+\large User documentation for \textcolor{blue!65!black}{version 39.8}}
\author{Vafa Khalighi\thanks{Thanks to the bidi-tex GitHub organization consisted of David Carlisle and other members of the {\LaTeX} team to maintain the package in the period 2018--2020.}}
\setcounter{page}{0}
\thispagestyle{empty}
@@ -13,7 +13,7 @@
\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}
\Large
-User documentation for \textcolor{blue!65!black}{version 39.7}}
+User documentation for \textcolor{blue!65!black}{version 39.8}}
\vskip 0pt plus 3fill
\textit{\large to my Master, \textbf{Ferdowsi The Great}}
diff --git a/macros/xetex/latex/bidi/bidi-doc.ltx b/macros/xetex/latex/bidi/bidi-doc.ltx
index 76d56ae9ef..d14af80d44 100644
--- a/macros/xetex/latex/bidi/bidi-doc.ltx
+++ b/macros/xetex/latex/bidi/bidi-doc.ltx
@@ -1,7 +1,7 @@
\documentclass{ltxdoc}
\input{bidi-doc-preamble.ltx}
\hypersetup{%
- pdftitle={User documentation for version 39.7 of the bidi
+ pdftitle={User documentation for version 39.8 of the bidi
package}%
}
\begin{document}
diff --git a/macros/xetex/latex/bidi/bidi-doc.pdf b/macros/xetex/latex/bidi/bidi-doc.pdf
index c861748d85..ce2217e82f 100644
--- a/macros/xetex/latex/bidi/bidi-doc.pdf
+++ b/macros/xetex/latex/bidi/bidi-doc.pdf
Binary files differ
diff --git a/macros/xetex/latex/bidi/bidi.dtx b/macros/xetex/latex/bidi/bidi.dtx
index a24d9572f4..b18945de1e 100644
--- a/macros/xetex/latex/bidi/bidi.dtx
+++ b/macros/xetex/latex/bidi/bidi.dtx
@@ -5,7 +5,7 @@
%<*readme>
___________________
The bidi package
-v39.7
+v39.8
This package provides a convenient interface for typesetting
bidirectional texts in Plain TeX and LaTeX, using XeTeX engine.
@@ -30,7 +30,7 @@ The announcements for the new releases of the package will
also appear in the Discussions space under the Announcements
category.
-Current version release date: 2023/01/18
+Current version release date: 2023/08/02
___________________________________________
Vafa Khalighi
@@ -267,7 +267,7 @@ by Vafa Khalighi.
\documentclass{ltxdoc}
\input{bidi-doc-preamble.ltx}
\hypersetup{%
- pdftitle={Source documentation for version 39.7 of the bidi
+ pdftitle={Source documentation for version 39.8 of the bidi
package}%
}
\EnableCrossrefs
@@ -286,7 +286,7 @@ by Vafa Khalighi.
% \GetFileInfo{\jobname.dtx}
% \title{\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}\\
%\LARGE Bidirectional typesetting in plain \TeX{} and \LaTeX, using \XeTeX{} engine\\[5pt]
-%\large Source documentation for \textcolor{blue!65!black}{version 39.7}}
+%\large Source documentation for \textcolor{blue!65!black}{version 39.8}}
% \author{Vafa Khalighi\thanks{Thanks to the bidi-tex GitHub organization consisted of David Carlisle and other members of the {\LaTeX} team to maintain the package in the period 2018--2020.}}
%\setcounter{page}{0}
%\thispagestyle{empty}
@@ -296,7 +296,7 @@ by Vafa Khalighi.
%\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}
%
%\Large
-%Source documentation for \textcolor{blue!65!black}{version 39.7}}
+%Source documentation for \textcolor{blue!65!black}{version 39.8}}
%
%\vskip 0pt plus 3fill
%\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -345,7 +345,7 @@ by Vafa Khalighi.
%\iffalse
%<*table>
%\fi
-%% \CheckSum{58794}
+%% \CheckSum{58884}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -1989,7 +1989,35 @@ by Vafa Khalighi.
%\fi
% \section{File \texttt{beamerbaseauxtemplates-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{beamerbaseauxtemplates-xetex-bidi.def}[2022/06/06 v0.2 bidi adaptations for beamerbaseauxtemplates package for XeTeX engine]
+\ProvidesFile{beamerbaseauxtemplates-xetex-bidi.def}[2023/08/02 v0.3 bidi adaptations for beamerbaseauxtemplates package for XeTeX engine]
+\bidi@csundef{beamer@@tmpop@subsection in toc@sections numbered}
+
+\bidi@csundef{beamer@@tmpop@subsubsection in toc@sections numbered}
+
+\bidi@csundef{beamer@@tmpop@section in toc@subsections numbered}
+
+\bidi@csundef{beamer@@tmpop@subsection in toc@subsections numbered}
+
+\bidi@csundef{beamer@@tmpop@subsubsection in toc@subsections numbered}
+
+\defbeamertemplate{subsection in toc}{sections numbered}
+{\leavevmode\bidi@beamer@leftskip=2.5em\inserttocsubsection\par}
+
+\defbeamertemplate{subsubsection in toc}{sections numbered}
+{\leavevmode\normalsize\usebeamerfont{subsection in toc}\bidi@beamer@leftskip=3.5em\usebeamerfont{subsubsection in toc}%
+ \inserttocsubsubsection\par}
+
+\defbeamertemplate{section in toc}{subsections numbered}
+{\leavevmode\bidi@beamer@leftskip=2em\inserttocsection\par}
+
+\defbeamertemplate{subsection in toc}{subsections numbered}
+{\leavevmode\bidi@beamer@leftskip=2em\rlap{\hskip-2em\inserttocsectionnumber.\inserttocsubsectionnumber}\inserttocsubsection\par}
+
+\defbeamertemplate{subsubsection in toc}{subsections numbered}
+{\leavevmode\normalsize\usebeamerfont{subsection in
+ toc}\bidi@beamer@leftskip=3em\usebeamerfont{subsubsection in toc}%
+ \inserttocsubsubsection\par}
+
\bidi@csundef{beamer@@tmpop@section in toc@circle}
\bidi@csundef{beamer@@tmpop@subsection in toc@circle}
@@ -2033,7 +2061,7 @@ by Vafa Khalighi.
\bidi@csundef{beamer@@tmpop@enumerate mini template@square}
\defbeamertemplate{section in toc}{square}
-{\leavevmode\bidi@beamer@leftskip=1.75ex%
+{\leavevmode\bidi@beamer@leftskip=3ex%
\llap{{%
\usebeamerfont*{section number projected}%
\usebeamercolor[bg]{section number projected}%
@@ -2047,8 +2075,8 @@ by Vafa Khalighi.
\hskip-2.25ex%
\vrule width2.25ex height1.85ex depth.4ex%
\fi
- }}%
- \kern1.25ex\inserttocsection\par}
+ }\kern1.25ex}%
+ \inserttocsection\par}
\defbeamertemplate{subsection in toc}{square}
{\leavevmode\bidi@beamer@leftskip=5ex\llap{{%
@@ -2148,6 +2176,28 @@ by Vafa Khalighi.
}}%
}
+\bidi@csundef{beamer@@tmpop@section in toc@ball unnumbered}
+
+\bidi@csundef{beamer@@tmpop@subsection in toc@ball unnumbered}
+
+\bidi@csundef{beamer@@tmpop@subsubsection in toc@ball unnumbered}
+
+\defbeamertemplate{section in toc}{ball unnumbered}
+{\leavevmode\bidi@beamer@leftskip=2.25ex%
+ \llap{%
+ \raise0.1ex\beamer@usesphere{section number projected}{bigsphere}\kern1.25ex}%
+ \inserttocsection\par}
+
+\defbeamertemplate{subsection in toc}{ball unnumbered}
+{\leavevmode\bidi@beamer@leftskip=5.1ex\llap{%
+ \raise0.2ex\beamer@usesphere{subsection number projected}{smallsphere}\kern1ex}\inserttocsubsection\par}
+
+\defbeamertemplate{subsubsection in toc}{ball unnumbered}
+{\leavevmode\normalsize\usebeamerfont{subsection in
+ toc}\bidi@beamer@leftskip=8.2ex\usebeamerfont{subsubsection in toc}%
+ \llap{%
+ \beamer@usesphere{subsubsection number projected}{smallsphere}\kern0.75ex}\inserttocsubsubsection\par}
+
\bidi@csundef{beamer@@tmpop@section in toc@ball}
\bidi@csundef{beamer@@tmpop@subsection in toc@ball}
@@ -2218,6 +2268,22 @@ by Vafa Khalighi.
\usebeamerfont{block body example}%
}%
+\bidi@csundef{beamer@@tmpop@caption@caption name own line}
+
+\defbeamertemplate{caption}{caption name own line}
+{%
+ \begin{minipage}{\textwidth}
+ \leavevmode
+ \bidi@beamer@ragged
+ {%
+ \usebeamercolor[fg]{caption name}%
+ \usebeamerfont*{caption name}%
+ \insertcaptionname%
+ }\\
+ \insertcaption
+ \end{minipage}
+}
+
% \end{macrocode}
% \iffalse
%</beamerbaseauxtemplates-xetex-bidi.def>
@@ -2430,7 +2496,7 @@ by Vafa Khalighi.
%\fi
% \section{File \texttt{beamerbaseframecomponents-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{beamerbaseframecomponents-xetex-bidi.def}[2023/01/18 v0.5 bidi adaptations for beamerbaseframecomponents package for XeTeX engine]
+\ProvidesFile{beamerbaseframecomponents-xetex-bidi.def}[2023/08/02 v0.6 bidi adaptations for beamerbaseframecomponents package for XeTeX engine]
\renewcommand{\setbeamersize}[1]{%
\beamer@dogeometryfalse%
\setkeys{beamer@margin}{#1}%
@@ -2589,7 +2655,7 @@ by Vafa Khalighi.
\endgroup%
}
\def\@oddfoot{{\normalcolor{\hfil%
- \setbox\beamer@tempbox=\hbox{\usebeamertemplate***{navigation symbols}\hskip-\Gm@rmargin\hskip2pt}%
+ \setbox\beamer@tempbox=\hbox{\usebeamertemplate***{navigation symbols}\hskip-\bidi@beamer@Gm@rmargin\hskip2pt}%
\ht\beamer@tempbox=0pt%
\dp\beamer@tempbox=0pt%
\box\beamer@tempbox}}}
@@ -4589,9 +4655,9 @@ by Vafa Khalighi.
% \section{File \texttt{bidi.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\bididate{2023/01/18}
-\def\bidi@version{39.7}
-\def\bidi@releasename{Serge Lang}
+\def\bididate{2023/08/02}
+\def\bidi@version{39.8}
+\def\bidi@releasename{Donald Ervin Knuth}
\newcommand*{\bidireleasename}{\bidi@releasename}
\ProvidesPackage{bidi}[\bididate\space v\bidi@version\space (Release \bidi@releasename)\space
Bidirectional typesetting in plain TeX and LaTeX]
@@ -4679,7 +4745,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
}
\newcommand*{\@bidi@pdfcustomproperties}{%
This is the bidi package, Version \bidi@version\space (Release \bidi@releasename),
- Released January 18, 2023.
+ Released August 2, 2023.
}
\newcommand*{\bidi@beamer@ragged}{}
\@RTLmainfalse
@@ -4923,10 +4989,10 @@ Bidirectional typesetting in plain TeX and LaTeX]
%\fi
% \section{File \texttt{bidi.tex}}
% \begin{macrocode}
-\def\bididate{2023/01/18}
+\def\bididate{2023/08/02}
\catcode`@=11
-\def\bidi@version{39.7}
-\def\bidi@releasename{Serge Lang}
+\def\bidi@version{39.8}
+\def\bidi@releasename{Donald Ervin Knuth}
\def\bidireleasename{\bidi@releasename}
\let \protect \relax
\newlinechar`\^^J
@@ -5029,7 +5095,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
}
\def\@bidi@pdfcustomproperties{%
This is the bidi package, Version \bidi@version\space (Release \bidi@releasename),
- Released January 18, 2023.
+ Released August 2, 2023.
}
\def\bidi@pdfm@mark{%
\special{pdf:%
@@ -12545,7 +12611,7 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{extrafootnotefeatures-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{extrafootnotefeatures-xetex-bidi.def}[2023/01/18 v2.5 bidi extra footnote features for XeTeX engine]
+\ProvidesFile{extrafootnotefeatures-xetex-bidi.def}[2023/08/02 v2.6 bidi extra footnote features for XeTeX engine]
\newdimen\bidi@columnwidth
\def\bidi@floathook{%
\bidi@columnwidth\columnwidth
@@ -12872,7 +12938,7 @@ bidi implementation of tufte title]
\fi
}
\def\bidi@reinsertfootnote#1#2#3{%
- \ifvoid#1
+ \ifvoid#1%
\else
\insert\footins{#2#3}%
\fi
@@ -25885,7 +25951,8 @@ to\rtside{\box\bslice\hfil}}
%\fi
% \section{File \texttt{tocloft-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{tocloft-xetex-bidi.def}[2010/07/25 v0.2 bidi adaptations for tocloft package for XeTeX engine]
+\ProvidesFile{tocloft-xetex-bidi.def}[2023/08/02 v0.3 bidi adaptations for tocloft package for XeTeX engine]
+\renewcommand{\cftpnumalign}{\if@RTL l\else r\fi}
\let\cftdot\@SepMark
\if@cfthaspart
\renewcommand*{\l@part}[2]{
diff --git a/macros/xetex/latex/bidi/bidi.pdf b/macros/xetex/latex/bidi/bidi.pdf
index 7b6538b76f..478ea3814f 100644
--- a/macros/xetex/latex/bidi/bidi.pdf
+++ b/macros/xetex/latex/bidi/bidi.pdf
Binary files differ