texlive[67217] Master/texmf-dist: oststud (25may23)

commits+karl at tug.org commits+karl at tug.org
Thu May 25 22:37:45 CEST 2023


Revision: 67217
          http://tug.org/svn/texlive?view=revision&revision=67217
Author:   karl
Date:     2023-05-25 22:37:45 +0200 (Thu, 25 May 2023)
Log Message:
-----------
oststud (25may23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/oststud/hsrstud-classes.pdf
    trunk/Master/texmf-dist/doc/latex/oststud/hsrstud.pdf
    trunk/Master/texmf-dist/doc/latex/oststud/oststud.pdf
    trunk/Master/texmf-dist/source/latex/oststud/oststud.dtx
    trunk/Master/texmf-dist/tex/latex/oststud/oststud.sty

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

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

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

Modified: trunk/Master/texmf-dist/source/latex/oststud/oststud.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/oststud/oststud.dtx	2023-05-25 20:37:34 UTC (rev 67216)
+++ trunk/Master/texmf-dist/source/latex/oststud/oststud.dtx	2023-05-25 20:37:45 UTC (rev 67217)
@@ -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{Mathematical Programming}
+%
+% \DescribeMacro{\argmin}
+% \DescribeMacro{\argmax}
+% ^^A TODO: write section
+% \textit{Work in progress.}
+%
 % \subsection{Complex Numbers}
 %
-% ^^A TODO: write section
 % \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 at bbprobability
-    \DeclareMathOperator{\ost at expectation}{\mathbb{E}}
+    \DeclareMathOperator*{\ost at expectation}{\mathbb{E}}
 \else
-    \DeclareMathOperator{\ost at expectation}{E}
+    \DeclareMathOperator*{\ost at expectation}{E}
 \fi
-\newcommand{\E}[1]{\ost at expectation\left\{#1\right\}}
+\newcommand*{\E}[2][]{\ost at expectation_{#1}\left\{#2\right\}}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -472,11 +555,11 @@
 % Variance of a random variable.
 %    \begin{macrocode}
 \ifost at bbprobability
-    \DeclareMathOperator{\ost at variance}{\mathbb{V}}
+    \DeclareMathOperator*{\ost at variance}{\mathbb{V}}
 \else
-    \DeclareMathOperator{\ost at variance}{Var}
+    \DeclareMathOperator*{\ost at variance}{Var}
 \fi
-\newcommand{\Var}[1]{\ost at variance\left\{#1\right\}}
+\newcommand*{\Var}[2][]{\ost at variance_{#1}\left\{#2\right\}}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -484,14 +567,14 @@
 % Probability operator.
 %    \begin{macrocode}
 \ifost at bbprobability
-    \DeclareMathOperator{\ost at probability}{\mathbb{P}}
+    \DeclareMathOperator*{\ost at probability}{\mathbb{P}}
 \else
-    \DeclareMathOperator{\ost at probability}{Pr}
+    \DeclareMathOperator*{\ost at probability}{Pr}
 \fi
 \ifost at dontrenew
-    \newcommand{\P}[1]{\ost at probability\left\{#1\right\}}
+    \newcommand*{\P}[2][]{\ost at probabiliy_{#1}\left\{#2\right\}}
 \else
-    \renewcommand{\Pr}[1]{\ost at probability\left\{#1\right\}}
+    \renewcommand*{\P}[2][]{\ost at probabiliy_{#1}\left\{#2\right\}}
 \fi
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/Master/texmf-dist/tex/latex/oststud/oststud.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/oststud/oststud.sty	2023-05-25 20:37:34 UTC (rev 67216)
+++ trunk/Master/texmf-dist/tex/latex/oststud/oststud.sty	2023-05-25 20:37:45 UTC (rev 67217)
@@ -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 at bbprobability
-    \DeclareMathOperator{\ost at expectation}{\mathbb{E}}
+    \DeclareMathOperator*{\ost at expectation}{\mathbb{E}}
 \else
-    \DeclareMathOperator{\ost at expectation}{E}
+    \DeclareMathOperator*{\ost at expectation}{E}
 \fi
-\newcommand{\E}[1]{\ost at expectation\left\{#1\right\}}
+\newcommand*{\E}[2][]{\ost at expectation_{#1}\left\{#2\right\}}
 \ifost at bbprobability
-    \DeclareMathOperator{\ost at variance}{\mathbb{V}}
+    \DeclareMathOperator*{\ost at variance}{\mathbb{V}}
 \else
-    \DeclareMathOperator{\ost at variance}{Var}
+    \DeclareMathOperator*{\ost at variance}{Var}
 \fi
-\newcommand{\Var}[1]{\ost at variance\left\{#1\right\}}
+\newcommand*{\Var}[2][]{\ost at variance_{#1}\left\{#2\right\}}
 \ifost at bbprobability
-    \DeclareMathOperator{\ost at probability}{\mathbb{P}}
+    \DeclareMathOperator*{\ost at probability}{\mathbb{P}}
 \else
-    \DeclareMathOperator{\ost at probability}{Pr}
+    \DeclareMathOperator*{\ost at probability}{Pr}
 \fi
 \ifost at dontrenew
-    \newcommand{\P}[1]{\ost at probability\left\{#1\right\}}
+    \newcommand*{\P}[2][]{\ost at probabiliy_{#1}\left\{#2\right\}}
 \else
-    \renewcommand{\Pr}[1]{\ost at probability\left\{#1\right\}}
+    \renewcommand*{\P}[2][]{\ost at probabiliy_{#1}\left\{#2\right\}}
 \fi
 \DeclareMathOperator{\fourier}{\mathcal{F}}
 \DeclareMathOperator{\ifourier}{\mathcal{F}^{-1}}



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