Prev Up
Go backward to More things you might want:
Go up to A  Top-level Appendix Section

...and how to get it all:

Punctuation and Special Characters

``A quotation''

Word-breaking hyphenation.  A number range like 1995--97.

Breaking---of sentences---or ellipsis\dots

Section~2 should be unbreakable.

\dots HTML\@.  (Ensure proper spacing after punctuation\@!)  
Also e.g.\ when a period occurs after a lowercase letter in 
mid-sentence.
 
A     ...   Z     a     ...   z     0     ...   9

\'{a} \`{a} \^{a} \"{a} \~{a} \c{c} \ss   \L    \l

\OE   \oe   \AE   \ae   \AA   \aa   \O    \o

.     :     ;     ,     ?     !     `     '

\$    \&    \%    \#    \_    \~{}  \^{}  $\backslash$

\{    \}    \S    \P    \copyright \pounds ?` !`
 
A footnote\footnote{A footnote looks like this.}.
 
\emph{Emphasis!}     % preferred to {\em...\/}
\textbf{bold-face}   % preferred to {\bf...}
\texttt{fixed-width} % preferred to {\tt...}
\textsc{Small-caps}  % preferred to {\sc...}
\\
{Normalsize \large large \Large Large \LARGE LARGE 
 \huge huge \Huge Huge} \\
{Normalsize \small small \footnotesize footnotesize 
 \scriptsize scriptsize \tiny tiny}

\verb'Verbatim characters $ & % # _ ~ \ { } < | > ` " '
 
\section{Top-level Section}
\label{sec-1}...

\subsection{Sub-section}
\label{sec-1.1}...

\subsubsection{Sub-sub-section}
\label{sec-1.1.1}...
 
\section*{An Unnumbered Section}
...

\subsection*{An Unnumbered Sub-section}
...

\subsubsection*{An Unnumbered Sub-sub-section}
...

\paragraph{A run-in paragraph} 
...
 
\appendix

\section{Top-level Appendix Section}
\label{app-A}...
 

Lists of Paragraphs

\begin{quote}
Indented\ldots

Paragraphs.
\end{quote}

Lists: % may be nested, up to 3 levels deep
\begin{itemize}
\item Itemized
% never use optional arguments for itemized items

Paragraphs.
\end{itemize}

\begin{enumerate}
\item Enumerated \label{item-1}

Paragraphs.
\end{enumerate}

\begin{description}
\item[Labelled] Description 
% always use optional arguments for described items

Paragraphs.
\end{description}

\begin{menu} % provided by the package cofidoc
\item A list of short items. % just one line each, not too long
\item This is more compact than the usual itemization.
\end{menu}
 
Unindented\ldots

Paragraphs % the default with the package cofidoc

Small extra skip: % always leave a blank line after a skip

\smallskip

Medium extra skip:

\medskip

Big extra skip:

\bigskip

Line breaks\\
should generally be avoided!
% use \newpage if a pagebreak is needed
 

Figures and Tables

\begin{figure} % use [ht] to discourage floating
\begin{center}
Some diagram
\end{center}
\caption{A centred, floating figure} % optional
\label{fig-1}                        % optional
\end{figure}

\begin{table}  % use [ht] to discourage floating
\begin{center}
Some table
\end{center}
\caption{A centred, floating table}  % optional
\label{tab-1}                        % optional
\end{table}
 
\begin{tabular}{||lr|c|l||} % use only lcr| alignment specifiers
\hline\hline
Rows&\multicolumn{3}{c||}{Columns}\\
~&Flush-right&Centred&Flush-left\\
\hline\hline % better with just one \hline!
1.&text&text&text\\
2.&text&text&text\\
\hline
\end{tabular}

\begin{tabbing}
Tabbing \= can be useful\\
        \> but \= try to\\
        \>     \> avoid it\\
        \> if  \> possible\\
and keep it simple. % use only \= \> \\ \kill
\end{tabbing}
 

Formulae and Examples

