Most useful/important (La)TeX commands/environments
Note that I refuse to exclude essential commands and environments. A list of the most important should be just that: any list of specific macros which misses \documentclass
and document
is deficient! In fact, these are so important that they are numbered zero in the list below (as a kind of concession to sticklers for following the rules dictated in questions):
Two + Fifty LaTeX Basics
Note that 8 and 9 are not errors. In particular, the first disjunct of 8 is a blank line and 9 is a comment (essential for avoiding spurious spaces).
Notes
The emphasis here is on producing an article. As such, commands for contents listings, lists of figures, chapters etc. are omitted. (Except that contents stuff is useful for
beamer
. See below.)- Obviously, some people's first LaTeX document will be a multi-chapter creation. Mine was. But I don't think this is the best way to begin, and it is not a route I would recommend to the non-desperate. (I was desperate so I would recommend it to me. But that is not the standard case, I hope.)
I've attempted to emphasise semantic mark-up as opposed to manual formatting. So
\textbf{}
,\itshape
,\small
etc. are out, whereas\section
etc. are in.\emph
is an exception in being halfway between semantic mark-up and manual formatting. However, insofar as it is the latter, it is essentially tied to content and is, therefore, the business of the document author and not the style author.- The writer of a class or package does not know which words I wish to, or ought to, emphasise!
The list tries to illustrate some key concepts without presenting an exhaustive list, which cannot be done in 50 items and would be fairly useless to a beginner in any case.
17 is there largely as an example of a character which is treated as special and so needs to be escaped. It is not the only character of this kind, of course, but it is the one I think I use most frequently.
18 is there as an example of an accent. It happens to be the one I need most often.
Regarding 23, at least in my discipline,
quotation
is more standard thanquote
. I only ever use the latter, really, by mistake or for a purpose it was not designed for.27 and 28 are disjunctive because I think it does not matter terribly much which system you first learn to format citations and references with, provided you learn some form of semantic mark-up.
- And it certainly would not be wise to learn multiple systems all at once! So the disjunctions here are necessary: the list ought not include commands for all three systems separately, as though a learner should immediately try to figure out the standard environment, BibTeX and BibLaTeX/Biber all at the same time.
I am not sure I would encourage a beginner to typeset presentations using LaTeX, but I've included some items for
beamer
anyway.\includegraphics
is listed here because I think this much less basic with respect to other kinds of documents, whereas it is pretty essential when preparing slides.
Letters were not mentioned in the question but are an extremely common, everyday kind of document to create, and knowing some basic commands and environments for making them seems appropriate.
The exception for mathematical environments (as opposed to commands) was added after I'd disappeared to work on the list, and I therefore planned the list on the assumption that mathematical mark-up was to be excluded.
For me, personally, this is not unreasonable as I typeset relatively little mathematics.
However, for a standard list, I'd recommend cutting the
beamer
section and adding stuff for mathematics instead.In any case, I would certainly cut 2 of the items here to make room for
$...$
and\[...\]
which I do actually use a bit.
Code
\documentclass[twocolumn]{article}
\usepackage{textcomp}
\newcommand*\mycommand[2][command]{%
\def\tempa{command}%
\def\tempb{env}%
\def\tempc{#1}%
\ifx\tempa\tempc \item \texttt{\textbackslash #2}
\else \item \texttt{\textbackslash begin\{#2\} \dots \textbackslash end\{#2\}}
\fi}
\pagestyle{empty}
\begin{document}
\begin{enumerate}\setcounter{enumi}{-1}
\mycommand{documentclass}\setcounter{enumi}{-1}
\mycommand[env]{document}
\mycommand{usepackage}
\mycommand{author}
\mycommand{title}
\mycommand{date}
\mycommand{maketitle}
\mycommand{section}
\mycommand{subsection}
\item \mbox{}\\\emph{or} \texttt{\textbackslash par}
\item \texttt{\%}
\mycommand[env]{enumerate}
\mycommand[env]{itemize}
\mycommand{item}
\mycommand{emph}
\item \texttt{\textquotesingle}
\item \texttt{--}
\item \texttt{---}
\mycommand{\&}
\mycommand{\textasciicircum}
\mycommand{footnote}
\mycommand{label}
\mycommand{ref}
\mycommand{cite}
\mycommand[env]{quotation}
\item \texttt{\textasciigrave\dots\textquotesingle}
\item \texttt{\textasciigrave\textasciigrave\dots\textquotesingle\textquotesingle}
\mycommand{dots}
\mycommand[env]{thebibliography}\\\emph{or} \texttt{\textbackslash bibliography}\\\emph{or} \texttt{\textbackslash printbibliography}
\mycommand{bibitem}\\\emph{or} \texttt{\textbackslash bibliographystyle}\\\emph{or} \texttt{\textbackslash usepackage[]\{biblatex\}}
\mycommand[env]{abstract}
\mycommand[env]{figure}
\mycommand[env]{table}
\mycommand{caption}
\mycommand{centering}
\mycommand[env]{tabular}
\mycommand{hline}
\item \texttt{\&}
\item[\textbullet] \emph{for letters:}
\mycommand[env]{letter}
\mycommand{name}
\mycommand{signature}
\mycommand{opening}
\mycommand{closing}
\mycommand{encl}
\item[\textbullet] \emph{for beamer:}
\mycommand[env]{frame}
\mycommand{titlepage}
\mycommand{tableofcontents}
\mycommand[env]{columns}
\mycommand[env]{column}
\mycommand[env]{block}
\mycommand{usetheme}
\mycommand{includegraphics}
\end{enumerate}
\end{document}
I am too lazy to make a list of 50 commands, but the LaTeX cheet sheet of Winston Chang, in a single page, cover a list of basic commands and even include a MWE. Very helpful for a novice.
If you do not agree completely with the selection, the LaTeX source file is available and you can modify under the terms of a CC license.
For a longer list, see the AMS-LATEX Reference Card #1.
Finally, I think that the Beamer class probably deserves its own list of commands as well as themes, templates options, etc. The Beamer appearance cheet sheet.
Since I'm a mathematician, I would say:
- sectional commands (
\section \subsection
) equation
environment (and their variants, e.g.,align
).- labels and refs for crossed references (
\label \eqref \cite
). - diagram packages (
xy tikz
)
and of course,
- AMS packages/commands (e.g.,
amsmath \DeclareMathOperator
).