summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-05-25 20:37:45 +0000
committerKarl Berry <karl@freefriends.org>2023-05-25 20:37:45 +0000
commitf4b30cab122b0e1a4257d45b74bca2753d8b0abd (patch)
tree753d8fea810fa85687dcb734b0818f2d317b3199 /Master/texmf-dist
parentfc9be1452149628b5de8cb5cc924e10115b523a6 (diff)
oststud (25may23)
git-svn-id: svn://tug.org/texlive/trunk@67217 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/oststud/hsrstud-classes.pdfbin127717 -> 127670 bytes
-rw-r--r--Master/texmf-dist/doc/latex/oststud/hsrstud.pdfbin143177 -> 143159 bytes
-rw-r--r--Master/texmf-dist/doc/latex/oststud/oststud.pdfbin145415 -> 159801 bytes
-rw-r--r--Master/texmf-dist/source/latex/oststud/oststud.dtx119
-rw-r--r--Master/texmf-dist/tex/latex/oststud/oststud.sty22
5 files changed, 112 insertions, 29 deletions
diff --git a/Master/texmf-dist/doc/latex/oststud/hsrstud-classes.pdf b/Master/texmf-dist/doc/latex/oststud/hsrstud-classes.pdf
index 29590a39a73..8fc79d86d66 100644
--- a/Master/texmf-dist/doc/latex/oststud/hsrstud-classes.pdf
+++ b/Master/texmf-dist/doc/latex/oststud/hsrstud-classes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/oststud/hsrstud.pdf b/Master/texmf-dist/doc/latex/oststud/hsrstud.pdf
index cf1ad1e27fb..0f3a59381e0 100644
--- a/Master/texmf-dist/doc/latex/oststud/hsrstud.pdf
+++ b/Master/texmf-dist/doc/latex/oststud/hsrstud.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/oststud/oststud.pdf b/Master/texmf-dist/doc/latex/oststud/oststud.pdf
index 74abd99be06..1e0148e24b2 100644
--- a/Master/texmf-dist/doc/latex/oststud/oststud.pdf
+++ b/Master/texmf-dist/doc/latex/oststud/oststud.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/oststud/oststud.dtx b/Master/texmf-dist/source/latex/oststud/oststud.dtx
index 35539e7b19f..c9aadcfbb87 100644
--- a/Master/texmf-dist/source/latex/oststud/oststud.dtx
+++ b/Master/texmf-dist/source/latex/oststud/oststud.dtx
@@ -19,7 +19,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<package>\ProvidesPackage{oststud}
%<*package>
- [2023/04/18 v0.3 OST Student's package]
+ [2023/05/20 v0.4 OST Student's package]
%</package>
%
%<*driver>
@@ -27,6 +27,7 @@
\usepackage{oststud}
\usepackage{enumitem}
+\usepackage{esint}
\usepackage{tikz}
\usepackage{framed}
\usepackage[
@@ -50,6 +51,7 @@
% \changes{v0.1}{2022/11/18}{Initial version}
% \changes{v0.2}{2022/11/22}{Port features of \texttt{hsrstud}}
% \changes{v0.3}{2023/04/18}{Cleanup for CTAN upload}
+% \changes{v0.4}{2023/05/20}{Fix probability operators and improve documentation}
%
% \GetFileInfo{oststud.dtx}
%
@@ -87,8 +89,12 @@
% derivatives. Instead the symbols \(\vec{\nabla}, \vec{\nabla}\dotp,
% \vec{\nabla}\crossp, \nabla^2, \vec{\nabla}^2\) are be replaced with
% grad, div, curl and div grad.
-% \item[|bfemph|] \textit{Work in progress.}
-% \item[|bbprobability|] \textit{Work in progress.}
+% \item[|bfemph|] Change the behaviour of |\emph| to use a bold font for
+% emphasis (instead of italics). This option cannot be used together
+% with the |dontrenew| option.
+% \item[|bbprobability|] Use blackboard symbols $\mathbb{P}$, $\mathbb{E}$
+% and $\mathbb{V}$ instead of Pr, E and Var for the probability,
+% expectation and variance respectively.
% \item[|scrtransforms|] \textit{Work in progress.}
% \end{description}
%
@@ -106,6 +112,9 @@
% arrow ($\oldvec{u}$) is replaced by bold and the arrow notation saved in
% |\oldvec|. In vector calculus it is common to denote unit vectors by putting
% a hat, so there is a macro |\uvec| that does just that:
+% ^^A \begin{leftbar}
+% ^^A |\uvec{u} = \vec{u}/u|
+% ^^A \end{leftbar}
% \[
% \uvec{u} = \vec{u}/u.
% \]
@@ -115,6 +124,9 @@
% To differentiate the dot and cross products (between vectors) from normal
% product between scalars ($a \cdot b$ and $a \times b$), the macros |\dotp|
% and |\crossp| provide a bold variant:
+% \begin{leftbar}
+% |\vec{u} \dotp \vec{v}, \vec{u} \crossp \vec{v}|
+% \end{leftbar}
% \[
% \vec{u} \dotp \vec{v}, \qquad
% \vec{u} \crossp \vec{v}.
@@ -133,6 +145,9 @@
% divergence and the symbol $\divsymb$ is saved in |\divsymb|. For a scalar
% field $\phi$ or a vector field $\vec{F}$ the notation (in order) of the
% gradient, divergence and curl appear as follows:
+% \begin{leftbar}
+% |\grad \phi, \div \vec{F}, \curl \vec{F}|
+% \end{leftbar}
% \[
% \grad \phi, \quad
% \div \vec{F}, \quad
@@ -143,6 +158,9 @@
% \DescribeMacro{\vlaplacian}
% Continuing with the (ab)use of the ``Nabla'' or ``Del'' notation, the
% there is a macro |\laplacian| for the Laplacian operator
+% \begin{leftbar}
+% |\laplacian \equiv \div \grad \equiv \sum_i \partial^2_i|
+% \end{leftbar}
% \[
% \laplacian \equiv \div \grad \equiv \sum_i \partial^2_i.
% \]
@@ -191,9 +209,15 @@
% \DescribeMacro{\tr}
% This package also provides a macro for the trace of a matrix.
%
-% \subsection{Complex Numbers}
+% \subsection{Mathematical Programming}
%
+% \DescribeMacro{\argmin}
+% \DescribeMacro{\argmax}
% ^^A TODO: write section
+% \textit{Work in progress.}
+%
+% \subsection{Complex Numbers}
+%
% \DescribeMacro{\Re}
% \DescribeMacro{\Im}
% AMS maths's default notation for the real and imaginary parts of a complex
@@ -206,17 +230,76 @@
%
% \subsection{Probability Operators}
%
-% ^^A TODO: write section
-% \textit{Work in progress.}
+% \DescribeMacro{\Pr}
+% \DescribeMacro{\E}
+% \DescribeMacro{\Var}
+% Since according to quantum mechanics it seems that ultimately the universe
+% can only be described using probabilities there are the operators |\Pr|, |\E|
+% and |\Var| for the probability, expectation and variance respectively. If the
+% |dontrenew| option is set, the probability is defined in the csname |\P|.
+%
+% All three operators take an argument \marg{expression} which is automatically
+% surrounded using curly braces. If the expression contains multiple random
+% variables, to disambiguate with respect to which variable the operation is
+% being taken it is possible to specify an optional argument \oarg{rv}. An
+% example:
+% \begin{leftbar}
+% |\E[x]{g(x)} = \int_\mathcal{X} g(\bar{x}) p_x(\bar{x}) \, d\bar{x}|
+% \end{leftbar}
+% \[
+% \E[x]{g(x)} = \int_\mathcal{X} g(\bar{x}) p_x(\bar{x}) \, d\bar{x}.
+% \]
+%
+% Because some people like to use the blackboard font for the probability
+% operators (such as in the machine learning community), there is an option
+% |bbprobability| that changes the look of the three operators to $\mathbb{P}$,
+% $\mathbb{E}$ and $\mathbb{V}$.
%
% \subsection{Transformation Operators}
%
-% ^^A TODO: write section
-% \textit{Work in progress.}
+% \DescribeMacro{\corresponds}
+% \DescribeMacro{\rcorresponds}
+% When working with transformations it is common to use the ``correspondence
+% symbol'' show below for example with the Laplace transformation:
+% \begin{leftbar}
+% |\laplace\{f(t)\} = F(s) \corresponds f(t) \rcorresponds F(s)|
+% \end{leftbar}
% \[
% \laplace\{f(t)\} = F(s) \corresponds f(t) \rcorresponds F(s)
% \]
%
+% \DescribeMacro{\fourier}
+% \DescribeMacro{\ifourier}
+% \DescribeMacro{\laplace}
+% \DescribeMacro{\ilaplace}
+% \DescribeMacro{\ztransf}
+% \DescribeMacro{\iztransf}
+% \DescribeMacro{\hilbert}
+% As shown in the example above the for the Laplace transform operator symbol
+% there is a macro |\laplace|. Similar operators are also defined for other
+% transformations and their inverses. Here is their usual definition:
+% \begin{align*}
+% \fourier\left\{f(t)\right\}(\omega)
+% &= \frac{1}{\sqrt{2\pi}} \int_\mathbb{R} f(t) e^{-i\omega t} \, dt, &
+% \ifourier\left\{F(\omega)\right\}(t)
+% &= \frac{1}{\sqrt{2\pi}} \int_\mathbb{R} F(\omega) e^{i\omega t} \, d\omega, \\
+% \laplace\left\{f(t)\right\}(s)
+% &= \int_\mathbb{R^+} f(t) e^{-st} \, dt, &
+% \ilaplace\left\{F(s)\right\}(t)
+% &= \frac{1}{2\pi i}\int_{\gamma + i\mathbb{R}} F(s) e^{st} \, ds, \\
+% \ztransf \left\{f_k\right\}(z)
+% &= \sum_{k \in \mathbb{Z}^+} f_k z^{-k}, &
+% \iztransf \left\{F(z)\right\}(k)
+% &= \frac{1}{2\pi i} \ointctrclockwise_C F(z) z^{k-1} \, dz, \\
+% \hilbert \left\{ f(t) \right\}(\tau)
+% &= \mathrm{P.V.} \frac{1}{\pi} \int_\mathbb{R} \frac{f(t)}{\tau - t} \, dt,
+% \end{align*}
+% in order they are the Fourier transform (|\fourier|, |\ifourier|), the
+% Laplace transform (|\laplace|, |\ilaplace|), the Z-transform (|\ztransf|,
+% |\iztransf|), and the Hilbert transform (|\hilbert|). The Hilbert has no
+% inverse since $-\hilbert \hilbert f(t) = f(t)$, tough of course one could
+% write |\hilbert^{-1}| to get $\hilbert^{-1}$.
+%
% \subsection{References}
%
% ^^A TODO: write section
@@ -460,11 +543,11 @@
% Expectation of a random variable.
% \begin{macrocode}
\ifost@bbprobability
- \DeclareMathOperator{\ost@expectation}{\mathbb{E}}
+ \DeclareMathOperator*{\ost@expectation}{\mathbb{E}}
\else
- \DeclareMathOperator{\ost@expectation}{E}
+ \DeclareMathOperator*{\ost@expectation}{E}
\fi
-\newcommand{\E}[1]{\ost@expectation\left\{#1\right\}}
+\newcommand*{\E}[2][]{\ost@expectation_{#1}\left\{#2\right\}}
% \end{macrocode}
% \end{macro}
%
@@ -472,11 +555,11 @@
% Variance of a random variable.
% \begin{macrocode}
\ifost@bbprobability
- \DeclareMathOperator{\ost@variance}{\mathbb{V}}
+ \DeclareMathOperator*{\ost@variance}{\mathbb{V}}
\else
- \DeclareMathOperator{\ost@variance}{Var}
+ \DeclareMathOperator*{\ost@variance}{Var}
\fi
-\newcommand{\Var}[1]{\ost@variance\left\{#1\right\}}
+\newcommand*{\Var}[2][]{\ost@variance_{#1}\left\{#2\right\}}
% \end{macrocode}
% \end{macro}
%
@@ -484,14 +567,14 @@
% Probability operator.
% \begin{macrocode}
\ifost@bbprobability
- \DeclareMathOperator{\ost@probability}{\mathbb{P}}
+ \DeclareMathOperator*{\ost@probability}{\mathbb{P}}
\else
- \DeclareMathOperator{\ost@probability}{Pr}
+ \DeclareMathOperator*{\ost@probability}{Pr}
\fi
\ifost@dontrenew
- \newcommand{\P}[1]{\ost@probability\left\{#1\right\}}
+ \newcommand*{\P}[2][]{\ost@probabiliy_{#1}\left\{#2\right\}}
\else
- \renewcommand{\Pr}[1]{\ost@probability\left\{#1\right\}}
+ \renewcommand*{\P}[2][]{\ost@probabiliy_{#1}\left\{#2\right\}}
\fi
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/tex/latex/oststud/oststud.sty b/Master/texmf-dist/tex/latex/oststud/oststud.sty
index ab9cd441f90..94990a5f0f5 100644
--- a/Master/texmf-dist/tex/latex/oststud/oststud.sty
+++ b/Master/texmf-dist/tex/latex/oststud/oststud.sty
@@ -47,7 +47,7 @@
%% material.
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{oststud}
- [2023/04/18 v0.3 OST Student's package]
+ [2023/05/20 v0.4 OST Student's package]
\RequirePackage{xcolor}
\RequirePackage{amsmath}
\RequirePackage{amssymb}
@@ -124,26 +124,26 @@
\renewcommand{\Im}[1]{\mathrm{Im} \left\{#1\right\}}
\fi
\ifost@bbprobability
- \DeclareMathOperator{\ost@expectation}{\mathbb{E}}
+ \DeclareMathOperator*{\ost@expectation}{\mathbb{E}}
\else
- \DeclareMathOperator{\ost@expectation}{E}
+ \DeclareMathOperator*{\ost@expectation}{E}
\fi
-\newcommand{\E}[1]{\ost@expectation\left\{#1\right\}}
+\newcommand*{\E}[2][]{\ost@expectation_{#1}\left\{#2\right\}}
\ifost@bbprobability
- \DeclareMathOperator{\ost@variance}{\mathbb{V}}
+ \DeclareMathOperator*{\ost@variance}{\mathbb{V}}
\else
- \DeclareMathOperator{\ost@variance}{Var}
+ \DeclareMathOperator*{\ost@variance}{Var}
\fi
-\newcommand{\Var}[1]{\ost@variance\left\{#1\right\}}
+\newcommand*{\Var}[2][]{\ost@variance_{#1}\left\{#2\right\}}
\ifost@bbprobability
- \DeclareMathOperator{\ost@probability}{\mathbb{P}}
+ \DeclareMathOperator*{\ost@probability}{\mathbb{P}}
\else
- \DeclareMathOperator{\ost@probability}{Pr}
+ \DeclareMathOperator*{\ost@probability}{Pr}
\fi
\ifost@dontrenew
- \newcommand{\P}[1]{\ost@probability\left\{#1\right\}}
+ \newcommand*{\P}[2][]{\ost@probabiliy_{#1}\left\{#2\right\}}
\else
- \renewcommand{\Pr}[1]{\ost@probability\left\{#1\right\}}
+ \renewcommand*{\P}[2][]{\ost@probabiliy_{#1}\left\{#2\right\}}
\fi
\DeclareMathOperator{\fourier}{\mathcal{F}}
\DeclareMathOperator{\ifourier}{\mathcal{F}^{-1}}