LaTex MarkUp - align equations

I'm very elated by the fact that it has LaTeX support. I would like to know whether the \begin{align} \end{align} environment could be used, because it looks very good since the equations are aligned. If not how can i make this LaTeX command look better?

\begin{align*}
\int \frac{1}{(2x^{2}+4x-2)^{-\frac{3}{2}}} \ \textrm{dx} = \frac{\sqrt{2}}{8} \int\frac{\sec{t} \cdot \tan{t}}{\tan^{3}{t}} \ \textrm{dt} \\\ = \frac{\sqrt{2}}{8} \int\frac{\cos{t}}{\sin^{2}{t}} \ \textrm{dt}
\end{align*}

Topic latex plugins Wordpress

Category Web


This would work out of the box with the QuickLaTeX plugin (which I believe is only available for self-hosted WP blogs so I'm not sure this applies to the OP). The input

[latex][+preamble]\usepackage{amsmath}[/preamble]
\begin{align*}
  \int \frac{1}{(2x^{2}+4x-2)^{-\frac{3}{2}}} \textrm{d}x
    &= \frac{\sqrt{2}}{8} \int\frac{\sec{t} \cdot \tan{t}}{\tan^{3}{t}} \textrm{d}t \\
    &= \frac{\sqrt{2}}{8} \int\frac{\cos{t}}{\sin^{2}{t}} \textrm{d}t
\end{align*}[/latex]

gives me on my blog

enter image description here


As mentioned, WordPress does not provide general LaTeX support, but usually only mathmode support. Thus you have to use something that works from within mathmode, and not its own environemnt. In this case, there is a very useful one called 'aligned' (with the 'ed' at the end). To render the above in your default WordPress.com LaTeX (or even in MathJax-LaTeX plug-in), use the following code:

$latex
\begin{aligned}
\int \frac{1}{(2x^{2}+4x-2)^{-\frac{3}{2}}} \ \textrm{dx} &= \frac{\sqrt{2}}{8} \int\frac{\sec{t} \cdot \tan{t}}{\tan^{3}{t}} \ \textrm{dt} \\ &= \frac{\sqrt{2}}{8} \int\frac{\cos{t}}{\sin^{2}{t}} \ \textrm{dt} 
\end{aligned}
$

From the link t31os has provided you can clearly see that:

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.

so no you can't but, you can use Youngwhan's Simple Latex plugin that has an align option.

Update

following Jan's comment you can use google chart api

http://chart.apis.google.com/chart?cht=tx&chl=\begin{align*}%20\int%20\frac{1}{%282x^{2}+4x-2%29^{-\frac{3}{2}}}%20\%20\textrm{dx}%20&=%20\frac{\sqrt{2}}{8}%20\int\frac{\sec{t}%20\cdot%20\tan{t}}{\tan^{3}{t}}%20\%20\textrm{dt}%20\\%20&=%20\frac{\sqrt{2}}{8}%20\int\frac{\cos{t}}{\sin^{2}{t}}%20\%20\textrm{dt}%20\end{align*} 

and isert it as the img src.

Hope this helps

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.