Debian Codegraph @

texmf-dist/doc/latex/jkmath/jkmath.tex

raw
1 \documentclass[12pt,a4paper]{article}
2 \usepackage[latin1]{inputenc}
3 \usepackage{amsmath}
4 \usepackage{amsfonts}
5 \usepackage{amssymb}
6 \usepackage{graphicx}
7 \usepackage{jkmath}
8 \author{Jonas Kaerts}
9 \title{The \texttt{jkmath} package}
10 \begin{document}
11 \maketitle
12
13 \section{The package options}
14 The package contains a few options with regards to subsets.
15 \begin{description}
16 \item[subsetorder] You are a person that likes your symbols for subsets to resemble the symbols used for ordering numbers.
17 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$.
18 Similar behavior occurs with \verb|\supset| and \verb|\stsupset|.
19 \item[subsetnonorder] You are a person that likes variety.
20 Your symbols for subsets do not resemble the usual ordering symbols.
21 the command \verb|\subset| displays the symbol $\subset$ while the symbol \verb|\stsubset| displays as $\subsetneq$.
22 Same for \verb|supset| and \verb|stsupset|.
23 \item[subsetnonamb] You like your notation as unambiguous as possible.
24 The command \verb|\subset| displays the symbol $\subseteq$ while \verb|\stsubset| displays $\subsetneq$.
25 Again similar for \verb|\supset| and \verb|\stsupset|.
26 \end{description}
27 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.
28
29 There are also two options, \verb|bbsets| and \verb|bfsets| concerning the display of number systems.
30 They provide the following shorthands:
31
32 \begin{tabular}{llll}
33 Command & Option \verb|bbsets|& Option \verb|bfsets| & Usage\\
34 \verb|\N| & $\mathbb{N}$ & $\mathbf{N}$ & Natural numbers\\
35 \verb|\Z| & $\mathbb{Z}$ & $\mathbf{Z}$ & Integers\\
36 \verb|\Q| & $\mathbb{Q}$ & $\mathbf{Q}$ & Rational numbers\\
37 \verb|\R| & $\mathbb{R}$ & $\mathbf{R}$ & Real numbers\\
38 \verb|\C| & $\mathbb{C}$ & $\mathbf{C}$ & Complex numbers\\
39 \verb|\F| & $\mathbb{F}$ & $\mathbf{F}$ & Fields\\
40 \verb|\Aff| & $\mathbb{A}$ & $\mathbf{A}$ & Affine Space\\
41 \verb|\PP| & $\mathbb{P}$ & $\mathbf{P}$ & Projective Space\\
42 \end{tabular}
43
44 \section{Commands with arrays}
45 \subsection{Systems of equations}
46 This package uses the \verb|array|-package to define some useful math alignment.
47 The first is the \verb|system| environment.
48 There are two new column types (\verb|e| and \verb|o|) to get the spacing around operators right.
49 You can then call the code
50
51 \begin{verbatim}
52 \begin{system}{rorer}
53 4x & + & 3y & 7\\
54 2x & - & 5y & 10
55 \end{system}
56 \end{verbatim}
57 to get the result
58 \[
59 \begin{system}{rorer}
60 4x & + & 3y & 7\\
61 2x & - & 5y & 10
62 \end{system}.
63 \]
64
65 This allows fine control over the alignment of a system of equations while still having the correct spacing.
66 Note that the column type \verb|e| automatically inserts an equality sign.
67
68 \subsection{Augmented matrices}
69
70 A second class of commands are the augmented matrices.
71 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.
72 The code
73
74 \begin{verbatim}
75 \begin{augmentedmatrix}{2}{2}
76 1 & 2 & 3 & 4\\
77 5 & 6 & 7 & 8
78 \end{augmentedmatrix}
79 \end{verbatim}
80 has the following output:
81 \[
82 \begin{augmentedmatrix}{2}{2}
83 1 & 2 & 3 & 4\\
84 5 & 6 & 7 & 8
85 \end{augmentedmatrix}
86 \]
87
88 At the moment there are two shorthand commands \verb|apmqty| and \verb|ipmqty| which take $m=1$ and $m=n$ respectively and insert parentheses.
89 These are used for solving systems with one right hand side and for calculating inverse matrices.
90 The shorthand name is inspired by the shorthands in the \verb|physics|-package.
91 The code
92 \begin{verbatim}
93 \amqty{2}{1 & 2 & 3 \\ 4 & 5 & 6}
94 \neq
95 \ipmqty{3}{0 & 1 & 0 & 1 & 0 & 0\\
96 -1 & 0 & 2 & 0 & 1 & 0\\
97 0 & 0 & 3 & 0 & 0 & 1}
98 \end{verbatim}
99 produces the following output:
100 \[\apmqty{2}{1 & 2 & 3 \\ 4 & 5 & 6}
101 \neq
102 \ipmqty{3}{0 & 1 & 0 & 1 & 0 & 0\\
103 -1 & 0 & 2 & 0 & 1 & 0\\
104 0 & 0 & 3 & 0 & 0 & 1}\]
105
106 \section{Delimiters and intervals}
107
108 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.
109 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).
110 This package defines similar commands \verb|\lparens| and \verb|\rparens| for parentheses.
111
112 Using these delimiter commands the package also defines four types of intervals: \verb|\oointerval|, \verb|\ccinterval|, \verb|\ocinterval| and \verb|\cointerval|.
113 The o and c say whether the left or right endpoint is open or closed.
114 The code
115 \begin{verbatim}
116 \cointerval{1,3} \cup \ccinterval{3,7} = \ccinterval{1,7}
117 \end{verbatim}
118 typesets the following output
119 \[\cointerval{1,3} \cup \ccinterval{3,7} = \ccinterval{1,7}.\]
120 You can define your own shorthands for these commands or redefine the style of the intervals.
121
122 \section{Sets}
123
124 A general macro for denoting sets is \verb|\set| which automatically places scalable braces around the argument.
125 A scalable version of \verb|\mid|, called \verb|\where|, is also included.
126 This makes sure the (readable) code
127 \begin{verbatim}
128 \set{x\in\mathbb{R} \where \frac{3}{4}x + 5 = 0}
129 \end{verbatim}
130 will give the following result:
131 \[\set{x\in\mathbb{R} \where \frac{3}{4}x + 5 = 0}.\]
132
133 A second macro is \verb|\restr| for denoting restritions of functions to subsets of their domain.
134 Simple usage is \verb|\restr{f}_U| which displays $\restr{f}_U$.
135
136
137
138 \section{Combinatorics}
139
140 Using \verb|\genfrac| from \verb|amsmath| the package defines two commands for Stirling numbers of the first and second kind.
141 Example usage:
142 \begin{verbatim}
143 \stirlingfirstkind{n}{k}=
144 \stirlingsecondkind{-k}{-n}
145 \end{verbatim}
146 gives the output
147 \[
148 \stirlingfirstkind{n}{k}=
149 \stirlingsecondkind{-k}{-n}.
150 \]
151 Shorthands for these two commands have yet to be defined.
152
153 \section{Number Theory}
154 Two commands (with identical results) \verb|\legendre| and \verb|\jacobi| are defined to typeset Legendre symbols and Jacobi symbols.
155 The output is identical but their name differs to make the code more readable.
156 Example usage:
157 \begin{verbatim}
158 \jacobi{a}{n} =
159 \legendre{a}{p_1}^{e_1}
160 \legendre{a}{p_2}^{e_2}\cdots
161 \legendre{a}{p_k}^{e_k}
162 \end{verbatim}
163 gives the output
164 \[
165 \jacobi{a}{n} =
166 \legendre{a}{p_1}^{e_1}
167 \legendre{a}{p_2}^{e_2}\cdots
168 \legendre{a}{p_k}^{e_k}
169 \]
170
171 \section{Names of mathematicians}
172 This section describes three simple commands \verb|\mobius|, \verb|\cech| and \verb|\erdos| so you can mention \mobius, \cech\ and \erdos\ without any pain.
173 \end{document}