Hey, Look: latex!!

Latex generated images are now supported fully in this Wiki. To generate an equation or other latex-formatted output, just put latex commands bewteen single or double dollar signs. For example, this:

$$\chi(k) = {{NS_0^2}\over{kR^2}} \sin(2kR + \delta(k))$$ 

which will render this:

$$\chi(k) = {{NS_0^2}\over{kR^2}} \sin(2kR + \delta(k))$$

and this:

The photo-electron mean-free-path, $\lambda(k)$, is a critical factor .... 

puts the lambda symbol right in-line:

The photo-electron mean-free-path, $\lambda(k)$, is a critical factor ....

Pretty nice, huh?


One issue is that line breaks cannot occur between single or double dollar signs. To do more complex formatting somewhat challenging, such as a simple table, you should use the latex format:

  {{{#!latex .....  

}}}

which can be used to render something like this:

\begin{tabular}{|l|cc|}\hline 
 Name & $\lambda$ & Uncertainty \\ \hline 
 $x$  & 1.0 & 0.05 \\
 $x'$ & 2.0 & 0.06 \\ \hline \end{tabular} 

Another nice example demonstrates how you can use latex packages:

\usepackage{graphics,color}
%%end-prologue%%
\newsavebox{\mysquare}
\savebox{\mysquare}{\textcolor{red}{\rule{1in}{1in} } }
\usebox{\mysquare}

note that the  %%end-prologue%%  is necessary.


From the original docs for the latex parser / formatter:

If f is entire (holomorphic on <<latex(\usepackage{dsfont} % $$\mathds{C}$$)>>) and without zeroes, for every closed curve <<latex($$\gamma$$)>> the integral <<latex($$\oint_\gamma \frac{f'(z)}{f(z)}dz$$)>> is zero.

We can also put it inline when using a macro. Then, a single percent ('%') character is used to separate the prologue from the body of the document: <<latex(\usepackage{graphics,color} % \newsavebox{\mysquare} \savebox{\mysquare}{\textcolor{blue}{\rule{1cm}{1cm} } } \usebox{\mysquare} )>> This works because you can only have a single line in a macro and thus a comment wouldn't make sense. You can still use % quoted with \ both in the prologue and the body.

anchors to latex code

Adding You can use an anchor like this.

%%anchor: Xanchor
\usepackage{graphics,color}
%%end-prologue%%
\newsavebox{\mysquare}
\savebox{\mysquare}{\textcolor{red}{\rule{1.5in}{0.5in} } }
\usebox{\mysquare}

UsingLatex (last edited 2009-10-09 19:46:33 by localhost)