LaTeX Is Mandatory LaTeX Implementation on PF Beneficial for Members?

  • Thread starter Thread starter Greg Bernhardt
  • Start date Start date
AI Thread Summary
The implementation of LaTeX on Physics Forums (PF) is nearing completion and is set for extensive testing, with a new bbcode format introduced for users. Mentors are encouraged to familiarize themselves with basic LaTeX to assist members as they navigate this new feature. Users can input LaTeX code between [tex] and [/tex] tags, with a popup feature allowing them to learn from previous equations. However, there are some initial issues, such as images not appearing in previews and problems with LaTeX compilation that need addressing. Overall, this enhancement is expected to significantly benefit the community by improving the presentation of mathematical expressions.
  • #151
A better version?

<br /> \newcommand{\lineUp}{<br /> \begin{picture}(10,10)(0,0)<br /> \put(0,0){\line(1,1){10}} \put(2,0){\line(1,1){10}}<br /> \end{picture}<br /> }<br /> \newcommand{\lineDn}{<br /> \begin{picture}(10,10)(0,0)<br /> \put(0,10){\line(1,-1){10}}<br /> \end{picture}<br /> }<br /> <br /> \begin{array}{cc}<br /> \lineUp &amp; \lineDn \\<br /> \lineDn &amp; \lineUp<br /> \end{array}<br />
 
Physics news on Phys.org
  • #152
<br /> \newcommand{\lineUp}{<br /> \begin{picture}(10,10)(0,0)<br /> \put(0,0){\line(1,1){10}} \put(2,0){\line(1,1){10}}<br /> \end{picture}<br /> }<br /> <br /> \newcommand{\lineDn}{<br /> \begin{picture}(10,10)(0,0)<br /> \put(0,10){\line(1,-1){10}}<br /> \end{picture}<br /> }<br /> <br /> \begin{array}{ccccccc}<br /> \ &amp;\ &amp;\ &amp;\mathrm{H}&amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\ &amp;\ &amp;\mid&amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\ &amp;\ &amp;\mathrm{C}&amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\ &amp;\ &amp;\lineUp \lineDn &amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\mathrm{H}&amp;-&amp;\mathrm{C}\ \mathrm{C}&amp;-&amp;\mathrm{H}\\<br /> \ &amp;\ &amp;\ &amp;\mid\ \|&amp;\ &amp;\ \\<br /> \ &amp;\mathrm{H}&amp;-&amp;\mathrm{C}\ \mathrm{C}&amp;-&amp;\mathrm{H}\\<br /> \ &amp;\ &amp;\ &amp; \lineDn \lineUp &amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\ &amp;\ &amp;\mathrm{C}&amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\ &amp;\ &amp;\mid&amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\ &amp;\ &amp;\mathrm{H}&amp;\ &amp;\ &amp;\ \\<br /> \end{array}<br />

Oh well... not too bad. The good thing is that you can play with the "picture" command to make it nicer.
 
Last edited:
  • #153
Originally posted by ahrkron
<br /> \newcommand{\lineUp}{<br /> \begin{picture}(10,10)(0,0)<br /> \put(0,0){\line(1,1){10}} \put(2,0){\line(1,1){10}}<br /> \end{picture}<br /> }<br /> <br /> \newcommand{\lineDn}{<br /> \begin{picture}(10,10)(0,0)<br /> \put(0,10){\line(1,-1){10}}<br /> \end{picture}<br /> }<br /> <br /> \begin{array}{ccccccc}<br /> \ &amp;\ &amp;\ &amp;\mathrm{H}&amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\ &amp;\ &amp;\mid&amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\ &amp;\ &amp;\mathrm{C}&amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\ &amp;\ &amp;\lineUp \lineDn &amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\mathrm{H}&amp;-&amp;\mathrm{C}\ \mathrm{C}&amp;-&amp;\mathrm{H}\\<br /> \ &amp;\ &amp;\ &amp;\mid\ \|&amp;\ &amp;\ \\<br /> \ &amp;\mathrm{H}&amp;-&amp;\mathrm{C}\ \mathrm{C}&amp;-&amp;\mathrm{H}\\<br /> \ &amp;\ &amp;\ &amp; \lineDn \lineUp &amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\ &amp;\ &amp;\mathrm{C}&amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\ &amp;\ &amp;\mid&amp;\ &amp;\ &amp;\ \\<br /> \ &amp;\ &amp;\ &amp;\mathrm{H}&amp;\ &amp;\ &amp;\ \\<br /> \end{array}<br />

