Learn Mandatory LaTeX with PF: A Step-by-Step Guide

  • LaTeX
  • Thread starter Greg Bernhardt
  • Start date
In summary: WarrenIs it working now?- Warren\psilooks like it works; good job!- WarrenIn summary, PF is implementing LaTeX on PF with the use of a new bbcode [ tex][ /tex] or [ latex][ /latex], allowing members to use LaTeX code within the tags to display equations. Additional features include a popup window for displaying code, and the ability to use macros. However, there may be some issues with image generation and server speed.
  • #1
19,412
9,961
Ok folks, this is really really exciting. chroot for the last few days has been working very hard on implementing LaTeX on PF. We believe it is ready for extensive testing before we release it for community use. I also wouls like all the mentors to have atleast a basic grasp of how it all works and some basic equation code, because there will be a lot of questions and problems at first. It's really not that hard, just something new that can result in a lot of problems. Basicly we have added a new bbcode [ tex][ /tex] or [ latex][ /latex] either one works. Inside those tags you put in the latex code. An example of some latex code is this: a_n^2. That results in [tex]a_n^2[/tex]. Another really cool feature chroot thought up was having the images onclick make a popup window that displays the code. This allows members to learn from past equations on how to make the different elements. So please experiement because I believe this feature is the one that will really set us apart from the others.

Here is some documentation to get you started:
http://computing.ee.ethz.ch/.soft/latex/green/ltx-2.html [Broken]
https://www.physicsforums.com/misc/howtolatex.pdf
 
Last edited:
Physics news on Phys.org
  • #2
cool!

let me try..

[tex]my_first^try[/tex]
 
  • #3
[tex]
\left(
\begin{array}{cc}
a&b\\c&d
\end{array}
\right)
[/tex]
 
Last edited:
  • #4
Originally posted by Monique
cool!

let me try..

[tex]my_first^try[/tex]
:( not what I expected :P
 
  • #5
Originally posted by Monique
:( not what I expected :P
It looks like it did just what was expected.. :)

- Warren
 
  • #6
[tex]my_{second}^{try}[/tex]

:D I learn fast :P
 
  • #7
Originally posted by Monique
:D I learn fast :P
You kick ass. :)

[tex]
\begin{pmatrix} D_1t&-a_{12}t_2&\dots&-a_{1n}t_n\\
-a_{21}t_1&D_2t&\dots&-a_{2n}t_n\\
-a_{n1}t_1&-a_{n2}t_2&\dots&D_nt
\end{pmatrix}
[/tex]
 
Last edited:
  • #8
[tex]
\int_{0}^{1} x dx = \left[ \frac{1}{2}x^2 \right]_{0}^{1} = \frac{1}{2}
[/tex]

[tex]v(t) = v_0 + \frac{1}{2} a t^2[/tex]
 
  • #9
A little smaller maybe?

[tex]
\int_{0}^{1} x dx = \left[ \frac{1}{2}x^2 \right]_{0}^{1} = \frac{1}{2}
[/tex]

[tex]v(t) = v_0 + \frac{1}{2} a t^2[/tex]
 
Last edited:
  • #10
[tex]
\frac{\partialz(x,y)}{\partialx}

\nabla^\phi=\rho
[/tex]
 
  • #11
Originally posted by Tom
[tex]
\frac{\partialz(x,y)}{\partialx}

\nabla^\phi=\rho
[/tex]

OK, that's not even close to what I posted. It was supposed to be:

∂z(x,y)/∂x

[nab]2φ=ρ

[?]
 
  • #12
And now it comes up as yet a third thing when I quote it.

[?] [?] [?]
 
  • #13
This doesn't show up in the preview:

[tex]a_n^2[/tex]
 
  • #14


Out of curiosity, do macros work?

