Science Forums: LaTeX testing - Science Forums

Jump to content

Welcome to ScienceForums.Net!

Welcome to ScienceForums.Net! We welcome science discussion at all levels — from beginners to researchers, covering topics from biology to computer science, and much more. Registration is fast and free, and allows you to post on the forums, so register now and join the discussions!
  
After you've registered, come in and introduce yourself, or visit the forum index. If you need any help  registering, posting, or if you just have some questions about our site, please feel free to contact us at staff at scienceforums dot net.

  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Create a ScienceForums.Net Blog!
Guest Message © 2012 DevFuse
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

LaTeX testing Rate Topic: -----

#1 Danijel Gorupec 


Meson
(I am testing latex, but no porn here)

test1...

a

test2...

{a}

test3...

123a

test4...

123.45\cdot a

test5...

[LaTeX Error: Syntax error]

test 6...

123,45a

test7...

abc

test8...

a \cdot b \cdot c

test9...

a_b

test10...

{a}_{b}

test11...

a_{b}^{c}

test12...


{abc}_{d ef}

test 13...

a b /c

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

test14...

a _{b }+3.1 \cdot {10 }^{-12}

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

test15...

3 \frac{x }{y }

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

test16...

2 \sin x \cos y

test17...

2 \, \mathrm{sin }\, x \, \mathrm{cos } \, y

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

test 18..

a \bar{b }c

test 19...

x \mathbf{y }z

test20...

a b \mathtt{c }\delta \mathcal{Y }

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

matrix test1...

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

limes test1...

\lim _{x \rightarrow \infty }\left( x +1 \right)


underline/overline test....

\underline{a b}\overline{c d}

sqrt test...

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

'd' test...

d x

(PN: what about partial derivation sign??)
0

#2 Danijel Gorupec 


Meson
two equations test:

\begin{array}{l}a \cdot b \\ a+b \end{array}

(PN: bad. Had to do it as array)
0

#3 Danijel Gorupec 


Meson
test - software generated code

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


test - software generated code

\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

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

#4 imatfaal 


Icon
Primate
 v_{close} = \frac{(v_1- v_2)}{1-\frac{v_1.v_2}{c^2}}

This post has been edited by imatfaal: 25 October 2011 - 11:13 AM

A little learning is a dangerous thing; drink deep, or taste not the Pierian spring:
there shallow draughts intoxicate the brain, and drinking largely sobers us again.

- Alexander Pope
feel free to click the green [+] ---->
0

#5 Spyman 


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

Q = mc \Delta T \Rightarrow \Delta T = \frac{Q}{mc}

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:

View PostRoyston, on 26 November 2006 - 11:11 AM, said:

y = x^2 - 4x + 3

(y + Delta y) = (x + Delta x)^2 - 4(x + Delta x) + 3

y + Delta y = x^2 + 2x Delta x + (Delta x)^2 - 4x - 4Delta x + 3

y + Delta y = (x^2 - 4x + 3) + 2xDelta x - 4Delta x + (Delta x)^2

Delta y = 2x Delta x - 4Delta x + (Delta x)^2

frac {Delta y}{Delta x} = 2x - 4 + Delta x

frac {dy}{dx} = 2x - 4

Just practicing differentiation...

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

a simple X^2 test equation.

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

View Postdave, on 2 June 2004 - 08:46 PM, said:

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


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


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

From here: http://www.sciencefo...latex-tutorial/

This post has been edited by Spyman: 17 April 2012 - 01:08 PM

A shadow hiding in the dark.
0

#6 Royston 


Señor Butt Monkey

View PostSpyman, on 17 April 2012 - 12:50 PM, said:

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

Q = mc \Delta T \Rightarrow \Delta T = \frac{Q}{mc}

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.sciencefo...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 \Delta with backslash and Delta without.

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

\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

EDIT: Now to quote the above

Quote

\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


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.

This post has been edited by Royston: 20 April 2012 - 09:30 AM

0

#7 Spyman 


Prowler

View PostRoyston, on 20 April 2012 - 08:36 AM, said:

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.
A shadow hiding in the dark.
0

#8 Royston 


Señor Butt Monkey

View PostSpyman, on 20 April 2012 - 09:40 AM, said:

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.
0

#9 Cap'n Refsmmat 


Icon
Mr. Wizard
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.)
Cap'n Refsmmat
SFN Administrator