Oh well... not too bad. The good thing is that you can play with the "picture" command to make it nicer.

Yeah, I just started playing around with it last night.
 
  • #154
<br /> <br /> \newcommand{\lineUp}{\put(-10,-4){\line(1,1){20}}}<br /> \newcommand{\lineDn}{\put(-9,13){\line(1,-1){20}}}<br /> <br /> \newcommand{\dlineup}{\put(-10,0){\line(1,1){15}}\put(-6,-6){\line(1,1){15}}}<br /> <br /> \newcommand{\dlinedn}{\put(-9,9){\line(1,-1){15}}\put(-5,15){\line(1,-1){15}}}<br /> <br /> \begin {array}{ccccccccc}<br /> \ &amp;&amp;&amp;\ \ &amp;\mathrm{H}&amp;\ \ &amp;&amp;&amp;\\<br /> <br /> \ &amp;&amp;&amp;&amp;\mid&amp;&amp;&amp;&amp;\\<br /> \ &amp;&amp;&amp;\ \ &amp;\mathrm{C}&amp;\ \ &amp;&amp;&amp;\\<br /> <br /> \ &amp;&amp;&amp;\dlineup&amp;&amp;\lineDn&amp;&amp;&amp;\\<br /> <br /> \mathrm{H}&amp;-&amp;\mathrm{C}&amp;&amp;&amp;&amp;\mathrm{C}&amp;-&amp;\mathrm{H}\\<br /> <br /> \ &amp;&amp;\mid&amp;&amp;&amp;&amp;\mid\mid&amp;&amp;\\<br /> <br /> \mathrm{H}&amp;-&amp;\mathrm{C}&amp;&amp;&amp;&amp;\mathrm{C}&amp;-&amp;\mathrm{H}\\<br /> <br /> \ &amp;&amp;&amp;\dlinedn&amp;&amp;\lineUp&amp;&amp;&amp;\\<br /> <br /> \ &amp;&amp;&amp;\ \ &amp;\mathrm{C}&amp;\ \ &amp;&amp;&amp;\\<br /> <br /> \ &amp;&amp;&amp;&amp;\mid&amp;&amp;&amp;&amp;\\<br /> <br /> \ &amp;&amp;&amp;\ \ &amp;\mathrm{H}&amp;\ \ &amp;&amp;&amp;<br /> <br /> <br /> \end{array}<br />

Okay, this is more like it!
 
  • #155
Before you guys spend all your time reinventing the wheel, why don't you see if there's a LaTeX package to display chemical structures this way?

- Warren
 
  • #156
Maybe this one?

http://www.educat.hu-berlin.de/~voss/LaTeX/misc/chemistry.phtml

- Warren
 
Last edited by a moderator:
  • #157
Originally posted by chroot
Before you guys spend all your time reinventing the wheel, why don't you see if there's a LaTeX package to display chemical structures this way?

- Warren

But it's more FUN this way!
 
  • #158
This is a very long statement with some chemical formulas like <br /> \inline{H_2 O} stuck into gauge how the alignment tags are affecting the image placement. And I might as well include some methane here too, just for fun: \inline{C H_4}. I might even consider \inline{y = mx + b} or \inline{\frac{1}{\sqrt{1 - v^2/c^2}}} or even \inline{G_\textrm{diffeo}}. Don't worry about this text, since it's not relevant!

