# LaTeX Basics

#### topsquark

Forum Staff
Here is a good starting point to learn how to use LaTeX on PHF. Wrap the tags [ math ] ... [ /math ] around your code.

For example, the code
[noparse]$$\displaystyle \frac{1}{\sqrt{1 - \frac{v^2}{c^2}}}$$[/noparse]

produces
$$\displaystyle \frac{1}{\sqrt{1 - \frac{v^2}{c^2}}}$$

And note that you can left click on the script and a new box will pop up, giving you the code.

-Dan

#### Attachments

• 148.9 KB Views: 116

#### kiwiheretic

Testing

$$\displaystyle \frac{1}{\sqrt{1 - \frac{v^2}{c^2}}}$$

Hmmm, doesn't work for me.

Edit: Oh, it does now on page refresh, initially it just showed me the same expression surrounded by dollar signs

Last edited:
1 person

#### kiwiheretic

test

$$\displaystyle \frac{g}{h} \sqrt{x}$$

#### Liuxinhua

$$\displaystyle \frac{1}{\sqrt{1 - \frac{v^2}{c^2}}}$$

#### topsquark

Forum Staff
$$\displaystyle \frac{1}{\sqrt{1 - \frac{v^2}{c^2}}}$$
When you "stack" fractions like this the font size gets a little small. Personally I'd prefer something like this:
$$\displaystyle \frac{1}{\sqrt{1 - (v/c)^2 }}$$

There is also a way to force the LaTeX into changing the font size inside the bottom fraction. I don't recall if it was simply resizing the letters or if there was another command involved.

-Dan

Similar Physics Discussions Physics Forum Date
LaTeX
LaTeX
LaTeX
LaTeX