summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-03-25 21:25:41 +0000
committerKarl Berry <karl@freefriends.org>2018-03-25 21:25:41 +0000
commit7797b94583f26cd24bfa620b9579bf7d83352ca8 (patch)
tree94b809ee293cb15959709f7c8a41b8b9ecb8fc28
parentcc62a45366aec8d536536f04aca03cdf5a3e6943 (diff)
jkmath (25mar18)
git-svn-id: svn://tug.org/texlive/trunk@47109 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/jkmath/README.md13
-rw-r--r--Master/texmf-dist/doc/latex/jkmath/jkmath.pdfbin0 -> 125187 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jkmath/jkmath.tex173
-rw-r--r--Master/texmf-dist/tex/latex/jkmath/jkmath.sty110
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/jkmath.tlpsrc0
7 files changed, 298 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/jkmath/README.md b/Master/texmf-dist/doc/latex/jkmath/README.md
new file mode 100644
index 00000000000..057cc72e138
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/jkmath/README.md
@@ -0,0 +1,13 @@
+README for jkmath.sty
+
+jkmath 0.1
+Created by Jonas Kaerts
+Updated 24th of March 2018
+
+This material is subject to the LaTeX Project Public License.
+See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for
+the details of that license.
+
+Inspired by the physics package on CTAN, this package defines some simple macros for mathematical notation which make the code more readable and/or allow flexibility in typesetting material.
+
+The package is currently being developed as I gather examples of special notation fit for new macro's.
diff --git a/Master/texmf-dist/doc/latex/jkmath/jkmath.pdf b/Master/texmf-dist/doc/latex/jkmath/jkmath.pdf
new file mode 100644
index 00000000000..ed26702f3a0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/jkmath/jkmath.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jkmath/jkmath.tex b/Master/texmf-dist/doc/latex/jkmath/jkmath.tex
new file mode 100644
index 00000000000..3a3ea736626
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/jkmath/jkmath.tex
@@ -0,0 +1,173 @@
+\documentclass[12pt,a4paper]{article}
+\usepackage[latin1]{inputenc}
+\usepackage{amsmath}
+\usepackage{amsfonts}
+\usepackage{amssymb}
+\usepackage{graphicx}
+\usepackage{jkmath}
+\author{Jonas Kaerts}
+\title{The \texttt{jkmath} package}
+\begin{document}
+\maketitle
+
+\section{The package options}
+The package contains a few options with regards to subsets.
+\begin{description}
+ \item[subsetorder] You are a person that likes your symbols for subsets to resemble the symbols used for ordering numbers.
+ The command \verb|\subset| now displays the symbol $\subseteq$ while a new command \verb|\stsubset| (for strict subsets) can be used for dispaying the symbol $\subset$.
+ Similar behavior occurs with \verb|\supset| and \verb|\stsupset|.
+ \item[subsetnonorder] You are a person that likes variety.
+ Your symbols for subsets do not resemble the usual ordering symbols.
+ the command \verb|\subset| displays the symbol $\subset$ while the symbol \verb|\stsubset| displays as $\subsetneq$.
+ Same for \verb|supset| and \verb|stsupset|.
+ \item[subsetnonamb] You like your notation as unambiguous as possible.
+ The command \verb|\subset| displays the symbol $\subseteq$ while \verb|\stsubset| displays $\subsetneq$.
+ Again similar for \verb|\supset| and \verb|\stsupset|.
+\end{description}
+The advantage of this approach is that you can convert a document from one style of notation to another by simply changing the package option.
+
+There are also two options, \verb|bbsets| and \verb|bfsets| concerning the display of number systems.
+They provide the following shorthands:
+
+\begin{tabular}{llll}
+ Command & Option \verb|bbsets|& Option \verb|bfsets| & Usage\\
+ \verb|\N| & $\mathbb{N}$ & $\mathbf{N}$ & Natural numbers\\
+ \verb|\Z| & $\mathbb{Z}$ & $\mathbf{Z}$ & Integers\\
+ \verb|\Q| & $\mathbb{Q}$ & $\mathbf{Q}$ & Rational numbers\\
+ \verb|\R| & $\mathbb{R}$ & $\mathbf{R}$ & Real numbers\\
+ \verb|\C| & $\mathbb{C}$ & $\mathbf{C}$ & Complex numbers\\
+ \verb|\F| & $\mathbb{F}$ & $\mathbf{F}$ & Fields\\
+ \verb|\Aff| & $\mathbb{A}$ & $\mathbf{A}$ & Affine Space\\
+ \verb|\PP| & $\mathbb{P}$ & $\mathbf{P}$ & Projective Space\\
+\end{tabular}
+
+\section{Commands with arrays}
+\subsection{Systems of equations}
+This package uses the \verb|array|-package to define some useful math alignment.
+The first is the \verb|system| environment.
+There are two new column types (\verb|e| and \verb|o|) to get the spacing around operators right.
+You can then call the code
+
+\begin{verbatim}
+\begin{system}{rorer}
+4x & + & 3y & 7\\
+2x & - & 5y & 10
+\end{system}
+\end{verbatim}
+to get the result
+\[
+\begin{system}{rorer}
+4x & + & 3y & 7\\
+2x & - & 5y & 10
+\end{system}.
+\]
+
+This allows fine control over the alignment of a system of equations while still having the correct spacing.
+Note that the column type \verb|e| automatically inserts an equality sign.
+
+\subsection{Augmented matrices}
+
+A second class of commands are the augmented matrices.
+The environment \verb|augmentedmatrix| takes two arguments $n$ and $m$ and makes a matrix of $n+m$ columns with a vertical rule after the $n$-th column, allowing the typesetting of systems with (multiple) right hand sides in matrix form.
+The code
+
+\begin{verbatim}
+\begin{augmentedmatrix}{2}{2}
+1 & 2 & 3 & 4\\
+5 & 6 & 7 & 8
+\end{augmentedmatrix}
+\end{verbatim}
+has the following output:
+\[
+\begin{augmentedmatrix}{2}{2}
+1 & 2 & 3 & 4\\
+5 & 6 & 7 & 8
+\end{augmentedmatrix}
+\]
+
+At the moment there are two shorthand commands \verb|apmqty| and \verb|ipmqty| which take $m=1$ and $m=n$ respectively and insert parentheses.
+These are used for solving systems with one right hand side and for calculating inverse matrices.
+The shorthand name is inspired by the shorthands in the \verb|physics|-package.
+The code
+\begin{verbatim}
+\amqty{2}{1 & 2 & 3 \\ 4 & 5 & 6}
+\neq
+\ipmqty{3}{0 & 1 & 0 & 1 & 0 & 0\\
+-1 & 0 & 2 & 0 & 1 & 0\\
+0 & 0 & 3 & 0 & 0 & 1}
+\end{verbatim}
+produces the following output:
+\[\apmqty{2}{1 & 2 & 3 \\ 4 & 5 & 6}
+\neq
+\ipmqty{3}{0 & 1 & 0 & 1 & 0 & 0\\
+-1 & 0 & 2 & 0 & 1 & 0\\
+0 & 0 & 3 & 0 & 0 & 1}\]
+
+\section{Delimiters and intervals}
+
+I often use a script to check if my code is consistent in its use of delimters since \LaTeX\ allows you to have unmatched parentheses etc. in the text.
+The commands \verb|\lbrace|, \verb|\rbrace|, \verb|\lbrack| and \verb|\rbrack| are a godsend when I both want my script to give meaningful output and I only need one delimiter (such as in the \verb|system| environment).
+This package defines similar commands \verb|\lparens| and \verb|\rparens| for parentheses.
+
+Using these delimiter commands the package also defines four types of intervals: \verb|\oointerval|, \verb|\ccinterval|, \verb|\ocinterval| and \verb|\cointerval|.
+The o and c say whether the left or right endpoint is open or closed.
+The code
+\begin{verbatim}
+\cointerval{1,3} \cup \ccinterval{3,7} = \ccinterval{1,7}
+\end{verbatim}
+typesets the following output
+\[\cointerval{1,3} \cup \ccinterval{3,7} = \ccinterval{1,7}.\]
+You can define your own shorthands for these commands or redefine the style of the intervals.
+
+\section{Sets}
+
+A general macro for denoting sets is \verb|\set| which automatically places scalable braces around the argument.
+A scalable version of \verb|\mid|, called \verb|\where|, is also included.
+This makes sure the (readable) code
+\begin{verbatim}
+\set{x\in\mathbb{R} \where \frac{3}{4}x + 5 = 0}
+\end{verbatim}
+will give the following result:
+\[\set{x\in\mathbb{R} \where \frac{3}{4}x + 5 = 0}.\]
+
+A second macro is \verb|\restr| for denoting restritions of functions to subsets of their domain.
+Simple usage is \verb|\restr{f}_U| which displays $\restr{f}_U$.
+
+
+
+\section{Combinatorics}
+
+Using \verb|\genfrac| from \verb|amsmath| the package defines two commands for Stirling numbers of the first and second kind.
+Example usage:
+\begin{verbatim}
+\stirlingfirstkind{n}{k}=
+\stirlingsecondkind{-k}{-n}
+\end{verbatim}
+gives the output
+\[
+\stirlingfirstkind{n}{k}=
+\stirlingsecondkind{-k}{-n}.
+\]
+Shorthands for these two commands have yet to be defined.
+
+\section{Number Theory}
+Two commands (with identical results) \verb|\legendre| and \verb|\jacobi| are defined to typeset Legendre symbols and Jacobi symbols.
+The output is identical but their name differs to make the code more readable.
+Example usage:
+\begin{verbatim}
+\jacobi{a}{n} =
+\legendre{a}{p_1}^{e_1}
+\legendre{a}{p_2}^{e_2}\cdots
+\legendre{a}{p_k}^{e_k}
+\end{verbatim}
+gives the output
+\[
+\jacobi{a}{n} =
+\legendre{a}{p_1}^{e_1}
+\legendre{a}{p_2}^{e_2}\cdots
+\legendre{a}{p_k}^{e_k}
+\]
+
+\section{Names of mathematicians}
+This section describes three simple commands \verb|\mobius|, \verb|\cech| and \verb|\erdos| so you can mention \mobius, \cech\ and \erdos\ without any pain.
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/jkmath/jkmath.sty b/Master/texmf-dist/tex/latex/jkmath/jkmath.sty
new file mode 100644
index 00000000000..8edbec33633
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/jkmath/jkmath.sty
@@ -0,0 +1,110 @@
+% jkmath 0.1
+% Created by Jonas Kaerts
+% Updated 25th of March 2018
+%
+% This material is subject to the LaTeX Project Public License.
+% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for
+% the details of that license.
+%
+% Inspired by the physics package on CTAN, this package defines some simple macros for
+% mathematical notation which make the code more readable and/or allow flexibility in typesetting material.
+%
+% The package is currently being developed as I gather examples of special notation fit for new macro's.
+
+\ProvidesPackage{jkmath}[2018/03/25 package jkmath]
+
+\RequirePackage{xparse}
+\RequirePackage{array}
+\RequirePackage{amsmath}
+\RequirePackage{physics}
+
+\let\oldsubset\subset
+\let\oldsupset\supset
+% Options
+\DeclareOption{subsetorder}{%
+ \renewcommand{\subset}{\subseteq}%
+ \newcommand{\stsubset}{\oldsubset}%
+ \renewcommand{\supset}{\supseteq}%
+ \newcommand{\stsupset}{\oldsupset}}
+\DeclareOption{subsetnonorder}{%
+ \newcommand{\stsubset}{\subsetneq}%
+ \newcommand{\stsupset}{\supsetneq}}
+\DeclareOption{subsetnonamb}{%
+ \renewcommand{\subset}{\subseteq}%
+ \newcommand{\stsubset}{\subsetneq}%
+ \renewcommand{\supset}{\supseteq}%
+ \newcommand{\stsupset}{\supsetneq}}
+
+\DeclareOption{bbsets}{
+ \newcommand{\N}{\mathbb{N}}%Natural numbers
+ \newcommand{\Z}{\mathbb{Z}}%Integers
+ \newcommand{\Q}{\mathbb{Q}}%Rational Numbers
+ \newcommand{\R}{\mathbb{R}}%Real Numbers
+ \newcommand{\C}{\mathbb{C}}%Complex Numbers
+ \newcommand{\F}{\mathbb{F}}%Field
+ \newcommand{\Aff}{\mathbb{A}}%Affine Space
+ \newcommand{\PP}{\mathbb{P}}%Projective Space
+}
+\DeclareOption{bfsets}{
+ \newcommand{\N}{\mathbf{N}}%Natural numbers
+ \newcommand{\Z}{\mathbf{Z}}%Integers
+ \newcommand{\Q}{\mathbf{Q}}%Rational Numbers
+ \newcommand{\R}{\mathbf{R}}%Real Numbers
+ \newcommand{\C}{\mathbf{C}}%Complex Numbers
+ \newcommand{\F}{\mathbf{F}}%Field
+ \newcommand{\Aff}{\mathbf{A}}%Affine Space
+ \newcommand{\PP}{\mathbf{P}}%Projective Space
+}
+\ProcessOptions\relax
+
+% Macro's using the array package
+\newcolumntype{e}{@{{}={}}}
+\newcolumntype{o}{>{{}}c<{{}}}
+
+\newenvironment{system}[1]% more control over systems of equations
+{\left\lbrace%
+ \setlength\arraycolsep{0pt}%
+ \begin{array}{#1}}%
+ {\end{array}\right.}
+
+\newenvironment{augmentedmatrix}[2]{% matrix with vertical bar
+ \begin{array}{@{}*{#1}{c}|*{#2}{c}@{}}
+ }{%
+ \end{array}
+}
+
+\newcommand{\apmqty}[2]{\left(\begin{augmentedmatrix}{#1}{1}#2\end{augmentedmatrix}\right)}
+\newcommand{\ipmqty}[2]{\left(\begin{augmentedmatrix}{#1}{#1}#2\end{augmentedmatrix}\right)}
+
+
+% Delimiters and intervals
+\newcommand{\lparens}{(}
+\newcommand{\rparens}{)}
+
+
+\newcommand{\oointerval}[1]{\lparens #1 \rparens}
+\newcommand{\ccinterval}[1]{\lbrack #1 \rbrack}
+\newcommand{\ocinterval}[1]{\lparens #1 \rbrack}
+\newcommand{\cointerval}[1]{\lbrack #1 \rparens}
+
+% Sets
+\newcommand{\set}[1]{\left\{#1\right\}}
+\newcommand{\where}{\mathrel{}\middle|\mathrel{}}
+
+\newcommand{\restr}[1]{\left.#1\right|}
+
+
+
+% Combinatorics
+\DeclareDocumentCommand{\stirlingfirstkind}{}{\genfrac{[}{]}{0pt}{}}
+\DeclareDocumentCommand{\stirlingsecondkind}{}{\genfrac\{\}{0pt}{}}
+
+% Number Theory
+
+\DeclareDocumentCommand{\legendre}{ m m }{\left(\frac{#1}{#2}\right)}
+\DeclareDocumentCommand{\jacobi}{ m m }{\legendre{#1}{#2}}
+
+% Mathematicians
+\newcommand{\mobius}{M\"{o}bius}
+\newcommand{\cech}{C\v{e}ch}
+\newcommand{\erdos}{Erd\H{os}} \ No newline at end of file
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index c6f57af1d84..f1406c8bf42 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -346,7 +346,7 @@ my @TLP_working = qw(
issuulinks istgame itnumpar
iwhdp iwona
jablantile jacow jamtimes japanese-otf japanese-otf-uptex jfmutil
- jknapltx jlabels jlreq jmlr jneurosci jpsj jsclasses
+ jknapltx jkmath jlabels jlreq jmlr jneurosci jpsj jsclasses
jslectureplanner jumplines junicode
jura juraabbrev jurabib juramisc jurarsp js-misc jvlisting
kantlipsum karnaugh karnaugh-map karnaughmap kastrup kdgdocs kerkis kerntest
diff --git a/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc b/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
index b119ad29842..2639c5a8948 100644
--- a/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
@@ -89,6 +89,7 @@ depend hepunits
depend interval
depend ionumbers
depend isomath
+depend jkmath
depend karnaugh
depend karnaugh-map
depend karnaughmap
diff --git a/Master/tlpkg/tlpsrc/jkmath.tlpsrc b/Master/tlpkg/tlpsrc/jkmath.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/jkmath.tlpsrc