Thursday, July 9, 2009

Latex Samples

Here is an inline math $\sum_{i=1}^nx_iy_i$ and $\displaystyle \sum_i^n a_i$ this is a display math $$\sum_{i=1}^nx_iy_i$$. You can hover your mouse over the math symbols to see the corresponding latex code.
\[\sum_{i=1}^n a^2+b^2\]
If you dont't like the border around the image, go to the dashboard---> layout ---> edit html and look at the following code

.post img {
border:1px solid #CCCCCC;
padding:4px;
}

and remove the second line (border:... etc) or replace 1px into 0px.

Here are more examples:

Matrix
$\begin{pmatrix}a&b&c\\d&e&f\\g&h&i\end{pmatrix}$

Multiline Equation
$\begin{aligned}x^2+4x-21&=0\\x^2+4x&=25\\x^2+4x+4&=21+4\\(x+2)^2&=25\\x+2&=\pm 5\\x&=-2\pm 5\end{aligned}$

Commutative Diagram
$\usepackage[all]{xy}\xymatrix{0\ar[r]&A\ar[d]\ar[r]^f&B\ar[d]&\\&C\ar[r]_g&D\ar[r]&0}$

With Color
$\color{Magenta}\usepackage[all]{xy}\xymatrix{0\ar[r]&A\ar[d]\ar[r]^f&B\ar[d]&\\&C\ar[r]_g&D\ar[r]&0}$

$\color{Blue}A^2+z^5$
$\begin{tabular}\tiny{a}&\scriptsize{b}\end{tabular}$

22 comments:

  1. $\usepackage[all]{xy}\xymatrix{0\ar[r]&A\ar[d]\ar[r]^f&B\ar[d]&\\&C\ar[r]_g&D\ar[r]&0}$

    ReplyDelete
  2. $\[f\left( {a,b} \right) = \sqrt {{a^2} + {b^2}} \]$

    ReplyDelete
  3. $\[f:X \hookrightarrow Y\]$

    ReplyDelete
  4. \[\usepackage[all]{xy}\xymatrix{\ar@/^1.5pc/[rr]^{\mathrm{res}_{u,w}}F(u)\ar[r]_{\mathrm{res}_{u,v}}&F(v)\ar[r]_{\mathrm{res}_{u,v}}&F(w)}\]

    ReplyDelete
  5. \[\usepackage[all]{xy}\xymatrix@C+2em@R+2em{
    Q \ar@/_10pt/[ddr]_{q_1} \ar@/^10pt/[drr]^{q_2} \ar@{-->}[dr]|*+<3pt,3pt>{\scriptstyle u} & & \\
    & P \ar[d]_(0.4){p_1} \ar[r]^(0.4){p_2} & Y \ar[d]^{g}\\
    & X \ar[r]_{f} & Z
    }
    \]

    ReplyDelete
  6. \begin{definition}
    A (meet) semi-lattice L is a poset in which each pair of elements has an infimum.
    \end{definition}

    ReplyDelete
  7. Just testing this out, having trouble getting it working on my blog

    $\frac{a}{b}$

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete