Skip to main content

MathJax tutorial

Hai friends, today we will discuss more about LaTeX commands. I am not going to exaggerate things. I will show you the facts straight forward.

Fonts

  1. Use \mathbb or \Bbb for "black board bold" font.
    \(\mathbb{ A B C D E F G H I J K L M N O}\)
  2. Use \mathbf for "bold face" font.
    \(\mathbf{ A B C D E F G H I J K L M N O}\)
  3. Use \mathtt for "typewriter" font.
    \(\mathtt{ A B C D E F G H I J K L M N O}\)
  4. Use \mathrm for "roman" font.
    \(\mathrm{ A B C D E F G H I J K L M N O}\)
  5. Use \mathsf for "sans-serif" font.
    \(\mathsf{ A B C D E F G H I J K L M N O}\)
  6. Use \mathcal for "calligraphic" script.
    \(\mathcal{ A B C D E F G H I J K L M N O}\)
  7. Use \mathfrak for "Fraktur"(old German style letters).
    \(\mathfrak{ A B C D E F G H I J K L M N O}\)

\(\mathbb{ A B C D E F G H I J K L M N O}\)
\(\mathbf{ A B C D E F G H I J K L M N O}\)
\(\mathtt{ A B C D E F G H I J K L M N O}\)
\(\mathrm{ A B C D E F G H I J K L M N O}\)
\(\mathsf{ A B C D E F G H I J K L M N O}\)
\(\mathcal{ A B C D E F G H I J K L M N O}\)
\(\mathfrak{ A B C D E F G H I J K L M N O}\)

Greek Letters

For small Greek letters use \alpha ,\beta ,\gamma ,...\omega(\(\alpha ,\beta ,\gamma ,...\omega\)) as shown on line one. For capital Greek letters use \Delta , \Gamma ,...\ Omega(\(\Delta ,\Gamma ,...\Omega\)) as shown on line number 2.

\(\alpha ,\beta ,\gamma ,...\omega\)
\(\Delta ,\Gamma ,...\Omega\)

\frac

This command will be show numbers as fraction. For example you can write following command to show \(\frac 12\).

\(\frac 12\)

But you can't write \(\frac {12}{13}\) as above. In order to write this you have to write denominator and numerator in curly braces as shown below:

\(\frac {12}{13}\)

\overline

The overline command is used to put a bar above a letter or word. In order to put bar above a word you have to use curly braces but in order to write bar above a letter you don't want curly braces. The command for writing \(\overline a\) shown on line1 and command for writing \(\overline {INTR}\) is shown on line 2.

\(\overline a\)
\(\overline {INTR}\)


From above you may get the idea that if you want to format a group of letters or numbers you have to use curly braces.

Superscripts and subscript

The Superscripts and subscripts are very important in math symbols. Since they have wide variety of applications in definite integrals, summation etc. The \(x^2 \text{ and } x^{2n}\) is written in first line and \(x_2 \text{ and } x_{2n}\) is written in second line. The \(\log_2 x\) is shown on third line and \(x_i^2\) shown on fourth line.

\(x^2 \text{ and } x^{2n}\)
\(x_2 \text{ and } x_{2n}\)
\(\log_2 x\)
\(x_i^2\)

\text

If you want to write something in between LaTeX commands, sometimes you can't do that. Since some words like 'to', 'in' etc. also LaTeX commands. But you can write those words with the help of \text command. For example, the first command results "\(15\mu A to 40\mu A\)" without a white space between \(15\mu A\) and \(40\mu A\). So we have to use second command to show results with proper white space.

\(15\mu A to 40\mu A\)
\(15\mu A \text{ to } 40\mu A\)

Parantheses

The symbols (), {}, and [] used to make parantheses. For example,\(x\{n\}=(2,3,5,7,11) \text{ and } x[t]=2t+1\). Code shown on line 1. These do not scale with the formula in between, so if you write(line number 2), \((\frac{\sqrt x}{y^3})\) the parentheses will be too small. Using \left(…\right) will make the sizes adjust automatically to the formula they enclose(code shown on third line): \(\left(\frac{\sqrt x}{y^3}\right)\). This \left and \right is also applicable for square brackets([]), curly braces({}), ceil bracket(\(\lceil x \rceil\)), floor bracket(\(\lfloor x \rfloor\)) and angled parantheses(\(\langle x \rangle\))too. Those brackets not discussed yet discussed is shown on line 4 of code snippet seperated by comma.

