Jump to content

LaTeX testing


Danijel Gorupec

Recommended Posts

(I am testing latex, but no porn here)

 

test1...

 

[math]a[/math]

 

test2...

 

[math]{a}[/math]

 

test3...

 

[math]123a[/math]

 

test4...

 

[math]123.45\cdot a[/math]

 

test5...

 

[math]123.45\cdota[/math]

 

test 6...

 

[math]123,45a[/math]

 

test7...

 

[math]abc[/math]

 

test8...

 

[math]a \cdot b \cdot c[/math]

 

test9...

 

[math]a_b[/math]

 

test10...

 

[math]{a}_{b}[/math]

 

test11...

 

[math]a_{b}^{c}[/math]

 

test12...

 

 

[math]{abc}_{d ef}[/math]

 

test 13...

 

[math]a b /c[/math]

 

(PN: not enoguh space between variables 'a' and 'b')

 

test14...

 

[math]a _{b }+3.1 \cdot {10 }^{-12}[/math]

 

(PN: minus sign is a bit too long and exponent should be placed a bit higher)

 

test15...

 

[math]3 \frac{x }{y }[/math]

 

(PN: too much space between fraction line and numerator/denominator)

 

test16...

 

[math]2 \sin x \cos y[/math]

 

test17...

 

[math]2 \, \mathrm{sin }\, x \, \mathrm{cos } \, y[/math]

 

(PN: I had to add \, space to make this look nice)

 

test 18..

 

[math]a \bar{b }c[/math]

 

test 19...

 

[math]x \mathbf{y }z[/math]

 

test20...

 

[math]a b \mathtt{c }\delta \mathcal{Y } [/math]

 

(PN: \mathcal{} works with uppercase letters only)

 

matrix test1...

 

[math]\left[ \begin{array}{ccc}s & b & c \\ x & y &z \\ a & & \end{array} \right][/math]

 

limes test1...

 

[math]\lim _{x \rightarrow \infty }\left( x +1 \right)[/math]

 

 

underline/overline test....

 

[math]\underline{a b}\overline{c d}[/math]

 

sqrt test...

 

[math]\sqrt{x }\sqrt[3 ]{y }[/math]

 

'd' test...

 

[math]d x[/math]

 

(PN: what about partial derivation sign??)

Link to comment
Share on other sites

test - software generated code

 

[math]x _{1 ,2 }=\frac{-b \pm \sqrt{{b }^{2 }-4 a c }}{2 a }[/math]

 

 

test - software generated code

 

