LaTeX LaTeX doesn't work with Safari?

  • Thread starter Thread starter bob012345
  • Start date Start date
  • Tags Tags
    Latex Work
Click For Summary
SUMMARY

The discussion centers on issues with generating LaTeX in the Safari web browser on an iPad. Users highlighted the necessity of using correct LaTeX syntax, particularly the use of braces for grouping expressions, as demonstrated in the corrected example \frac{a}{b}. The conversation also emphasized the importance of delimiters for proper parsing of LaTeX code, with specific examples provided for inline and block formatting. Overall, the exchange serves as a guide for users encountering similar formatting challenges in LaTeX.

PREREQUISITES
  • Understanding of LaTeX syntax and formatting
  • Familiarity with mathematical expressions and notation
  • Basic knowledge of using web browsers, specifically Safari
  • Experience with online forums and posting guidelines
NEXT STEPS
  • Research LaTeX syntax for fractions and grouping expressions
  • Explore advanced LaTeX formatting techniques and tricks
  • Learn about LaTeX parsing issues in different web browsers
  • Review online resources or guides for LaTeX best practices
USEFUL FOR

Students, educators, and researchers who utilize LaTeX for mathematical typesetting, particularly those facing challenges in web-based environments like Safari.

bob012345
Gold Member
Messages
2,300
Reaction score
1,021
I'm having no luck at all generating LaTex. I'm using the Safari web browser on an iPad.

Example:

\frac a b

I can see the LaTex formatting on other posts though.

Note to observers; I'm practicing LaTeX in this older message.

We start the problem with the Schrödinger equation;$$\hat H \Psi = E \Psi $$

The Hamiltonian for a particle on a sphere with no potential is;

$$\hat H = - \frac{\hbar^2}{2m} \nabla^2$$

Which gives for no radial function for fixed ##r##;

:$$\hat H =- \frac{\hbar^2}{2mr^2} \left [ {1 \over \sin \theta} {\partial \over \partial \theta} \left ( \sin \theta {\partial \over \partial \theta} \right ) + {1 \over {\sin^2 \theta}} {\partial^2 \over \partial \varphi^2} \right]$$This leads to the Eigenvalue equation written with the presumptive solutions, the spherical harmonics ##Y_\ell^m (\theta, \varphi )##;

$$\hat H Y_\ell^m (\theta, \varphi ) = \frac{\hbar^2}{2mr^2} \ell(\ell+1) Y_\ell^m (\theta, \varphi )$$

Which gives the energy Eigenvalues where ##m## is the mass.;

$$ E_\ell = {\hbar^2 \over 2mr^2} \ell \left (\ell+1\right) ~~~ \ell=0,1,\dots$$

The lowest normalized Eigenfunction is ##~~~ Y_{0}^{0}(\theta,\varphi)={1\over 2\sqrt{\pi} }## which means a constant probability density over the sphere. Interestingly, the ground state energy is zero for ##\ell=0## but the wavefunction is not. Rather than contradict the Heisenberg Uncertainty Principle, we can consider that the momentum and position of the particle are completely uncertain in the ground state. It is also instructive to choose the sphere radius to be equal to the Bohr radius ##a_0## which gives us after a little algebra;

$$ E_\ell = {e^2 \over 2 a_0} \ell \left (\ell+1\right) ~~~ \ell=0,1,\dots$$

Starting with the full Helium Hamiltonian which we will reduce to that of 2-Spherium;

$$\hat H(\vec{r}_1,\, \vec{r}_2) = - \frac{\hbar^2}{2m} (\nabla^2_1 + \nabla^2_2) - \frac{2 e^2}{r_1} - \frac{2e^2}{r_2} + \frac{e^2}{r_{12}} $$

Since the values of ##r## is fixed, we actually have a 4 dimensional space over the surface and 6 is we consider the actual volume of the spheres. We could add a positive ##Z = 2## charge fixed in the center of the sphere to create constant potential terms ##- \frac{2e^2}{a_0}## but that just adds a constant to the energy and is unnecessary. So for ##unperturbed## 2-Spherium (particles on a 2 dimensional sphere in 3 dimensional space) we are left with the Hamiltonian;

$$\hat H(\vec{r}_1,\, \vec{r}_2) = - \frac{\hbar^2}{2m} (\nabla^2_1 + \nabla^2_2) $$ where the vectors represent a fixed radius and variable angles ## \theta, \varphi ##.

This is separable and the solutions for each separate Hamiltonian are the the spherical harmonics ##Y_\ell^m (\theta, \varphi )## from which we can construct the total wavefunction which has to be anti-symmetric for the two electrons;

