LaTeX

Editors

  • LyX, a WYSIWYG LaTeX editor useful for quick math writing.

Citation management

Editing equations

  • Use the \left and \right commands near brackets and parens to automatically size them (i.e. outer brackets will be made larger than inner brackets).
  • The align environment will add a tag to each line as a separate equation. Using split within an equation or align will assign one label to all lines.
  • You can use the \tag command to edit the number next to an equation
    • \tag{Hi Rob} will change an equation label from “(1)” to “(Hi Rob)”
    • This can be a useful, if somewhat hacky, way to add commentary to multiline equations
  • The \label command assigns an internal keyword which is used in referencing via \ref or \cref, whereas \tag will change the actual label that appears in the output.

Referencing equations/figures

  • The \Cref command will automatically determine what is being referenced based on the type of the object that was labelled. For example, \ref{mylabel} will display as “Equation (1)” if \label{mylabel} is next an equation and “Figure (1)” if \label{mylabel} is close to a figure.
  • \autoref does something similar, but depends on a specific convention within the label. For example, you need to prepend an eq: so \autoref{eq:mylabel} will show up as “Equation (1)”.

Some tips and tricks

  • Check out Detexify to find the correct math symbol by drawing it.

  • Check out the todonotes package to add todo notes and comments to LaTeX files and pdf output.

  • Use include or input to insert the content of another .tex file where you want it. For example, you can maintain a math macro file that you use often or organize your sections/chapters in different files. Also, read When should I use \input vs. \include?.

Previous
Next