[itex]\newcommand{\binomd}[3]{\ensuremath{\binom{#2}{#1} {#3}^{#1} (1\!-\!{#3})^{#2-#1}}}

\binomd{x}{N}{p}[/itex]
 
Last edited:
  • #15


Yes they do, but I doubt they work across tag boundaries:[itex]\newcommand{\binomd}[3]{\ensuremath{\binom{#2}{#1} {#3}^{#1} (1\!-\!{#3})^{#2-#1}}}[/itex]

blah blah blah

[itex]\binomd{x}{N}{p}[/itex]
 
  • #16


No, they don't ...

Proper sub/superscripting ...

Bad: [itex]G_{diffeo}[/itex]
Good: [itex]G_{\it diffeo}[/itex]
 
  • #17
Tom, your LaTeX is flaky. :) Try this code

[tex]
\frac{
\frac{\partial (x,y)}{\partial z}
}{
\frac{\partial}{\partial x}
}
[/tex]

[tex]
\nabla^\phi=\mu
[/tex]

- Warren
 
Last edited:
  • #18
If you click on the source code for Tom's equations, you'll see that the source code is completely different from what is actually displayed. In fact, what is displayed has been changing: I first saw the equation displayed as "1/2", now as a 2x2 matrix, even though the source has always been for partial derivatives and a Laplacian.
 
  • #19
There are some caveats:

1) Images will *not* show up in previews. Only when the posts are committed.

2) Images will *not* show up properly in topic reviews.

Whether or not these changes are worthwhile is an open question.

- Warren
 
  • #20
Originally posted by Ambitwistor
If you click on the source code for Tom's equations, you'll see that the source code is completely different from what is actually displayed.
One more caveat: right now, if the latex compilation fails, no image is generated at all.

When this happens, the server tries to substitute *someone else's* image, picking one based on a similar filename. I am working on correcting this.

- Warren
 
  • #21
I see the same problem as Tom and Ambitwistor. I noticed something similar when clicking on the test thread they worked on.

I'm using linux and mozilla to browse. Can this bo platform-dependent? Do you see the same problem chroot? Greg?
 
  • #22
[tex]
\nabla^\phi=\mu
[/tex]
 
Last edited:
  • #23
[tex]
\psi
[/tex]
 
Last edited:
  • #24
Hold on guys, working on stuff!

[tex]
\frac{1}{2}
[/tex]

- Warren
 
Last edited:
  • #25
[tex]

/frac{
T_o
}{
T}
=1+ /frac{
gamma-1
}{
2}
M^2

[/tex]
 
Last edited:
  • #26
This latex is valid:

[tex]
\nabla \times C
[/tex]

This latex is not:

[tex]
\yourmom
[/tex]

- Warren
 
  • #27
enigma,

try \frac instead of /frac :)

- Warren
 
  • #28
Thanks Warren,

[tex]
\frac{T_o}{T}=1+\frac{\gamma-1}{2}M^2

[/tex]

Where is the list of the greek characters?

EDIT: found it
 
Last edited:
  • #29
[tex]

a = \sqrt{\gamma \times R \times T}

[/tex]
 
  • #30
[tex]
A \alpha B \beta \Gamma \gamma \Delta \delta \dots \Phi \phi \Chi \chi \Psi \psi \Omega \omega
[/tex]
 
Last edited:
  • #31
[tex]

\Delta V = -I_{sp} g_0 \ln{\frac{M_L + M_i}{M_L + M_i + M_P}}

[/tex]
 
Last edited:
  • #32
[tex]
\delta V = - I_{sp} \times g_0 \times \ln{\frac{M_L + M_i}{M_L + M_i + M_P}}
[/tex]
 
  • #33
[tex]

\frac{p_0}{p} = (1+\frac{\gamma-1}{2}M^2)^{\frac{\gamma}{\gamma-1}}

[/tex]
 
Last edited:
  • #34
Should we be worried if it gives the "Latex image is being generated, please reload" message?
 
  • #35
Hmm... image generation sure is being slow... ?

- Warren
 
<h2>1. What is LaTeX and why is it important for scientists?</h2><p>LaTeX is a typesetting software used for creating professional-looking documents, particularly in the fields of science and mathematics. It is important for scientists because it allows for precise and consistent formatting of complex equations, tables, and figures, making it easier to communicate research findings in a clear and organized manner.</p><h2>2. How can I get started with learning LaTeX?</h2><p>The best way to get started with learning LaTeX is to familiarize yourself with the basic syntax and commands. There are many online resources, such as tutorials and guides, that can help you get started. You can also practice by working on small projects and gradually increasing the complexity as you become more comfortable with the software.</p><h2>3. What is the difference between LaTeX and other word processing software?</h2><p>Unlike other word processing software, LaTeX uses a markup language to format documents, which allows for more precise control over the layout and design. It also has built-in features for handling complex mathematical equations and referencing, making it a preferred choice for scientific writing.</p><h2>4. Can I use LaTeX for collaborative writing?</h2><p>Yes, LaTeX has features that allow for collaborative writing, such as version control and the ability to merge changes from multiple authors. However, it may require some additional setup and knowledge of the software's collaboration tools.</p><h2>5. Is LaTeX difficult to learn?</h2><p>Learning LaTeX may seem daunting at first, but with practice and patience, it can become a valuable tool for scientists. The syntax may take some time to get used to, but there are many resources available to help you along the way. As with any new skill, it takes time and practice to become proficient.</p>

1. What is LaTeX and why is it important for scientists?

LaTeX is a typesetting software used for creating professional-looking documents, particularly in the fields of science and mathematics. It is important for scientists because it allows for precise and consistent formatting of complex equations, tables, and figures, making it easier to communicate research findings in a clear and organized manner.

2. How can I get started with learning LaTeX?

The best way to get started with learning LaTeX is to familiarize yourself with the basic syntax and commands. There are many online resources, such as tutorials and guides, that can help you get started. You can also practice by working on small projects and gradually increasing the complexity as you become more comfortable with the software.

3. What is the difference between LaTeX and other word processing software?

Unlike other word processing software, LaTeX uses a markup language to format documents, which allows for more precise control over the layout and design. It also has built-in features for handling complex mathematical equations and referencing, making it a preferred choice for scientific writing.

4. Can I use LaTeX for collaborative writing?

Yes, LaTeX has features that allow for collaborative writing, such as version control and the ability to merge changes from multiple authors. However, it may require some additional setup and knowledge of the software's collaboration tools.

5. Is LaTeX difficult to learn?

Learning LaTeX may seem daunting at first, but with practice and patience, it can become a valuable tool for scientists. The syntax may take some time to get used to, but there are many resources available to help you along the way. As with any new skill, it takes time and practice to become proficient.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
222
  • MATLAB, Maple, Mathematica, LaTeX
Replies
18
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • STEM Academic Advising
Replies
10
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • Feedback and Announcements
Replies
1
Views
266
  • Sticky
  • MATLAB, Maple, Mathematica, LaTeX
2
Replies
64
Views
183K
  • Feedback and Announcements
Replies
24
Views
4K
  • STEM Academic Advising
Replies
6
Views
3K
Back
Top