[math]\sum _{n =1 }^{x }\frac{x }{n }\sin \frac{2 \pi x }{4 n } \, \; +\, \Gamma ^{2 } \left( g \right) \, +\beta ^{*}+{x _{a }}^{4 }+\, \mathrm{f' } \left( x \right) \, +\sin _{tot }z _{i } \, +1.1 [/math]

 

[math]\sin ^{2 } x \, +\, \mathrm{total } ^{2 } \left( G \right) \, +{\left\{ \begin{array}{c}X _{1 }\\ \vdots \\X _{n }\end{array} \right\} }[/math]

Link to comment
Share on other sites

  • 2 months later...
  • 4 months later...

[math] (m^2 - n^2)x^2 + (m^2 - n^2)y^2 -x(2m^2j -2n^2r) -y(2m^2k -2n^2s) = n^2r^2 +n^2s^2 - m^2k^2 - m^2j^2 [/math]

 

[math] (m -n)(m + n)x^2 + (m -n)(m + n)y^2 -x2j(m^2 - n^2r/j) -y2k(m^2 -n^2s/k) = n^2r^2 +n^2s^2 - m^2k^2 - m^2j^2 [/math]

 

[math] (m -n)(m + n)x^2 + (m -n)(m + n)y^2 -x2j(m-n)(m + nr/j) -y2k(m-n)(m +ns/k) = n^2r^2 +n^2s^2 - m^2k^2 - m^2j^2 [/math]

 

[math] (m + n)x^2 + (m + n)y^2 -x2j(m + nr/j) -y2k(m +ns/k) = \frac{n^2r^2 +n^2s^2 - m^2k^2 - m^2j^2}{m-n} [/math]

 

[math] x^2 + y^2 -\frac{x2j(m + nr/j)}{m+n} -\frac{x2k(m +ns/k)}{m+n} = \frac{n^2r^2 +n^2s^2 - m^2k^2 - m^2j^2}{(m-n)(m + n)} [/math]

 

[math] x^2 + y^2 -2x\frac{(jm + nr)}{m+n} -2y\frac{(km +ns)}{m+n} = \frac{n^2r^2 +n^2s^2 - m^2k^2 - m^2j^2}{(m-n)(m + n)} [/math]

 

[math] \left(x -\frac{(jm + nr)}{m+n}\right)^2 + \left(y -\frac{(km +ns)}{m+n}\right)^2 = \frac{n^2r^2 +n^2s^2 - m^2k^2 - m^2j^2}{(m-n)(m + n)} - \left(\frac{(jm + nr)}{m+n}\right)^2 -\left(\frac{(km +ns)}{m+n}\right)^2[/math]

 

yep - you're completely correct SchrHat. I was trying to complete the square too soon and ending up with unmanageable amounts of equation

Link to comment
Share on other sites

May I enquire as to what your profession is such that it entailed doing this calculation by hand?

Or is this merely your version of goofing off?

 

Oh - it's purely goofing off; technically I am meant to be chartering oil tankers but it's a quiet month.

 

The equation came from the homework section - vastor's question on the locus of all points the distance of which are a common ratio from two set points. I had never seen it asked - and with numbers in it clearly works out as a circle (which I must admit surprised me). But then it made more sense as I looked at it more - if you make the common ratio 1:1 (ie equidistant from two points) you get a circle of infinite radius (ie a straight line between the two which tallies). I just wanted to generalise it. But I did it here cos I think Vastor is still working on it himself

Link to comment
Share on other sites

  • 1 month later...

Test of formula that don't seem show properly in the preview:

 

[math]Q = mc \Delta T \Rightarrow \Delta T = \frac{Q}{mc}[/math]

 

Hmm, thats better...

 

Must be a problem with the old LaTeX and the new one, since these two posts shows up fine in the old thread:

 

[math]y = x^2 - 4x + 3[/math]

 

[math](y + Delta y) = (x + Delta x)^2 - 4(x + Delta x) + 3[/math]

 

[math]y + Delta y = x^2 + 2x Delta x + (Delta x)^2 - 4x - 4Delta x + 3[/math]

 

[math]y + Delta y = (x^2 - 4x + 3) + 2xDelta x - 4Delta x + (Delta x)^2[/math]

 

[math]Delta y = 2x Delta x - 4Delta x + (Delta x)^2[/math]

 

[math]frac {Delta y}{Delta x} = 2x - 4 + Delta x[/math]

 

[math]frac {dy}{dx} = 2x - 4[/math]

 

Just practicing differentiation...

 

[math]X^2 = sum_{i=1}^{n}frac {(O_i - E_i)^2}{E_i}[/math]

 

a simple [math]X^2[/math] test equation.

 

Just some of my current course content, need to get to grips with Latex, before I start asking any math related questions.

Technically speaking the "proper" way to do it is use mbox{}, like so:

 

 

[math]forall epsilon > 0 , exists ,delta > 0 mbox{ such that } |x-c| < delta Rightarrow left| frac{f(x)-f©}{x-c} - f'© right| < epsilon[/math]

 

 

(that's the definition of differentiability at a point c)

From here: http://www.scienceforums.net/topic/3751-quick-latex-tutorial/

Edited by Spyman
Link to comment
Share on other sites

Test of formula that don't seem show properly in the preview:

 

[math]Q = mc \Delta T \Rightarrow \Delta T = \frac{Q}{mc}[/math]

 

Hmm, thats better...

 

Must be a problem with the old LaTeX and the new one, since these two posts shows up fine in the old thread:

 

 

 

From here: http://www.scienceforums.net/topic/3751-quick-latex-tutorial/

 

2006 :o

 

I'm guessing the renderer has changed on this site since then, I think it now uses Mathjax IIRC. However, the backslash (used for all symbols, operators, accents et.c) seems to be absent when you quote the old Tex, so [math]\Delta[/math] with backslash and [math]Delta[/math] without.

 

Unrelated, but just need to check all is well (in case I need to ask any QM related stuff)

 

[math]\langle p^2_x \rangle = \frac {\hbar^2}{2a^2} \int^{\infty}_{-\infty}\psi^*_n(x) (\hat{A}^{\dagger}\hat{A}+\hat{A}\hat{A}^{\dagger})\psi_n(x) dx[/math]

 

EDIT: Now to quote the above

 

[math]\langle p^2_x \rangle = \frac {\hbar^2}{2a^2} \int^{\infty}_{-\infty}\psi^*_n(x) (\hat{A}^{\dagger}\hat{A}+\hat{A}\hat{A}^{\dagger})\psi_n(x) dx[/math]

 

Seeing as your post rendered properly, when quoted, that's not really surprising.

 

EDIT 2: I just clicked reply on one of the old LaTex posts, and the backslash is absent, so not sure if this is related to quoting the old Tex. For example, the fourth post of the LaTex tutorial, looks like this when hitting reply...

 

frac{a''}{a}= -frac{4pi G}{3}(rho + 3p)

 

with math tags removed.

Edited by Royston
Link to comment
Share on other sites

However, the backslash (used for all symbols, operators, accents et.c) seems to be absent when you quote the old Tex,

Yes, I noticed, but the wierd thing is that the backslash shows up fine when quoting the OP.

Link to comment
Share on other sites

Yes, I noticed, but the wierd thing is that the backslash shows up fine when quoting the OP.

 

I think we may have cross-posted while I was editing (see edit 2).

 

I'm assuming you mean the old posts in the LaTex tutorial when you say OP ? If so, that is doubly weird, because the backslash is absent when I tried replying to an old post (as per edit 2) and so also absent when quoting.

 

I was looking into a problem with Tex on Moodle in another forum, and issues can be browser dependent...especially IE (mainly due to microsoft crossing their arms to certain languages, e.g MathML).

 

In any case, maybe an admin knows what's going on. I'm not particularly savvy in this area.

Link to comment
Share on other sites

When we converted from vBulletin to IPB, some of the backslashes in old posts vanished in the strange ways you describe. When you quote or edit a post from before the conversion, you have to add them in manually.

 

We don't use MathJax, although we may soon. Currently your LaTeX is actually rendered by LaTeX and converted into a PNG image, and should display in any browser. (IE6 may have troubles with the transparency, though.)

Link to comment
Share on other sites

I think we may have cross-posted while I was editing (see edit 2).

 

I'm assuming you mean the old posts in the LaTex tutorial when you say OP ? If so, that is doubly weird, because the backslash is absent when I tried replying to an old post (as per edit 2) and so also absent when quoting.

No, I did read your edit before I posted and double checked what would happen when I quoted both post #4 as you mentioned and the OP in that thread.

 

 

When we converted from vBulletin to IPB, some of the backslashes in old posts vanished in the strange ways you describe. When you quote or edit a post from before the conversion, you have to add them in manually.

 

We don't use MathJax, although we may soon. Currently your LaTeX is actually rendered by LaTeX and converted into a PNG image, and should display in any browser. (IE6 may have troubles with the transparency, though.)

But like I said, I have found older posts that work fine to quote or directly copy the code from, this is the first time I have encountered problem doing that.

 

This is directly quoted part from the OP in the LaTeX Tutorial Thread, nothing is edited or added to it:

Examples

 

[math]x^2_1[/math] - Indexes (both subscript and superscript) on variables

 

[math]f(x) = \sin(x)[/math] - A simple function.

 

[math]\frac{dy}{dx} = \frac{1}{1+x^2}[/math] - Example of fractions - you can create small fractions by using \tfrac.

 

[math]\int_{-\infty}^{\infty} e^{-x^2} = \sqrt{\pi}[/math] - A nice integral.

 

[math]\mathcal{F}_{x} [\sin(2\pi k_0 x)](k) = \int_{-\infty}^{\infty} e^{-2\pi ikx} \left( \frac{e^{2\pi ik_{0}x} - e^{-2\pi ik_{0}x}}{2i} \right)\, dx[/math] - a Fourier Transformation, which is rather large.

 

And this is the fourth post from that thread where the backslashes have vanished for me exactly like they did for Royston:

testing

 

[math]frac{a''}{a}= -frac{4pi G}{3}(rho + 3p)[/math]

 

Edited by Spyman
Link to comment
Share on other sites

I had to fix the OP in the LaTeX tutorial when I made some changes, so it should work just fine. But I haven't edited every post in that thread.

Ahh, ok - that explains it then, it didn't show an edit note from the system at the bottom so I ruled that option out.

Link to comment
Share on other sites

  • 4 weeks later...

Q0.4

Q0.3 with new notes0 and formatting to facilitate discussion.

Bell's theorem refuted: the simple constructive model that Bell wanted.

[math]Q \in \{W, X, Y,Z\}.\;\;(1)^1[/math]

[math]A({a},\lambda)_Q\equiv \pm 1 = ((\delta_{a}\lambda\rightarrow\lambda_{a^+}\oplus\lambda_{a^-}) \;cos[2s \cdot (a,\lambda_{a^+}\oplus\lambda_{a^-})])_Q.\;\;(2)^2[/math]

[math]B(b,\lambda')_Q =((-1)^{2s} \cdot B(b, \lambda)_Q \equiv \pm 1 = ((\delta_{b}'\lambda'\rightarrow\lambda'_{b^+}\oplus\lambda'_{b^-}) \;cos[2s \cdot(b,\lambda'_{b^+}\oplus\lambda'_{b^-})])_Q. \;\;\;(3)^3[/math]

[math]E(AB)_Q\equiv((-1)^{2s}\cdot\int d\lambda\;\rho (\lambda)\;AB)_Q \;\;(4)^4[/math]

[math]=((-1)^{2s})_Q\cdot\int d\lambda \;\rho(\lambda)\;[P(A^+B^+|Q)-P(A^+B^-|Q)-P(A^-B^+|Q)+P(A^-B^-|Q)]\;\;(5)^5[/math]

[math]=[(-1)^{2s}]_Q\cdot[ 2\cdot P(B^+|Q,\,A^+) - 1]\;\;(6)^6[/math]

[math]=[(-1)^{2s}]_Q\cdot(cos[2s\cdot(a, b)]_Q - \tfrac{1}{2} cos[2s\cdot(a, b)]_{W,X}).\;\;(6a)^6[/math]

[math]E(AB)_W= E(AB)_{'Malus'} = \tfrac{1}{2} cos[2 ({a},{b})].\;\;(7)^7[/math]

[math]E(AB)_X =E(AB)_{'Stern-Gerlach'} = - \tfrac{1}{2} {a}\textbf{.}{b}.\;\;(8)^8[/math]

[math]E(AB)_Y=E(AB)_{\textit{Aspect (2004)}} = cos[2 ({a}, {b})].\;\;(9)^9[/math]

[math]E(AB)_Z=E(AB)_{\textit{EPRB/Bell (1964)}} = - {a}\textbf{.}{b}.\;\;(10)^{10}[/math]

[math]((2s\cdot h/4\pi)\cdot(\delta_{a} \lambda\rightarrow \lambda_{a^+}\oplus\lambda_{a^-})\;cos[2s\cdot(a, \lambda_{a^+} \oplus\lambda_{a^-})])_Q = (\pm1)\cdot(s\cdot h/2\pi)_Q.\;\;(11a)^{11}[/math]

[math]((2s\cdot h/4\pi)\cdot(\delta_{b}' \lambda'\rightarrow\lambda'_{b^+}\oplus\lambda'_{b^-})\;cos[2s\cdot(b,\lambda'_{b^+}\oplus\lambda'_{b^-})])_Q = (\pm1)\cdot(s\cdot h/2\pi)_Q.\;\;(11b)^{11}[/math]

QED: A simple constructive model delivers Bell's hope and refutes his theorem!

1. My cdot [math](\cdot)[/math] puzzle may be seen in the different cdot spacings in (6a) compared to (11a) and (11b). Why do the spacings differ when the codes appear to be identical?

2. How do I now line-space these equations neatly? A single "hit return button" doesn't do it.

Thanks, Gordon

Edited by Gordon Watson
Link to comment
Share on other sites

Q0.4

Q0.3 with new notes0 and formatting to facilitate discussion.

Bell's theorem refuted: the simple constructive model that Bell wanted.

[math]Q \in \{W, X, Y,Z\}.\;\;(1)^1[/math]

[math]A({a},\lambda)_Q\equiv \pm 1 = ((\delta_{a}\lambda\rightarrow\lambda_{a^+}\oplus\lambda_{a^-}) \;cos[2s \cdot (a,\lambda_{a^+}\oplus\lambda_{a^-})])_Q.\;\;(2)^2[/math]

[math]B(b,\lambda')_Q =((-1)^{2s} \cdot B(b, \lambda)_Q \equiv \pm 1 = ((\delta_{b}'\lambda'\rightarrow\lambda'_{b^+}\oplus\lambda'_{b^-}) \;cos[2s \cdot(b,\lambda'_{b^+}\oplus\lambda'_{b^-})])_Q. \;\;(3)^3[/math]

[math]E(AB)_Q\equiv((-1)^{2s}\cdot\int d\lambda\;\rho (\lambda)\;AB)_Q \;\;(4)^4[/math]

[math]=((-1)^{2s})_Q\cdot\int d\lambda \;\rho(\lambda)\;[P(A^+B^+|Q)-P(A^+B^-|Q)-P(A^-B^+|Q)+P(A^-B^-|Q)]\;\;(5)^5[/math]

[math]=[(-1)^{2s}]_Q\cdot[ 2\cdot P(B^+|Q,\,A^+) - 1]\;\;(6)^6[/math]

[math]=[(-1)^{2s}]_Q\cdot(cos[2s\cdot(a, b)]_Q - \tfrac{1}{2} cos[2s\cdot(a, b)]_{W,X}).\;\;(6a)^6[/math]

[math]E(AB)_W= E(AB)_{'Malus'} = \tfrac{1}{2} cos[2 ({a},{b})] =[/math] Correct classical result. [math]\;\;(7)^7[/math]

[math]E(AB)_X =E(AB)_{'Stern-Gerlach'} = - \tfrac{1}{2} {a}\textbf{.}{b} =[/math] Correct classical result. [math]\;\;(8)^8[/math]

[math]E(AB)_Y=E(AB)_{\textit{Aspect (2004)}} = cos[2 ({a}, {b})] =[/math] Bell's theorem refuted. [math]\;\;(9)^9[/math]

[math]E(AB)_Z=E(AB)_{\textit{EPRB/Bell (1964)}} = - {a}\textbf{.}{b}=[/math] Bell's theorem refuted. [math]\;\;(10)^{10}[/math]

[math]((2s\cdot h/4\pi)\cdot(\delta_{a} \lambda\rightarrow \lambda_{a^+}\oplus\lambda_{a^-})\;cos[2s\cdot(a, \lambda_{a^+} \oplus\lambda_{a^-})])_Q = (\pm1)\cdot(s\cdot h/2\pi)_Q.\;\;(11a)^{11}[/math]

[math]((2s\cdot h/4\pi)\cdot(\delta_{b}' \lambda'\rightarrow\lambda'_{b^+}\oplus\lambda'_{b^-})\;cos[2s\cdot(b,\lambda'_{b^+}\oplus\lambda'_{b^-})])_Q = (\pm1)\cdot(s\cdot h/2\pi)_Q.\;\;(11b)^{11}[/math]

QED: A simple constructive model delivers Bell's hope and refutes his theorem.

1. My cdot [math](\cdot)[/math] puzzle may be seen in the different cdot spacings in (6a) compared to (11a) and (11b). Why do the spacings differ when the codes appear to be identical?

2. How do I now line-space these equations neatly? A single "hit return button" doesn't do it. For the past two days I struggled for hours to produce the above result. Today I tried once again: and today the system performed exactly as expected (from experience on other forums). IN PARTICULAR, the <RETURN button> did the line spacing as required. IT would not do that over the past two days.

3. Suggestions re formatting guidelines and what might have been going on would be welcome.

Thanks, Gordon

Link to comment
Share on other sites

The cdot spacing I do not know the answer to. We use standard LaTeX, so the equations render just like any other LaTeX system would render them; that's not in my control.

 

Putting line spacing in the midst of a [math] tag is probably a bad idea, because LaTeX is not amenable to line breaks in equations. You want to do so outside of the math tag, or use the \begin{align} environment.

Link to comment
Share on other sites

The cdot spacing I do not know the answer to. We use standard LaTeX, so the equations render just like any other LaTeX system would render them; that's not in my control.

 

Putting line spacing in the midst of a [math] tag is probably a bad idea, because LaTeX is not amenable to line breaks in equations. You want to do so outside of the math tag, or use the \begin{align} environment.

No breaks in equations were required or requested. The line spacing via <RETURN> key (and every other method tried) was always outside the [math] tags. Only today did it work!? I'll look into your "align" suggestion. Thanks.
Link to comment
Share on other sites

  • 5 months later...
  • 10 months later...
  • 11 months later...
  • 6 months later...

[Math] x = 3 [/math]

[math] fffff tg x = \frac {\sin x} {\cos x} [/math]

[Math] 9 = 3^2 [/math]

[Math] s _{f}-2.5 \cdot {10}s^{+7} [/math]

[math]\left [ \begin{\array}{aa}y & d \\ f & g \\ \end{\array} \right][/math]

Edited by mavrlk3
Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.