Get in the chatroom!
0

#10 Spyman 


Prowler

View PostRoyston, on 20 April 2012 - 12:42 PM, said:

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.


View PostCap, on 20 April 2012 - 03:32 PM, said:

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:

View Postdave, on 29 May 2004 - 08:02 PM, said:

Examples

x^2_1 - Indexes (both subscript and superscript) on variables

f(x) = \sin(x) - A simple function.

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

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

\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 - 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:

View PostMartin, on 31 May 2004 - 04:04 AM, said:

testing

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


This post has been edited by Spyman: 20 April 2012 - 08:26 PM

A shadow hiding in the dark.
0

#11 Cap'n Refsmmat 


Icon
Mr. Wizard
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.
Cap'n Refsmmat
SFN Administrator

Get in the chatroom!
0

#12 Spyman 


Prowler

View PostCap, on 21 April 2012 - 04:11 AM, said:

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.
A shadow hiding in the dark.
0

#13 Gordon Watson 


Lepton
Q0.4Q0.3 with new notes0 and formatting to facilitate discussion.Bell's theorem refuted: the simple constructive model that Bell wanted.Q \in \{W, X, Y,Z\}.\;\;(1)^1A({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)^2B(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)^3E(AB)_Q\equiv((-1)^{2s}\cdot\int d\lambda\;\rho (\lambda)\;AB)_Q  \;\;(4)^4=((-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=[(-1)^{2s}]_Q\cdot[ 2\cdot P(B^+|Q,\,A^+) - 1]\;\;(6)^6=[(-1)^{2s}]_Q\cdot(cos[2s\cdot(a, b)]_Q - \tfrac{1}{2} cos[2s\cdot(a, b)]_{W,X}).\;\;(6a)^6E(AB)_W=  E(AB)_{'Malus'} = \tfrac{1}{2} cos[2 ({a},{b})].\;\;(7)^7E(AB)_X  =E(AB)_{'Stern-Gerlach'} = - \tfrac{1}{2} {a}\textbf{.}{b}.\;\;(8)^8E(AB)_Y=E(AB)_{\textit{Aspect (2004)}} = cos[2 ({a}, {b})].\;\;(9)^9E(AB)_Z=E(AB)_{\textit{EPRB/Bell (1964)}} = - {a}\textbf{.}{b}.\;\;(10)^{10}((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}((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}QED: A simple constructive model delivers Bell's hope and refutes his theorem!
1. My cdot (\cdot) 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

This post has been edited by Gordon Watson: 16 May 2012 - 07:54 AM

0

#14 Gordon Watson 


Lepton

View PostGordon Watson, on 16 May 2012 - 01:57 AM, said:

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

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

Q \in \{W, X, Y,Z\}.\;\;(1)^1
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
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
E(AB)_Q\equiv((-1)^{2s}\cdot\int d\lambda\;\rho (\lambda)\;AB)_Q  \;\;(4)^4
=((-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
=[(-1)^{2s}]_Q\cdot[ 2\cdot P(B^+|Q,\,A^+) - 1]\;\;(6)^6
=[(-1)^{2s}]_Q\cdot(cos[2s\cdot(a, b)]_Q - \tfrac{1}{2} cos[2s\cdot(a, b)]_{W,X}).\;\;(6a)^6
E(AB)_W=  E(AB)_{'Malus'} = \tfrac{1}{2} cos[2 ({a},{b})] = Correct classical result. \;\;(7)^7
E(AB)_X  =E(AB)_{'Stern-Gerlach'} = - \tfrac{1}{2} {a}\textbf{.}{b} = Correct classical result. \;\;(8)^8
E(AB)_Y=E(AB)_{\textit{Aspect (2004)}} = cos[2 ({a}, {b})] = Bell's theorem refuted. \;\;(9)^9
E(AB)_Z=E(AB)_{\textit{EPRB/Bell (1964)}} = - {a}\textbf{.}{b}= Bell's theorem refuted. \;\;(10)^{10}
((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}
((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}

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

1. My cdot (\cdot) 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


0

#15 Cap'n Refsmmat 


Icon
Mr. Wizard
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.
Cap'n Refsmmat
SFN Administrator

Get in the chatroom!
0

#16 Gordon Watson 


Lepton

View PostCap, on 16 May 2012 - 11:48 PM, said:

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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users