-
Notifications
You must be signed in to change notification settings - Fork 6
/
todo_formulas.tex
395 lines (280 loc) · 13.4 KB
/
todo_formulas.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
\documentclass[a5paper,openany,9pt]{extbook}
%Packages from structure.tex
\usepackage[margin=1.6cm, top=1.2cm,right=1.9cm,left=1.9cm, footskip = 1 cm, headheight=20pt,headsep=0.2cm]{geometry}
\usepackage[russian, english]{babel}
\usepackage[utf8]{inputenc} % Required for including letters with accents
\usepackage[T2A]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage{enumitem}
\usepackage{booktabs}
\usepackage{microtype}
\usepackage{cmap}
\usepackage{calc}
\usepackage{titletoc}
\usepackage{fancyhdr}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{xcolor}
\definecolor{prpl}{RGB}{150, 120, 182}
% new stuff
% \lineskiplimit=-100pt\relax
% old stuff
\include{include/header}
\include{include/macros}
\begin{document}
\chapter*{Recommendations how to write formulas better}
This information is based on \href{http://www.ctex.org/documents/shredder/src/texbook.pdf}{\textit{Knuth's TeXbook}}, AMS documentation, \href{https://tex.stackexchange.com/}{\textit{tex.stackexchange.com}} answers, \colorbox{prpl}{\textcolor{white}{AND MY OWN PREFERENCES}}. I want to say that here are the rules to use correct command to get right spacing in math formulas. The rules which \LaTeX\ does automaticly aren't discussed here.
Also look at the source code to understand those rules
\begin{itemize}
\item
Use punctuations symbols after \verb|$*formula*$| in inline math and use them inside noninline-environments.
$b=3$, где
\begin{flalign}
&b=3,&
\end{flalign}
где
\item
Enumeration. In simple enumeration use ties with formula division in inline mode and space command \verb|\,| in noninline mode:
$i=1$,~2, \ldots,~$n$.$\Bigr|$
\begin{flalign}
&i=1,\,2,\,\ldots,\,n.\Bigr|&
\end{flalign}
\item
You can also use space command \verb|\,| in inline mode, if you don't use formula separation at all. But try to avoid it as much as possible. For example, use \verb|\{$x$,\{$x$, $y$\}\}| rather than \verb|$\{x,\,\{x,\,y\}\}$|.
$\Bigr|\{x,\,\{x,\,y\}\}\Bigr|$
$\Bigr|$\{$x$, \{$x$, $y$\}\}$\Bigr|$
\item
Remember that \verb|\ldots|,\verb|\cdots| produce very bad spacing in the following example \verb|$\ldots$,|
The same pattern goes assets declared by enumeration.
$X = \{x_1$,~$x_2$, \dots,~$x_n$, \dots $\},\Bigr|$
\begin{flalign}
&X = \{x_1,\,x_2,\,\dots,\,x_n,\,\dots \},\Bigr|&
\end{flalign}
\item
However, for vectors and particularry for ordered pairs we use opposite pattern: no spaces at all both inline and noninle mode:
$\vv X = (x_1, x_2, \dots, x_n,\dots),\Bigr|$
\begin{flalign}
&\vv X = (x_1,x_2,\dots,x_n,\dots),\Bigr|&
\end{flalign}
\item
Also we dont use spaces when enumeration is a direct part of the formula:
$\forall a,b,c \in \bbR$
\item
As well, notice that numerical gaps (intervals, segments) should take no space between left and right elements both in inline and noninline mode \verb|(a;b)|,\verb|[a;b]|
$\Bigr|(a;b)\Bigr|$
\begin{flalign}
&\Bigr|(a;b)\Bigr|&
\end{flalign}
Reference: Inline: \href{http://www.ctex.org/documents/shredder/src/texbook.pdf}{\textit{Knuth's TeXbook}}, page 173. Noninline: It's my own preference.
\item
Use \verb|\quad| between mathematics statements both in inline and noninline mode, however try to avoid these constructions in inline mode.
$\forall y\in Y\quad y\in X\Bigr|$
\begin{flalign}
&\forall y\in Y\quad y\in X\Bigr|&
\end{flalign}
However if there is any punctuational symbol, then use simple space with ties, space-command \verb|\| or (the most recommended) formula separation.
\item
Use ``\verb=\,\big|\,='' and in sets as relation symbol
$\{x \,\big|\ 1 < x < 2\}\Bigr|$
\begin{flalign}
&\{x \,\big|\ 1 < x < 2\}\Bigr|&
\end{flalign}
Notice that we have no additional spaces after the first bracket and before the final bracket.
\item
Use ``\verb=\setminus='' for set minus operation. Not backslashes or smth like this.
\item
Phrases like i.e., e.g. requires ties \~ or spacecommand \verb|\ | after it because otherwise the space will be slighty bigger than recommended.
$\Bigr|$i.e.~author$\Bigr|$
$\Bigr|$i.e.\ author$\Bigr|$
$\Bigr|$i.e. author$\Bigr|$
Remember that т.е. doesnt need comma after it, because it is union.
\item
Parentheses. When you want to use it with the word ``respectively'' then use this word in the last bracket. Do it like in the following russian way:
Будем говорить, что на множестве $G$ определена операция сложения <<$+$>> (умножения <<$\cdot$>>), если любой упорядоченной паре элементов ($a$,~$b$) элементов $G$ поставлен в соответствие элемент $y = a + b$ (соотв., $y = a\cdot b$)
Try to avoid 3 or more parentheses brackets. Try to edit sentences or just make new one additional phrase.
\item
Because of bug use this:
\verb|\end{itemize}\vspace{-1.0\baselineskip}\end{defn}|
when itemize and defn come to the end of the page. !Actually I need to solve this question on stackexchange.
\item
Use \verb|\dfrac{1}{a}| in inline maths, because i dont like standard latex text-style fractions. They are too small, aren't they?
$a / b = \dfrac{a}{b} \triangleq a \cdot \dfrac{1}{b}$;
$a / b = \frac{a}{b} \triangleq a \cdot \frac{1}{b}$;
\item
Try to avoid \verb|\Longleftrightarrow|, \verb|\Rightarrow| in order to give more mathematical text rather than lecture's summary.
\item
About text in noninline equations. In noninline equations use \verb|\,\text{где }| or \verb|\,\text{где }\ | or the simplest \verb|\text{, где }| like in examples below:
$\Bigl| \dfrac{(z - a)^n}{(\zeta - a)^{n + 1}} f(\zeta) \Bigr| \le \dfrac{M}{r_1} \cdot q^n$, где $M = \sup\limits_{\zeta \in \gamma_{r_1}} |f(\zeta)| < +\infty,\Bigr|$
\begin{flalign}
&\Bigl| \frac{(z - a)^n}{(\zeta - a)^{n + 1}} f(\zeta) \Bigr| \le \frac{M}{r_1} \cdot q^n, \,\text{где } M = \sup_{\zeta \in \gamma_{r_1}} |f(\zeta)| < +\infty,\Bigr|&
\end{flalign}
\begin{flalign}
&\Bigl| \frac{(z - a)^n}{(\zeta - a)^{n + 1}} f(\zeta) \Bigr| \le \frac{M}{r_1} \cdot q^n, \,\text{где}\ M = \sup_{\zeta \in \gamma_{r_1}} |f(\zeta)| < +\infty,\Bigr|&
\end{flalign}
\begin{flalign}
&\Bigl| \frac{(z - a)^n}{(\zeta - a)^{n + 1}} f(\zeta) \Bigr| \le \frac{M}{r_1} \cdot q^n\text{, где } M = \sup_{\zeta \in \gamma_{r_1}} |f(\zeta)| < +\infty,\Bigr|&
\end{flalign}
\item
\verb|\text{ и}\ | OR \verb|\ \text{и}\ | OR the simplest \verb|\text{ и }|
$\Bigr|+\infty + a = +\infty$ и $+\infty- a = +\infty,\, \forall a \in \bbR\cup\{+\infty\}; \Bigr|$
\begin{flalign}
&\Bigr|+\infty + a = +\infty \text{ и}\ {+\infty}- a = +\infty,\, \forall a \in \bbR\cup\{+\infty\}; \Bigr|&
\end{flalign}
\begin{flalign}
&\Bigr|+\infty + a = +\infty\ \text{и}\ {+\infty}- a = +\infty,\, \forall a \in \bbR\cup\{+\infty\}; \Bigr|&
\end{flalign}
\begin{flalign}
&\Bigr|+\infty + a = +\infty\text{ и } {+\infty}- a = +\infty,\, \forall a \in \bbR\cup\{+\infty\}; \Bigr|&
\end{flalign}
\item
Remember about \verb|{+\infty}|
\item
When you want to show 2 or more different equations on the same line in noninline mode then consider using \verb|;\qquad|
\begin{flalign}
&a(y) = \lim_{l \to +\infty}\frac{1}{\pi}\int_{-l}^{l} f(t)\cos(yt)\,dt;\qquad
b(y) = \lim_{l \to +\infty}\frac{1}{\pi}\int_{-l}^{l} f(t)\sin(yt)\,dt&
\end{flalign}
\item
Use \verb|,\,| in noninline math with commas so it looks the same in inline mode and noninline mode:
$\phi_{\nu}(x) = e^{i\nu\frac{\pi}{l}x},\, \nu \in \bbZ,\Bigr|$
\begin{flalign}
&\phi_{\nu}(x) = e^{i\nu\frac{\pi}{l}x},\, \nu \in \bbZ,\Bigr|&
\end{flalign}
\item
Use \verb=\,= before differentials in integrals \verb=\int f(x)\,dx=
\begin{flalign}
&\int f(x)\, dx&
\end{flalign}
\item
Use ``\verb=\,='' after factorials in math formulas \verb=\frac{n!}{k!\,(n-k)!}=
\begin{flalign}
&\frac{n!}{k!\,(n-k)!}&
\end{flalign}
\item Remember about index bug with \verb|"--~|... so you should just use
\begin{center}
\verb|Условия Коши"--~Римана\rindex{условия!Коши---Римана}|
\end{center}
\item USE ; in lists to separate items-elements:
\begin{enumerate}
\item
$M\in G$;
\item
$\forall x \in G\quad x \le M \quad (\text{соотв., } x \ge M)$.
\end{enumerate}
\item
Remember about \verb|r(f;x_0,x)|
\item
THINK of the last expression or smth like n=1,n here pls
\begin{alignat*}{1}
&{+\infty} + a = +\infty \text{ и } {+\infty}- a = +\infty\quad \forall a \in \bbR\cup\{+\infty\}; \\
&{-\infty} - a = -\infty \text{ и } {-\infty} + a = -\infty\quad \forall a \in \bbR\cup\{-\infty\}; \\
&{+\infty}\cdot a = +\infty \text{ и } {-\infty}\cdot a = -\infty\quad \forall a > 0,\, a\in\bbR\cup\{+\infty\};\\
&{+\infty}\cdot a = -\infty \text{ и } {-\infty}\cdot a = +\infty \quad \forall a < 0,\, a\in\bbR\cup\{-\infty\};\\
&a/ (-\infty) = 0 \text{ и } a / (+\infty) = 0 \quad \forall a \in \bbR;
\end{alignat*}
\end{itemize}
\newpage
VERY OLD STUFF NEEED CHECHING BRO
\section{COLON}
\begin{itemize}
\item
Use \verb|\mathbin{:}| in ratios:
$$x\mathbin{:}y\mathbin{:}z = 3\mathbin{:}4\mathbin{:}5$$
\item
Use ``\verb=\colon='' in mappings:
$$f\colon A \to B$$
\item[\colorbox{prpl}{\textcolor{white}{MY}}\ $\bullet$]
Use ``\verb={:}\quad='' or macros ``\verb=\cquad='', when it's a punctuation symbol in \textbf{non-inline math} and between math statements like \verb|A\cquad B| anywere.
$$\forall x \in A\cquad f(x) = 12$$
But use simple \textbf{formula separation} \verb|$\forall x \in A$: $f(x) = 12$| like here: in \textbf{inline math}
\begin{center}
$\forall x \in A$: $f(x) = 12$
\end{center}
\end{itemize}
\section{SPACING}
\begin{itemize}
\item[\colorbox{prpl}{\textcolor{white}{MY}}\ $\bullet$]
Use \verb|\quad| between logic elements in \textbf{non-inline math}
$$
\forall A \in B \quad \mu A < \mu B
$$
But use simple formulas divison ``\verb=$\forall A \in B$ $\mu A < \mu B$='' with usual spaces in inline math in \textbf{inline math} (or consider quad idk actually):
\begin{center}
$\forall A \in B$ $\mu A < \mu B$.
\end{center}
Use punctuation symbols if needed after \$-symbol.
\item[\colorbox{prpl}{\textcolor{white}{MY}}\ $\bullet$]
Use ``\verb|\quad |'' before parenthesis in \textbf{non-inline math}:
$$
\forall M' < M \quad (\forall M' > M)\quad \exists x\in G\cquad x>M' \quad (x<M')
$$
(?)But again use simple formulas divison with usual spaces in \textbf{inline math}.
\item
Use comma without any spaces like this \verb|$a,b$| when comma actually is a part of formula, for example
\begin{center}
$1<a,b<2$.
\end{center}
But when it is not part of the formula (for example, when it is range 1, 2, 3, \dots) use spaces in \textbf{non-inline math} ``\verb|~|'' or formulas divison in \textbf{inline math}. Dont put \verb|\,| after \verb|\dots,\ldots,\cdots|
$$
\phi_1(x), \ \phi_2(x),\ \ldots,\ \phi_n(x), \ldots
$$
$$
\phi_1(x), \ \phi_2(x),\ \dots,\ \phi_n(x), \ldots
$$
$\phi_1(x)$,~$\phi_2(x)$, \ldots,~$\phi_n(x), \ldots$
$\phi_1(x)$,~$\phi_2(x)$, \dots,~$\phi_n(x), \ldots$
Prove that $(1-x)^{-1}=1+x+x^2+\cdots$.
Prove that $(1-x)^{-1}=1+x+x^2+\cdots$.
Clearly $a_i<b_i$ for $i=1$,~2, $\ldots$,~$n$.
Clearly $a_i<b_i$ for $i=1$,~2, $\dots\,$,~$n$.
Clearly $a_i<b_i$ for $i=1$,~2, $\dots$,~$n$.
Clearly $a_i<b_i$ for $i=1$,~2, $\cdots$,~$n$.
Сonclusion: USE \verb|dots| without any space-commands in this situations.
\item
\verb|$x_1$,~$x_2$,~\dots, $x_n$,~\dots|.
\begin{center}
$x_1$,~$x_2$,~\dots, $x_n$,~\dots
\end{center}
\textit{Reference:} \href{https://tex.stackexchange.com/questions/115030/using-commas-in-mathematical-formulas}{$tex.stackexchange.com/...$}
Refence: \href{http://www.ctex.org/documents/shredder/src/texbook.pdf}{\textit{texbook.pdf}}, page 172
\item
\verb|\exists!| is actual command for exists the only one! $\exists! с \in \bbR$
\end{itemize}
\section{CORRECT SYMBOLS}
\begin{itemize}
\item
Use ``\verb=\,\big|\,='' and in sets as relation symbol
$$\{\,x : 1 < x < 2\,\}.$$
\item
Use ``\verb=\setminus='' for set minus operation. Not backslashes or smth like this.
$$
A = B \setminus C
$$
\item
Use \verb|\ldots| between binary relation symbols like ``+'' and \verb|\dots| with commas in enumeration.
$$
\phi_1(x),\ \ldots,\ \phi_n(x), \ldots,\quad x_1 + \ldots + x_2 + \ldots = 12.
$$
Use \verb|\dots| when you don't care (it's fine btw because \LaTeX\ replaces dots either with cdots or with ldots). Do not use simple \verb|$...$|.
Refence: \href{http://www.ctex.org/documents/shredder/src/texbook.pdf}{\textit{texbook.pdf}}, page 172
\item
Please use \verb=\accentset{*}{L}^{R}_1=:
$$
\accentset{*}{L}^{R}_1
$$
\end{itemize}
\section{SMALL PLACEMENT DETAILS}
\begin{itemize}
\item[\colorbox{prpl}{\textcolor{white}{MY}}\ $\bullet$]
Do not use ``\verb=\limits='' with \verb=\int=,\verb=\int=, etc.. I am fine with integration interval to be a side of integral-symbol.
$$
\int_\Delta{f(x) \phi_k(x)}\,dx=a_k\int_\Delta|\phi_k(x)|^2\,dx,
$$
But \verb=$\iint\limits$=
\end{itemize}
\section{About <<Ёфикации>>}
\begin{itemize}
\item
Sorry bro, but we don't want to use letter <<ё>>. Use <<е>> instead.
\end{itemize}
\section{Formulas in longtables}
We use \verb=\textstyle= in formulas in longtable in our formulas appendix, if it improves quality of reading. Also I like to "rescale" tables with changing font sizes into \verb=\footnotesize=.
\end{document}