And just to make sure the display mode formulas still work:

<br /> e^x = \sum_{n=0}^\infty \frac{x^n}{n!} = \lim_{n\rightarrow\infty} (1+x/n)^n<br />

versus including inline, like this \inline{e^x = \sum_{n=0}^\infty \frac{x^n}{n!} = \lim_{n\rightarrow\infty} (1+x/n)^n<br /> }.

- Warren
 
Last edited:
  • #159
Let's see how this looks, embedding a little inline math inside a very long sentence: \inline{\sum_i x^i}. I think it should look okay! Let's find out. Some formulas for common chemicals are \inline{CH_4} and \inline{H_2 O}. They're more likely to put things like \inline{x^2} and so on, and I think that should look great! How about \inline{x} and \inline{x^2} and \inline{x_i}...

There, how's that Monique?

- Warren
 
  • #160
I think it looks very nicely inline! There is still a problem though with text subscripts, which seem to be lower than number subscripts, see the following example. I think the font might be done a tiny bit smaller too.

In grade school, we were taught that when a hydrogen atom shares its electron with a chlorine atom, a covalent bond is formed. It holds together the new molecule, hydrogen chloride. Since this compound exists as a gas at standard conditions, it is designated by the chemical formula \inline{HCl_{(g)} }. We also learned that when hydrogen chloride gas is dissolved in water, it becomes aqueous hydrogen chloride \inline{HCl_{(aq)} }. The proper name for this is hydrochloric acid.

Later on, we were informed that the molecule does not remain whole once in an aqueous solution. It ionizes to form \inline{H^+_{(aq)}} ions and \inline{Cl^-_{(aq)}} ions. We were left with this notion, relatively unaltered, until the Bronsted-Lowry unit, where we learned that the \inline{H^+_{(aq)}} ion actually reacts with a water molecule to form the hydronium ion: \inline{H_3O^+_{(aq)}}. Another way of looking at it is that the water molecule accepts a proton “donation” from \inline{\HCl_{(aq)} }. A crucial point in this unit was that a strong acid is defined as one that nearly completely dissociates (or is it ionizes?) in this manner.

Whoa! That’s the kicker. This means that the final products in the process of dissolving hydrogen chloride are almost entirely hydronium ions and chloride ions. This is the final “acidic” solution. It is the one that displays all of the empirical properties of an acid (i.e. conducts electricity, turns blue litmus red, has a pH < 7.0, etc.). These empirical properties can be attributed entirely to the hydronium ion. Put another way, in the final acidic solution, the so-called strong acid, \inline{HCl_{(aq)} }, is present in negligible quantities. So what is an acid, and how can we call \inline{HCl_{(aq)} } an acid? Again, I emphasize that for all “strong acids”, the aqueous acidic solution is composed almost entirely of hydronium ions (and the corresponding anions). If this is true, then does the term “hydrochloric acid” really have any meaning at all?
 
  • #161
I'm sorry Monique, I'm not sure what you're talking about. Are you suggesting that \inline{HCl_{(g)} } and \inline{CH_{(4)}} look different? They don't. Perhaps you're suggesting that \inline{HCl_{(g)} } and \inline{CH_{4}} look different? They ought to. One has parentheses in the subscript, which are "tall" symbols, while the other does not. Remember that TeX has to lay things out to leave room for superscripts! Putting parentheses around a subscript will necessary push it downwards.

Oh, and as far as the size... HCl and \inline{HCl} look pretty close to me.

- Warren
 
  • #162
This is just a test: \sin(\theta). Does this work? I imagine it will work nicely: \sin(\theta)

- Warren
 

Similar threads

Replies
5
Views
3K
Replies
3
Views
2K
Replies
1
Views
3K
Replies
4
Views
4K
Replies
60
Views
188K
Replies
2
Views
3K
Replies
4
Views
3K
Replies
766
Views
737K
Replies
1
Views
3K
Replies
3
Views
3K
Back
Top