$$ \psi^{(total)}_\pm(\vec{r}_1, \vec{r}_2) = \frac{1}{\sqrt{2}} [\psi_{l_1,m_1}(\vec{r}_1) \psi_{l_2,m_2}(\vec{r}_2) \pm \psi_{l_2,m_2}(\vec{r}_1) \psi_{l_1,m_1}(\vec{r}_2)][S_{1,2}>$$

Where ##[S_{1,2}>## equals for the minus sign;
$$
\left.\begin{cases}
|1,1\rangle & =\;\uparrow\uparrow\\
|1,0\rangle & =\;(\uparrow\downarrow + \downarrow\uparrow)/\sqrt2\\
|1,-1\rangle & =\;\downarrow\downarrow
\end{cases}\right\}\quad s=1\quad\mathrm{(triplet)}
$$
And ##[S_{1,2}>## equals for the plus sign;$$
\left.\begin{cases}
|0,0\rangle & =\;(\uparrow\downarrow - \downarrow\uparrow)/\sqrt2\\
\end{cases}\right\}\quad s=0\quad\mathrm{(singlet)}
$$

For the spatial part we let ##\Phi_a(\vec r_i)## represent the ##Y_\ell^m (\theta_i, \varphi_i)## for a set of quantum numbers ##{\ell, m}## labeled ##a## or ##b## and coordinate set ##i## labeled 1 or 2;
$$\Psi_S(\vec r_1,\vec r_2)= \frac{1}{\sqrt{2}}[\Phi_a(\vec r_1) \Phi_b(\vec r_2) + \Phi_b(\vec r_1) \Phi_a(\vec r_2)]$$
$$\Psi_A(\vec r_1,\vec r_2)= \frac{1}{\sqrt{2}}[\Phi_a(\vec r_1) \Phi_b(\vec r_2) - \Phi_b(\vec r_1) \Phi_a(\vec r_2)]$$

