Update: The original post below was written as part of Cosmic Variance. Every time you move your blog, stuff like this changes. Here, the way to put something into Latex is to start your comment with the tag
{latexpage}
Except — important! — use square brackets [] rather than curly braces {}. Then anything you put inside dollar signs gets interpreted as a LaTeX math formula, as usual. So
$g_{\mu\nu}$
should show up as
.
I’m using the QuickLaTeX plugin; more details here.
This stands in marked contrast with the previous system, explained below.
——————————————————-
For a long time I was reluctant to joint the many other sciencey blogs that had integrated equations by providing support for LaTeX, the technical typesetting system that nearly every physicist and mathematician uses. Possible reasons for this attitude include:
- We felt it was important to remain accessible to a wide range of readership, and feared that the appearance of equations would put people off (and tempt us into being unnecessarily technical).
- It sounded like work.
You can decide for yourself which is more true. The good thing is, there is no wrong answer!
But right now I am uninspired to blog because my brain is preoccupied with real science stuff. So I thought of posting about some of the fun ideas in quantum mechanics I’ve been learning about. But there’s really no way to do it without equations. So for that reason, and in belated honor of Donald Knuth’s birthday, I went and installed the LatexRenderer plugin.
So now it’s easy to include equations; they should even be available in comments. All you have to do is type [ latex ], then your LaTeX commands, then [ /latex ], except no spaces. So for example
[ latex ]R_{\mu\nu}-\frac{1}{2}Rg_{\mu\nu}=8\pi G T_{\mu\nu}[ /latex ],
if you left out the spaces, should produce
.
There are a million online tutorials; try this list of commands to get you started. Use comments to this post to try it out. (Sadly, no preview, so be careful, and this post will remain open for playing around.) One thing I’ve noticed: don’t use linebreaks within the formulas, just put everything on the same line. And use “displaystyle” if you want the look of a set-off (rather than in-line) equation.
Hmm, that sounds like an ergodic theorem. I don’t like ergodic theorems because they pretty much have zero relevance except in algorithm design (MCMC and stuff).
The essence of the pure density operator formalism: States are operators instead of vectors. Example: $latex |arangle to rho_a = |arangle langle a|$. Example: $latex psi(x) to rho(x,x’) = psi^*(x’)psi(x)$
Let $latex hat{S}$ be an operator that squares to 1. Then $latex (1pmhat{S})/2$ is (an opeartor and is also) an eigenstate of $latex hat{S}$ with eigenvalue $latex pm 1$. Example, spin 1/2 in the X direction has the operator:
$latex hat{X} = left(begin{array}{cc}0&11&0end{array}right)$
and therefore the density matrix state corresponding to it is:
$latex rho_X = 0.5left(begin{array}{cc}1&11&1end{array}right)$
If it passes this, that’s pretty good…
Hmm. ampersands sort of don’t work in the definition of arrays, they get an extra “amp;” .
Regarding preview, may I recommend the AJAX Comment Preview plugin? It’s the best preview function I’ve seen anywhere, and easy to set up.
Very nifty.
$latex begin{displaymath}
mathbf{A} =
left( begin{array}{ccccc}
1 & 0 & 0 & 0 &ddots
d & -2d -a^2 & d & 0 & ddots
0 & d & -2d -a^2 & d & ddots
ddots & ddots & ddots & ddots & ddots
hdots & 0 & 0 & 0 & 1
end{array} right).
end{displaymath}$
Well, it worked in my term paper… ah, well.
$latex lim_{3rightarrow4}sqrt{3}=2$
You could simply use the Emacs Muse package for the “all in one” Emacs. It supports latex2png.
Testing LaTeX in wordpress:
[ tex]
R=left(
begin{matrix}
2q_0^2-1+2q_1^2&2q_1q_2-2q_0q_3&2q_0q_2+2q_1q_3cr 2q_1q_2+2q_0q_3&2q_0^2-1+2q_2^2&2q_2q_3-2q_0q_1cr
2q_1q_3-2q_0q_2&2q_0q_1+2q_2q_3&2q_0^2-1+2q_3^2
end{matrix}
right)
Did not work… Sorry!
Pingback: LaTeX « Os Manos DALTON
A limerick:
$latex int_1^sqrt{3} z^2,dz cross cos(frac{3pi}{9} = lnsqrt[3]{3}$
2nd try:
A limerick:
$latex int_1^{sqrt{3}} z^2,dz cross cos(frac{3pi}{9}) = lnsqrt[3]{3}$
And of course I get the formatting right but screw up the formula.
$latex int_1^{sqrt[3]{3}} z^2,dz cos(frac{3pi}{9}) = lnsqrt[3]{e}$
$latex e^{i*pi}+1=0$
Hmm… not sure I know how this works, but…
$latex T = left(dfrac{L_ast left(1-Aright)}{ 16pisigmaD^2 }right)^frac{1}{4}$
Try again…
$latex T = left(dfrac{L_ast left(1-Aright)}{ 16pi sigma D^2 }right)^frac{1}{4}$
$latex partial_tvec{v}+[nablacdotvec{v}]=-frac{1}{rho}nablavec{p}-vec{g}-nabla² vec{v}²$
Wow that wasn’t right
$latex partial_tvec{v}+[nablacdotvec{v}]=-frac{1}{rho}nablavec{p}-vec{g}-nunabla^2 vec{v}^2$
$latex displaystyleint_{0}^{infty}frac{x^{-p}}{1+x}dx=frac{pi}{sinleft(pi pright)}$
$latex frac{Love – 0}{No Limit}$
How can I use Latex on Windows? I’ve downloaded the Windows thing but when the interface comes up, there’s nothing to do. You know, to start a new document and start typing with those sciencey fonts..what am I missing?
Let $latex epsilon
$latex Let epsilon
Formatting LaTEX commands seeems cumbersome to me. I’d think typing the Standard Model Lagrangian would be a nightmare! Embarrassing confession – I typed two dissertations using the Word equations editor. I’m waiting for the point and click version of LaTEX – essentially a more versatile version of Word E.E.
Re #71 & #74:
http://www.mackichan.com
It’s commercial, but its <bad french accent> very nice </bad french accent>
If anyone knows of a open source/cross-platform equivalent, I’m all ears. But don’t tell my Lyx, it doesn’t come close.