Henry Poon's Blog

Really Handy LaTeX Commands

I just started writing in LaTeX and all too often I find myself forgetting commands that I had looked up a few minutes ago.  Therefore, I thought it’d help if I compiled a list of these.

Paragraph Spacing


This goes in the preamble of the document (after the document class stuff, but before the begin document line).

Removing Page Numbers


This gets rid of page numbers for that particular page, but the numbering sequence continues on the next page.

Adding Unnumbered Sections into the TOC


By default, unnumbered sections do not appear in the table of contents and therefore they must be added manually.

Defining a New Style with fancyhdr

fancyhf{}}% clear all header and footer fields

New style definitions should go before the very last curly brace.

Unnumbered Sections Not Working with leftmark and rightmark


For some reason, unnumbered sections don’t play nice with fancyhdr and don’t get treated as real sections when the leftmark and rightmark commands are used.  By using markboth, it fixes the problem.  Now my headers show the correct section name.

Bulleted List

item Here is a bullet.
item Here is another bullet.

Numbered List

item Here is item one.
item Here is item two.

Referencing Sections by Name

section{MyFirstSection} label{marker}
In section~nameref{marker} we defined...

Requires the hyperref package!  Put the line below in the preamble.


Linking to a Website




That gives an o with an umlaut.  Just replace the letter to get an umlaut on a different character.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Next Post

Previous Post

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2024 Henry Poon's Blog

Theme by Anders Norén