Latex Glossary

Latex is where the $$ is at

(a mnemonic pun. Enjoy!)

Purpose

Taking notes while you go through a math or physics text is a necessity. It is simply impossible to absorb scientific information the way you would information from a novel or a social science text.

For example, there is no analogy between the five letters in the word emcee and the five symbols in the equation e=mc^2. You can read the word emcee in around 300 millisecond, and even if you don’t know what it means, look up the definition in another 10 seconds. Worst case scenario, you are ready to move on from emcee in 10 seconds. But e=mc^2 takes months to fully understand. Many tens of hours of study, thought, practice, review of preliminary equations, reflection on the underlying metaphysics are necessary before e=mc^2 makes as much intuitive sense as emcee. You simply cannot expect to read science the way you read English. Doing math is basically an athletic endeavor and requires action. That action comes in the form of note-taking. Typing is a motor behavior!

Although nothing beats pencil and paper for mathematical learning, you may wish to preserve your best handwritten insights on a website (like this one). The hyperlinking capacities of a website are ideal for tracking complex, interrelated ideas, and the easy taking and inserting of screenshots (of your own or other’s illustrations) allows you to illustrate your ideas quickly and effectively. In addition, the creation of multiple menus allows you to categorize your ideas with great precision. Plus, who knows — others may benefit from what you write!

Personally I recommend using a large monitor (e.g. the can’t-be-beat so-good-Apple-stopped-making-their-own-displays LG Ultrafine 5K for any Apple laptop) set up with your text on one side and your wordpress page on the other, allowing you to easily and effortlessly take notes. Pencil and paper on the desk beside you can allow you to work problems prior to typing out your conclusions and realizations)

Textbook on the left, your notes (e.g. in wordpress) on the right. Keep pencil and paper on desk to work problems.

The documentation below will help you write equations in the wordpress.com environment, but also will work in any environment that uses the world’s #1 language for typsetting mathematical phrases, LaTeX. You may also consider the “lite” version of LaTeX, Lyx, which is free, and the main word processing software used by scientists for communication for one another. You can, for any operating system, PC or Mac or other, download Lyx here.

Note that the wordpress official documentation on LaTeX support is here.

1. How to create a LaTeX Typing Environment in WordPress

For wordpress to “know” you are typing an equation you have to write $….$ as bookends around the equation. Plus the command latex after the first $. That is, you can’t just type “command m /e^{ix}” the way you would in Lyx, because it will not format properly until you write $latex….$ on either side of it, producing e^{ix}

This goes for big equations too. Size doesn’t matter!

1.1 Example: copying a matrix from lyx to wordpress

Let’s say you want to copy this matrix:

Fig. 1 When copying an equation, make sure to copy everything inside the outermost pink brackets.
Fig. 2 It will look like this when you copy it

When you paste it, it will look like this: \begin{array}{cc} F_{\mu\nu}= & \left[\begin{array}{cccc} F_{00} & F_{01} & F_{02} & F_{03}\\ F_{10} & F_{11} & F_{12} & F_{13}\\ F_{20} & F_{21} & F_{22} & F_{23}\\ F_{30} & F_{31} & F_{32} & F_{33} \end{array}\right]\end{array}

You write $latex….$ on either side of it this string, and in wordpress you get:

\begin{array}{cc} F_{\mu\nu}= & \left[\begin{array}{cccc} F_{00} & F_{01} & F_{02} & F_{03}\\ F_{10} & F_{11} & F_{12} & F_{13}\\ F_{20} & F_{21} & F_{22} & F_{23}\\ F_{30} & F_{31} & F_{32} & F_{33} \end{array}\right]\end{array}

Voila!

So to formalize this, the steps are:

  1. In Lyx (see Figures 1 and 2 immediately above) copy the equation from within the outermost formula brackets (not the formatted formula, which will not work). The brackets are pink, as in the image above. Don’t just copy the formatted formula, that will not contain the correct code!
  2. In wordpress (page or post, doesn’t matter) start a regular paragraph (no, you don’t need HTML!!!)…..
  3. Type $latex (note the space after latex!)…
  4. inset your equation copied from lyx in step 1…
  5. Remove the “Lyx Document” that comes along with the copied formula (this will be obvious)
  6. Type $ immediately after your last glyph. No space!

Because this *works* its impossible to type an example equation, because it gets converted into a finished formula (ff)! If you want to see what a raw formula (rf) looks like, edit this page and you will see the rf prior to being converted into the ff.

When done, click the Preview button to make sure formula works before publishing.

Please note that at some point you may become convinced that the & symbol in the copied lyx formula is messing things up for you. IT IS NOT. Formulae work just fine with & and you are probably doing something else wrong and blaming it on the poor &.

2. Alphabetical listing of latex code for common equations

Greek letters

{\mu\nu\theta\pi\eta\iota}

Code: {\mu\nu\theta\pi\eta\iota}

with spaces….

{\mu\;\nu\;\theta\;\pi\;\eta\;\iota}

Code: {\mu\;\nu\;\theta\;\pi\;\eta\;\iota}

Note: Not backslash /! Only forward slash \ works

Matrices

\begin{array}{cc} F_{\mu\nu}= & \left[\begin{array}{cccc} F_{00} & F_{01} & F_{02} & F_{03}\\ F_{10} & F_{11} & F_{12} & F_{13}\\ F_{20} & F_{21} & F_{22} & F_{23}\\ F_{30} & F_{31} & F_{32} & F_{33} \end{array}\right]\end{array}

Code: \begin{array}{cc} F_{\mu\nu}= & \left[\begin{array}{cccc} F_{00} & F_{01} & F_{02} & F_{03}\\ F_{10} & F_{11} & F_{12} & F_{13}\\ F_{20} & F_{21} & F_{22} & F_{23}\\ F_{30} & F_{31} & F_{32} & F_{33} \end{array}\right]\end{array}

Spaces

{x\;y\;z}

Code: {x\;y\;z}

Other wider/narrower spaces: \; \, \:

Subscript

F_{\mu\nu}

Code: F_{\mu\nu}

Superscript

F^{\mu\nu}

Code: F^{\mu\nu}

Variables

Put them in brackets { } if you want them to group together!

{x,y,z}\; {\mu,\nu}

Code: {x,y,z}\; {\mu,\nu}

Vectors

\mathbf{x},\vec{x},\mathbf{\hat{x}}

Code: \mathbf{x},\vec{x},\hat{x}

\mathbf{r}=x\mathbf{\hat{x}}+y\mathbf{\hat{y}}+z\mathbf{\hat{z}}

Code: \mathbf{r}=x\mathbf{\hat{x}}+y\mathbf{\hat{y}}+z\mathbf{\hat{z}}

\mathbf{r}=(x,y,z)

Code: \mathbf{r}=(x,y,z)