Home > Math > About writing LaTex Formulas online and on WordPress

About writing LaTex Formulas online and on WordPress

Online LaTex Equation Editor (this is similar to Scientific Workplace)

Latex Lab Project (hosted at Google Code) and LaTex to PDF can help write LaTex codes and compile codes without installing MikTex system on your local computer.

Online instructions and forums:

The codes for the formula cov(X,Y)=\mathbb{E}\left( cov(X,Y|Z)\right) +cov(\mathbb{E}(X|Z),\mathbb{E}(Y|Z)) on WordPress.com are

$ latex cov(X,Y)=\mathbb{E}\left( cov(X,Y|Z)\right) +cov(\mathbb{E}(X|Z),\mathbb{E}(Y|Z)) $

where $ latex must stick together without a space. The reason that I separated $ from the word latex is that I want to avoid that formula from being displayed again so that purely codes are shown above.

——– Below is a sample for math articles ——–

\documentclass[12pt]{article}
\usepackage{amssymb}
\usepackage{amsmath}
%%%%%%%%%%%
\usepackage{rotating,hyperref}

\DeclareMathOperator{\lk}{lk}
\newcommand{\chR}{\check{\mathcal{R}}}
\newcommand{\fsl}{\mathfrak{sl}}
\newcommand{\fu}{\mathfrak{u}}

\begin{document}
\title{TTILE……}
\author{YOUR NAME}
\date{}
\maketitle

\begin{abstract}
Blah Blah Blah…
\end{abstract}

\tableofcontents

\section{MY INTRODUCTION}
Blah Blah Blah

\subsection{OVERVIEW}
Blah Blah Blah
\vspace{5pt}
\noindent \textsc{AMS……}
\vspace{10pt}
\noindent \textsc{EMAIL……}

\end{document}

————————————————————

The following is a sample of codes for showing “Page 3 of 20” (for example) at the bottom of the page. It automatically counts the number of pages and shows the current page. The package for showing the last page number is the “lastpage”.

\usepackage{fancyhdr,lastpage}

\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[CE]{} %
\fancyfoot[CE,CO]{Page \thepage \ of \pageref{LastPage}}
\renewcommand{\headrulewidth}{0pt} %
\renewcommand{\footrulewidth}{0pt}

————————————————————

\documentclass[12pt]{amsart}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphics}
\usepackage{fullpage}
\theoremstyle{remark}
\include{psfig}
\title{AAA}
\author{AAA}
\date{}
\begin{document}
\maketitle
\begin{center} \small{April 2011} \end{center}
\vspace{13 mm}
\setcounter{tocdepth}{2}
%\tableofcontents
\end{document}
————————————————————

Here is another sample by Harvey Gould.

Below is some support documentation from WordPress

LaTeX

WordPress.com supports \LaTeX, a typesetting system that’s really good at formatting mathematical formulas and equations.

Using LaTeX

To include \LaTeX code in your post, use the following:

$latex your-latex-code-here$

So, for example,

$latex i\hbar\frac{\partial}{\partial t}\left|\Psi(t)\right>=H\left|\Psi(t)\right>$

produces

=H\left|\Psi(t)\right>” src=”http://s0.wp.com/latex.php?latex=i%5Chbar%5Cfrac%7B%5Cpartial%7D%7B%5Cpartial+t%7D%5Cleft%7C%5CPsi%28t%29%5Cright%3E%3DH%5Cleft%7C%5CPsi%28t%29%5Cright%3E&bg=ffffff&fg=000&s=0″ alt=”i\hbar\frac{\partial}{\partial t}\left|\Psi(t)\right>=H\left|\Psi(t)\right>” />

↑ Table of Contents ↑

LaTeX Error

If your \LaTeX code is broken, instead of the equation you’ll see an ugly yellow and red error message. Sorry, we can’t provide support for \LaTeX syntax, but there are plenty of useful guides elsewhere online. Or a quick post in our forums might find you a solution. One thing to keep in mind is that WordPress puts all of your \LaTeX code inside a \LaTeX math environment. If you try to use \LaTeX that doesn’t work inside the math environment (such as \begin{align} ... \end{align}), you will get an error:

↑ Table of Contents ↑

LaTeX Size

You can change the size of the LaTeX by specifying an s parameter after the \LaTeX code.

$latex \LaTeX&s=X$ , for example,

$ latex {x^2 + 2} & s=2 $ the result is:

{x^2+2}

Where X goes from -4 to 4 (0 is the default). These sizes correspond to \LaTeX‘s font size commands:

s= font size Example
-4 \tiny \LaTeX
-3 \scriptsize \LaTeX
-2 \footnotesize \LaTeX
-1 \small \LaTeX
0 \normalsize (12pt) \LaTeX
1 \large \LaTeX
2 \Large \LaTeX
3 \LARGE \LaTeX
4 \huge \LaTeX

↑ Table of Contents ↑

LaTeX Colors

WordPress tries to guess the background and foreground colors of your site and generates the \LaTeXimage accordingly. But, you can change the colors. You can specify bg and fg parameters after the \LaTeX code to change the background and foreground colors, respectively. The colors must be in hexadecimal RGB format: ffffff for white, 0000ff for bright blue, etc.

$latex \LaTeX&bg=ffcccc&fg=cc00ff&s=4$

\LaTeX

↑ Table of Contents ↑

LaTeX Packages

WordPress.com uses standard \LaTeX with the following packages:

  • amsmath
  • amsfonts
  • amssymb

↑ Table of Contents ↑

More Information

For more information about \LaTeX, you can visit LaTeX documentation site and TeX Resources by American Mathematical Society.

Advertisements
Categories: Math Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: