Some useful commands for LaTex
NOTE: always use the $
(dollar) sign before and afer the expression when you are writing a mathematical expression in LaTex
\geq
-
$a^b$
is(exponents) -
$a_b$
is(subscript.. can be used to write chemical formulaes like -
\frac{first arg}{second arg}
is(fractions.. replace first arg and second arg by your expression) -
\neq
is(not equals to.. can be used when a != b) -
\int
is( $\int$
) or Integral Sign -
\lambda
is( $lambda
) or Lambda -
\infty
isor Infitnity -
\pi
isor pi
.. can be used to write the formula for circle's area() -
\sum
isor Sumation
-
\circ
is used to make a circle or degree symbol such as( $180^{\circ}$
) -
\square
is used to make a square.. like: -
\space
is used to add spacing inside a mathematical expression..( $\int(x) \space + 1$
) -
\rightarrow
is(Right Arrow) -
\leftarrow
is(Left Arrow)
NOTE: in order for colorization you must add package xcolor
\usepackage{xcolor}
The available colors are black, blue, brown, cyan, darkgray, gray, green, lightgray, lime, magenta, olive, orange, pink, purple, red, teal, violet, white, yellow
\color{your_color}This is a colored text\color{white} % white is the FG here
\usepackage {xcolor}
\color{red}This is a red text\color{white}
\color{orange}This is an orange text\color{white}
\color{yellow}This is a yellow text\color{white}
\color{green}This is a green text\color{white}
\color{blue}This is a blue text\color{white}
\color{purple}This is a purple text\color{white}
Your preamble is where you setup your LaTeX envioment and packages, often its imported from a spereate file called preamble.tex
using the \input{}
command.
Creating vectors in LaTeX can be a hassle, use the folloing macros to make the process faster. This code introduces two new commands \vec{}
and \pvec{}
, \vec{ab}
creates an arrow above your variable name like \pvec{}
creates a vector column such as \pvec{3 \\ 4 \\ 1}
Add the following code to your preamble after importing the amsmath
(the amarecan mathmatical assosiation math package)
% Vectors
\renewcommand{\vec}[1]{\overrightarrow{#1}}
% Custom command for display vectors using pmatrix, use \pvec{1 \\ 2 \\ 3}
\newcommand{\pvec}[1]{%
\begin{pmatrix}
#1
\end{pmatrix}%
}
On this README.md you may add an section or fix some mistakes