\(x\{n\}=(2,3,5,7,11) \text{ and } x[t]=2t+1\)
\(\(frac{\sqrt x}{y^3})\)
\(\left(\frac{\sqrt x}{y^3}\right)\)
\(\lceil x \rceil, \lfloor x \rfloor, \langle x \rangle\)

Summation


\(\sum_{k=0}^n k^2 = \frac{(n^3+n^2)(2n+1)}{8}\)
$$\sum_{k=0}^n k^2 = \frac{(n^3+n^2)(2n+1)}{8}$$

The first command will show you result in inline mode like \(\sum_{k=0}^n k^2 = \frac{(n^3+n^2)(2n+1)}{8}\). While second command will show you output in display mode like $$\sum_{k=0}^n k^2 = \frac{(n^3+n^2)(2n+1)}{8}$$

Comments

Popular posts from this blog

8051 Simple Programs

Sum of 8-bit Numbers Stored in Memory Here  we will discuss about 8051 programs but we can't discuss about all of the 8051 instructions. For programming 8051 we should know about assembler directives as well as instruction set. Click  here to download Atmel c51 user guide that will discuss about 8051(c51 family microcontroller) instruction set, assembler directives, c51 cross assembler from Atmel.  Program ORG 00H MOV R0,#50H   ; get memory location in memory pointer R0 MOV R1,#51H   ; get memory location on memory pointer register R1 MOV A,@R0       ; get content of memory location 50H to accumulator ADD A,@R1        ; add content of A with content of memory location 51H and store result in A MOV R0,#52H    ; get 52H to memory pointer R0 MOV@R0,A         ; copy content of A to memory location 52H END Add 16-bit Numbers ...

Introduction to 8051 embedded C

For 8051 we need to include the file reg51.h. This file contains the all the definitions of 8051 registers. With this information C compiler produces hex file that can be downloaded into the ROM of the microcontroller. It is important to note that the size of the hex file produced by the assembly language is much larger than the hex file produced by C compiler. Apart from this fact, there is many reasons for writing programs in C instead of assembly: ●It is much easier and less time consuming to write programs in C assembly. ●C is more flexible; it is easier to modify and update. ●Programming in C allows to use code available in function libraries. ●Program written inC for one microcontroller is portable to other microcontrollers with little or no modifications. Data Types in 8051 Embedded C The table shown below lists the data types that are available in typical C51 compiler. The gives information about the size of the data variable and it's value range. Data type ...

Frequency of Oscillation of RC Phase Shift Oscillator

Derivation of Frequency of Oscillation We have to find out the transfer function of RC feedback network. Feedback Circuit of RC Phase Shift Oscillator Applying KVL to various loops on the figure, we get, $$I_1 \left(R+\frac{1}{j \omega C }\right) -I_2R=V_i \text{ ....(1)}$$ $$-I_1R+I_2\left (2R+\frac {1}{j\omega C}\right)-I_3R=0\text{ ... (2)}$$ $$0-I_2R+I_3\left(2R+ \frac{1}{j\omega C}\right)=0\text{ ...(3)}$$ Replacing \(j\omega\) with \(s\) and writing equations in the matrix form, $$\begin{bmatrix}R+\frac{1}{sC} & -R & 0 \\-R & 2R+\frac{1}{sC} & -R \\0 & -R & 2R+\frac{1}{2sC} \end{bmatrix}\begin{bmatrix}I_1\\I_2\\I_3\end{bmatrix}=\begin{bmatrix}V_i\\0\\0\end{bmatrix}$$ Using Cramer's rule to find out \(I_3\), $$\text{Let, }D=\begin{bmatrix}R+\frac{1}{sC} & -R & 0 \\-R & 2R+\frac{1}{sC} & -R \\0 & -R & 2R+\frac{1}{2sC} \end{bmatrix}$$ \(|D|=\begin{vmatrix}R+\frac{1}{sC} & -R & 0 \\-R & 2R+\frac{1}{...