Basically same as Formatting Sandbox in meta.SO, but since this and Statistical Analysis are the only 2 sites (I know) supporting TeX formatting, I believe we also need one here for testing it.
A suggestion: if you want to see you TeX previewed, pretend to type your question/answer. Then wait for 4 seconds. We have on the fly previewing for LaTeX here. This way we don't keep popping this question to the top of meta. | |||||
|
$\hskip -3em \color{red}{\Rule{5em}{1em}{1em}}$. Testing of negative skips to overlap the buttons on the left. $\rlap{\smash{\lower 3em{\color{red}{\Rule{5em}{2em}{0em}}}}}$Testing overlapping on the bottom. OK, both seem to be problems. | |||||||||
|
Testing spoiler: Without newlines:
With newlines:
| |||||
|
How does newcommand and renewcommand work? $$\newcommand{\sin}{FOO} \sin x$$ $$\sin y$$ $$\renewcommand{\nonexistent}{QUX} \nonexistent$$ | ||||
|
And now what does it look like to another user who doesn't suspect that the command has been redefined? $$\sin x$$ Very interesting. | |||||||||
|
you may also go to MathURL and write your formula there; just remember the dollar signs before putting it here. | ||||
|
Let me try if there is a difference between single dollar signs $\sum_{i = 0}^n k^i$ and double dollar signs $$\sum_{i = 0}^n k^i$$ | |||||
|
Can we do pictures? \begin{picture}(2,2) \put(0,0){\line(1,0){1}} \put(0,0){\line(0,1){1}} \end{picture} \begin{math} 2 \end{math} aw dang.. | |||||||||
|
Can we enter nested math inside | |||||||||||||||||
|
The preview recognizes $\rm\LaTeX$ environments and protects the contents from Markdown. Does that work once saved? \begin{equation} x _1 = y_ 1 \end{equation} Edit: It seems that it does! | ||||
|
Testing striking out: math: tag: url: | |||||||||||||||||||||||||||||
|
Preview seems to "leak" macro definitions, even to before the macro is defined. Let's see what happens with saving. This macro should be undefined here (and thus show the name in red): $\NobodyWouldCreateSuchALongMacroName$ So should this: $\AnotherRidiculouslyLongName$ Now start a local group. $\require{begingroup}\begingroup$ Define the first macro to $1$ $\def\NobodyWouldCreateSuchALongMacroName{1}$ and use it: $\NobodyWouldCreateSuchALongMacroName$ — This should display as $1$. Now define the second one, this time using gdef, to the value $2$. $\gdef\AnotherRidiculouslyLongName{2}$ Again, use it: $\AnotherRidiculouslyLongName$ — This should show up as $2$. Now end the group. $\endgroup$ Now the first macro should be undefined again: $\NobodyWouldCreateSuchALongMacroName$ The second macro, however, should still be defined (or I've misunderstood something): $\AnotherRidiculouslyLongName$ | |||||||||
|
$\rm{\bf Hint}\:\ (p\!-\!1)^2\! \mid p^q\!-1 \!\iff\! p\!-\!1\ \bigg|\ \dfrac{p^q\!-1}{p\!-\!1} = p^{q-1}\! +\cdots\!+p\! +\! 1$ $\rm\equiv q\ (mod\ p\!-\!1)$ | ||||
|
The following gives [Math Processing Error] on iOS Safari, but OK on iOS Chrome and on desktop browsers. $ \newcommand{\ket}[1]{\left| #1 \right\rangle} \newcommand{\Psih}{\hat{\Psi}} \newcommand{\Psihd}{\hat{\Psi}^\dagger} \newcommand{\bx}{\mathbf{x}} \newcommand{\Hh}{\hat{H}} \newcommand{\Hsp}{\Hh_{\mathrm{sp}}} \newcommand{\cn}{\chi(\bx_1,\dots\bx_n)} $ $\frac12 \sum_{i,j} V(\bx_i-\bx_j)\cn$ $$\ket{\chi_n} = \int d\bx_1 \dots d\bx_n \cn\prod_k \Psihd(\bx_k)\ket{0}$$ $$\begin{align} \hat{V}\ket{\chi_n} &= \frac12 \int d\bx d \bx'd\bx_1 \dots d\bx_n V(\bx-\bx')\cn\Psihd(\bx) \Psihd(\bx') \Psih(\bx')\Psih(\bx)\prod_k \Psihd(\bx_k)\ket{0} \\ &= \frac12 \int d\bx d \bx'd\bx_1 \dots d\bx_n V(\bx-\bx') \sum_{i,j:i\ne j}\delta(\bx-\bx_i) \delta(\bx'-\bx_j) \cn\prod_k \Psihd(\bx_k)\ket{0}\\ &= \frac12 \int d\bx_1 \dots d\bx_n \sum_{i,j:i\ne j} V(\bx_i-\bx_j) \cn\prod_k \Psihd(\bx_k)\ket{0} \end{align} $$ which is the interaction we expect. | ||||
|
This was done in an attempt (so far unsuccessful) to replicate the problem mentioned in line breaks in incorrect places However, when I was trying this, I stumbled upon some strange behavior of MathJax, which I can't explain. (And I am unable to spot a mistake in the TeX code below.) Two separate formulas - they work fine: $\|e^A\|=\|I+A+A^2/2!+A^3/3!+\ldots\|=\sup_{|x|=1}\|(I+A+A^2/2!+A^3/3!+\ldots)x\|=$ $\sup_{|x|}\|Ix+Ax+(A^2x)/2!+(A^3x)/3!+\ldots\|\leq \sup_{|x|}\|Ix\|+\sup_{|x|=1}\|Ax\|+\frac{\sup_{|x|}\|A^2x\|}{2!}+\frac{\sup_{|x|}\|A^3x\|}{3!}+\ldots$ Now without any changes they are put together and everything is broken: $\|e^A\|=\|I+A+A^2/2!+A^3/3!+\ldots\|=\sup_{|x|=1}\|(I+A+A^2/2!+A^3/3!+\ldots)x\|= \sup_{|x|}\|Ix+Ax+(A^2x)/2!+(A^3x)/3!+\ldots\|\leq \sup_{|x|}\|Ix\|+\sup_{|x|=1}\|Ax\|+\frac{\sup_{|x|}\|A^2x\|}{2!}+\frac{\sup_{|x|}\|A^3x\|}{3!}+\ldots$ This first part of the fromula still works ok: $\|e^A\|=\|I+A+A^2/2!+A^3/3!+\ldots\|=\sup_{|x|=1}\|(I+A+A^2/2!+A^3/3!+\ldots)x\|= \sup_{|x|}\|Ix+Ax+(A^2x)/2!+(A^3x)/3!+\ldots\|\leq$ When I add the next bit, it becomes weird: $\|e^A\|=\|I+A+A^2/2!+A^3/3!+\ldots\|=\sup_{|x|=1}\|(I+A+A^2/2!+A^3/3!+\ldots)x\|= \sup_{|x|}\|Ix+Ax+(A^2x)/2!+(A^3x)/3!+\ldots\|\leq \sup_{|x|}\|Ix\|+\sup_{|x|=1}\|Ax\|+$ $\|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| \|A\| \|B\| \|C\| $ $\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|+\|A\|+\|B\|+\|C\|$ I'm trying to prove this inequality:
My attempt of solution: Since $e^A:=I+A+A^2/2!+A^3/3!+\ldots$ we have $\|e^A\|=\|I+A+A^2/2!+A^3/3!+\ldots\|=\sup_{|x|=1}\|(I+A+A^2/2!+A^3/3!+\ldots)x\|=$ $\sup_{|x|}\|Ix+Ax+(A^2x)/2!+(A^3x)/3!+\ldots\|\leq \sup_{|x|}\|Ix\|+\sup_{|x|=1}\|Ax\|+\frac{\sup_{|x|}\|A^2x\|}{2!}+\frac{\sup_{|x|}\|A^3x\|}{3!}+\ldots$ Am I right so far? I couldn't go further I need help! Thanks a lot. | ||||
|
Testing matrix environments - are multiple backslashes needed? The following (with each line ending only with two backslashes) renders ok for me: $$\begin{pmatrix} 1/2 & 1/2 & 1/2 & 1/2 & 1/2 & 1/2 & 1/2 & 0 \\ 1/2 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1/2 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1/2 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1/2 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1/2 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1/2 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1/2 & 1 \end{pmatrix}$$ | |||||
|
$\hskip 36em {\require{cancel}\require{cancelto} _\text{psst! over here!}\cancelto{\hspace{1pt}}{\hspace{20pt}}}$ | ||||
|
\Tex
and\LaTeX
) for the text. – Asaf Karagila Jun 2 '12 at 21:09