Now the ground state ##Y_{0}^{0} (\theta_1, \varphi_1) = {1\over 2\sqrt{\pi} }## is a special case where the wavefunctions are not orthogonal and we can write the possible ground state wavefunctions.;
$$\Psi_S(\vec r_1,\vec r_2)[Spin_A>= \frac{1}{{2}}[ {1\over 2\sqrt{\pi} } {1\over 2\sqrt{\pi} }+ {1\over 2\sqrt{\pi}} {1\over 2\sqrt{\pi} }][singlet>$$$$\Psi_A(\vec r_1,\vec r_2)[Spin_S>= \frac{1}{{2}}[ {1\over 2\sqrt{\pi} } {1\over 2\sqrt{\pi} }- {1\over 2\sqrt{\pi}} {1\over 2\sqrt{\pi} }][triplet>$$

Which gives us;

$$\Psi_S(\vec r_1,\vec r_2)[Spin_A>= \frac{1}{{2}}[ {1\over 2{\pi}}][singlet>$$
$$\Psi_A(\vec r_1,\vec r_2)[Spin_S>= \frac{1}{{2}}[0][triplet>$$

Leaving the ground state of the ## unperturbed ## Hamiltonian as;
$$\Psi_S(\vec r_1,\vec r_2)[Spin_A>= {1\over 4{\pi}}[{1\over \sqrt{2} }(\uparrow\downarrow - \downarrow\uparrow)>$$

The total energy is zero for this state up to an arbitrary fixed potential;

$$ E_{total} = {e^2 \over 2 a_0} [ \ell_1 \left (\ell_1+1\right) + \ell_2 \left (\ell_2+1\right)]=0~~~ \ell_{1,2}=0$$
 
Last edited:
Physics news on Phys.org
bob012345 said:
I'm having no luck at all generating LaTex

Because you're not using correct LaTeX. I just used magic Mentor powers to edit your post; can you see the fraction now?

Here's the corrected LaTeX code for the fraction:

Code:
\frac{a}{b}
 
PeterDonis said:
Because you're not using correct LaTeX. I just used magic Mentor powers to edit your post; can you see the fraction now?

Here's the corrected LaTeX code for the fraction:

Code:
\frac{a}{b}

I see it has magic {} around each letter. Hmmmmm, that wasn't in the guide?

Trying it again for the second time ## \frac{a}{b} ##

$$ \frac a b $$
The excited states for the ##unperturbed## Hamiltonian are constructed from basis one-electron states;
$$\psi=N|\ell,m\rangle_i={{Y_\ell^m (\theta_i, \varphi_i )}\over R}~~~ i={1,2}$$

Where there are twelve possible states for the lowest possible transition from ##\Psi(\ell_1,\ell_2) ## going from ##\Psi(0,0) \rightarrow \Psi(0,1)##.

Written in ##|ket\rangle## notation;
$$
\left.\begin{cases}
{\frac{1}{\sqrt{2}}}(|0,0\rangle_1|1,1\rangle_2+|0,0\rangle_2|1,1\rangle_1)|singlet\rangle ~~para\\
\frac{1}{\sqrt{2}}(|0,0\rangle_1|1,0\rangle_2+|0,0\rangle_2|1,0\rangle_1)|singlet\rangle~~para\\
\frac{1}{\sqrt{2}}(|0,0\rangle_1|1,\bar1\rangle_2+|0,0\rangle_2|1,\bar1\rangle_1)|singlet\rangle~~para\\
\frac{1}{\sqrt{2}}(|0,0\rangle_1|1,1\rangle_2-|0,0\rangle_2|1,1\rangle_1)|triplet\rangle~~ortho\\
\frac{1}{\sqrt{2}}(|0,0\rangle_1|1,0\rangle_2-|0,0\rangle_2|1,0\rangle_1)|triplet\rangle~~ortho\\
\frac{1}{\sqrt{2}}(|0,0\rangle_1|1,\bar1\rangle_2-|0,0\rangle_2|1,\bar1\rangle_1)|triplet\rangle~~ortho\\
\end{cases}\right\}
$$

Where ##[S,m_s\rangle## equals;
$$
\left.\begin{cases}
|1,1\rangle & =\;|\uparrow\uparrow\rangle\\
|1,0\rangle & =\;\frac{1}{\sqrt{2}}|\uparrow\downarrow + \downarrow\uparrow\rangle\\
|1,-1\rangle & =\;|\downarrow\downarrow\rangle
\end{cases}\right\}\quad S=1\quad\mathrm{(triplet)}
$$
And;
$$
\left.\begin{cases}
|0,0\rangle & =\;\frac{1}{\sqrt{2}}|\uparrow\downarrow - \downarrow\uparrow\rangle
\end{cases}\right\}\quad S=0\quad\mathrm{(singlet)}
$$
The energy of these twelve degenerate lowest excited states is given by;

$$ E_{total} = {\hbar^2 \over 2 m R^2} [ \ell_1 \left (\ell_1+1\right) + \ell_2 \left (\ell_2+1\right)]= {\hbar^2 \over m R^2}~~~ \ell_{1,2}=0,1$$
 
Last edited:
bob012345 said:
that wasn't in the guide?

There are explicit examples of fraction markup in the guide. One of them does not use the braces (others do), but it does have the backslash before the "frac", thus: \frac a b. The lack of the backslash is what prevented your original markup from being parsed as a fraction. I put in the braces because I always do from habit, since they're always correct even in simple cases where they're not strictly needed, and that way I don't have to try to remember exactly what those simple cases are.
 
  • Like
Likes bob012345
bob012345 said:
Trying it again

Without delimiters around your LaTeX code it won't get parsed as code. So the full markup you would need to type would be (including the braces for the reason I gave in my last post):

Code:
##\frac{a}{b}##

for inline LaTeX like this ##\frac{a}{b}##, or

Code:
$$
\frac{a}{b}
$$

for LaTeX in its own paragraph like this:

$$
\frac{a}{b}
$$
 
  • Like
Likes bob012345
PeterDonis said:
Without delimiters around your LaTeX code it won't get parsed as code. So the full markup you would need to type would be (including the braces for the reason I gave in my last post):

I think I've got it... ##THANKS^2##
 
bob012345 said:
I see it has magic {} around each letter.

I guess you've figured this out by now, but just to make sure: {} are the general LaTeX syntax for "treat this whole expression as one unit". If you have a complicated expression you want under a radical sign, you would say \sqrt{expression}. If you have an expression you want as an exponent, you would say e^{expression} and so forth.

And brackets can be nested. If you wanted e to a fraction, you'd write e^{ \frac {a} {b} }.

bob012345 said:
Hmmmmm, that wasn't in the guide?

(Checks LaTeX Guide). OK, you're right, it isn't explicitly called out in its own paragraph. But the brackets show up in the examples. So you're supposed to absorb that lesson by osmosis, I guess. And then there's this line in the "Parentheses, brackets, etc" section:

However, braces are used by LaTeX itself for grouping things, as you've seen above, so if you want them to actually appear, you have to escape them by using backslashes. In this case the braces lose their normal grouping function, so you have to use a second, unescaped pair if you want them to be grouped.

One final note: There are a lot of LaTeX tricks that are implemented in this forum but not explicitly called out in the Guide. For more advanced formatting needs, I've found it helpful to do a general Google search and then try the suggestions I find to see if they work in the interpreter here. They usually do.
 
bob012345 said:
I see it has magic {} around each letter. Hmmmmm, that wasn't in the guide?
From the section Superscripts and Subcripts:
If a superscript or subscript has more than one character, enclose them in braces { }. This is a general rule for LaTeX commands, by the way: if they are to act on multiple characters, enclose those characters in braces.
 

Similar threads

Replies
16
Views
3K
Replies
5
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
1K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
3
Views
524
Replies
3
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K