Formulae in text: % use $...$ or \(...\)
$\Sigma=(S,\mathit{TF},\mathit{PF},P)$,
${\mathit{TF}_{w,s} \cap \mathit{PF}_{w,s}} = \emptyset$,
$w \in S^*$ when $w=s_1\ldots s_n$,
$s_1^M\times\cdots\times s_n^M$,
$h_s:s^{M_1}\rightarrow s^{M_2}$,
$M_i\in\mathbf{Mod}(\Sigma')$,
$f\ x\ y$, % use only \ for explicit spacing
$\mathit{diff} \neq diff$, % always use \mathit{...} for multi-char identifiers
or displayed: % use \[...\] or \begin{display}...\end{display}
\[\mathit{diff} \neq diff\]
 
Simple equations with numbers:
\begin{equation} % avoid using eqnarray
x+(y+z)=(x+y)+z \label{eq-1}
\end{equation}
 
\emph{Symbols (approximated when converted to HTML):}\\
\begin{description}

\item[Greek letters:]~

All but $\lambda$ and $\mu$ get spelled out when converted to HTML,
e.g., $\Sigma\ \sigma$.
 
\item[Math fonts:]~

$\mathrm{Roman} \mathit{Italic} \mathbf{Boldface} 
\mathcal{C|\mathit{alligraphic}$.
 
\item[Binary operation symbols:]~

$a+b-c\times d/e\div f$, 
$g\circ h\bullet i$, 
$j\cap k\cup l\setminus m$,\\
$n\sqcap o\sqcup p$,
$q\vee r\wedge s$,
$t\oplus u\otimes v\oslash w$
 
\item[Relation symbols:]~

$A < B = C > D : E := F$,
$G\leq H\neq I\geq J$,
$K\ll L\equiv M\gg N$,\\
$O\subset P\subseteq Q\sqsubseteq R\in S$,
$T\vdash U \dashv V\models W\perp X\mid Y\parallel Z$,
$1\sim 2\simeq 3\approx 4$
 
\item[Arrow symbols:]~

$a\leftarrow b\Leftarrow c\rightarrow d\Rightarrow
 e\leftrightarrow f\Leftrightarrow g\mapsto h$,\\
$i\longleftarrow j\longrightarrow k\longleftrightarrow
 l\Longleftarrow m\Longrightarrow n\Longleftrightarrow o\leadsto p$
 
\item[Miscellaneous symbols:]~

$\emptyset\ \top\ \bot\ \|\ \forall\ \exists\ \neg\ \sharp\ \backslash$
 
\item[Delimiters:]~

$(A)\ [B]\ \{C\}\ \lfloor D\rfloor\ \lceil E\rceil\
\langle F\rangle\ /G\backslash\ |H\|$
 
\item[Punctuation:]~

$0, 1.2\colon 3\to 4; 5?6!7"8`9\ldots@\cdots.$
 
\item[Stacking:]~

$x^{2y}, x^{y^{2}}, x^{y}_{1}$, 
$x_{2y}, x^{y_{1}}, x_{1}^{y}$,
$A\stackrel{a'}{\iff}B\stackrel{\textit{def}}{=} C$
\end{description}
 
Examples with a mixture of verbatim and symbols:
\begin{example} % provided by the package cofidoc (similar to alltt)
Spaces   and newlines
      are significant
but use of \textbf{other fonts} and symbols \(\rightarrow\) may spoil alignment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
\end{example}
 

Miscellaneous

A cross-reference to Section~\ref{sec-1.1}, item~\ref{item-1},
Figure~\ref{fig-1}, Table~\ref{tab-1}, equation~\ref{eq-1},
page~\pageref{page-this}.\label{page-this}

A hyper-reference to \footlink{the \CoFI\ WWW page}{\cofiWWW/}.
% provided by the package cofidoc

A citation of a paper, \CoFI\ notes, or FTP-able document \cite{cofidoc}.
% preferably put links to all non-HTML documents in bib entries.
 
An index entry\index{entry}, perhaps with an explicit
sort-key.\index{index entry sort-key@\emph{index entry sort-key}}
% the package cofidoc loads makeidx and calls \makeindex
% put \printindex just before \end{document} to format it.
 
Including separate files,
% use \input{FILE} or \include{FILE}
and prepending them to a document?
% \begin{filecontents}...\end{filecontents}...\documentclass...
 
Using standard \LaTeX\ packages?
% \usepackage{xspace}
 
Defining abbreviations for commands and environments (in the preamble)?
% use \newcommand and \newenvironment (never \def);
% use \newtheorem without its optional arguments
 


CoFI Note: C-1 --v1.0-- 23 May 1997.
Comments to pdmosses@brics.dk

Prev Up