\documentclass{article}
\usepackage[pdftex,bookmarks=false,colorlinks=true]{hyperref}
\usepackage{biokey}

\author{A.\,Shipunov\footnote{e-mail: \texttt{plantago at herba.msu.ru}}}
\title{\texttt{biokey}, the package for precious and flexible identification keys}
\date{}

\begin{document}
\maketitle

This package can be used for creating biological identification keys. Different layouts are available.

\section{General usage}

This is the textual (``Swedish'') key:
                           
\begin{verbatim}
1. It is an animal ... 2.
-  It is a plant ... 3.
2. It is spiny ... Hedgehog
-  It is not very spiny ... Swift
=  It is not spiny at all ... Siskin
3(1). Lots of wood ... Spruce
- No wood ... Daisy
\end{verbatim}

The interpretation in suggested language is follows:

\bigskip\hrule

\begin{verbatim}
\Z1. It is an animal \T 2.

\AN  It is a plant \T 3.

\Z2. It is spiny \TT Hedgehog

\AN  It is not very spiny \TT Swift

\AAN  It is not spiny at all \TT Siskin

\ZZ3(1). Lots of wood \TT Spruce

\AN No wood \TT Daisy
\end{verbatim}

\hrule\bigskip

\Z1. It is an animal \T 2.

\AN  It is a plant \T 3.

\Z2. It is spiny \TT Hedgehog

\AN  It is not very spiny \TT Swift

\AAN  It is not spiny at all \TT Siskin

\ZZ3(1). Lots of wood \TT Spruce

\AN No wood \TT Daisy

\bigskip\hrule\bigskip

For aesthetics, I recommend that text before \verb|\T| should not end with dot (with the exception of abbreviations). \verb|\T| and \verb|\TT| are just the same thing, but second is better to designate names, and first is better for numbers. Sometimes, these two commands cannot format the paragraph without overfulls, in these (rare) cases I recommend the \verb|\TTTT| or ``old-style'' \verb|\TTT| which results are less precious but require less handwork.

\verb|\Z| and \verb|\ZZ| are different only for the second is used for reverse (``Williamsonian'') links, or for typical in serial zoological keys references for theses and antitheses. These two commands along with \verb|\AN|, \verb|\AAN|, and (not used in the example above) \verb|\AAAN| are used also for aesthetic hanging indentation.

Commands \verb|\N|, \verb|\NN| and \verb|\NNN| are for end-level objects (species, for example). They did not produce leading dots, but justify following object right, next with some space, or on next line, respectively.

Command \verb|\VT| is for hanging number references. There is also starred variant, \verb|\VT*|, where dot leader are also protruding outside right text margin.

By default, all \verb|\T|-like commands along with \verb|\N| and \verb|\NN| have the declaration \verb|\samepage| inside. One can redefine that via \verb|\SameDecl| hook. The most obvious redefinition is \verb|\relax|.

\verb|\SHRIFTZ| and \verb|\SHRIFTN| are two hooks which are defined by default as \verb|\relax| (do nothing), so one can redefine them to change the representation of these number and end-level objects, respectively. For example, 

\verb|\renewcommand{\SGRIFTZ}{\textbf}| 

will result in boldface theses numbers.

Several commands designed for commentaries after theses (or antitheses). \verb|\FK| put the text in footnote size, \verb|\KOM| imitate these, but without number, and \verb|\VPRAVO| aligned its contents to the right. \verb|\OTSTUP| is a hook for indentation of first two kinds of comments. By default it is 2\,em, but one can easily redefine it.

\section{``Automatic'' keys}

This sort of key can put numbers automatically. The example (needs two \LaTeX\ runs):

\bigskip\hrule

\begin{verbatim}
\TE{ani} It is an animal \SS{spi}

\AN  It is a plant \SS{pla}

\TE{spi} It is spiny \TT Hedgehog

\AN  It is not very spiny \TT Swift

\AAN  It is not spiny at all \TT Siskin

\SE{pla}{ani} Lots of wood \TT Spruce

\AN No wood \TT Daisy
\end{verbatim}

\hrule\bigskip

\TE{ani} It is an animal \SS{spi}

\AN  It is a plant \SS{pla}

\TE{spi} It is spiny \TT Hedgehog

\AN  It is not very spiny \TT Swift

\AAN  It is not spiny at all \TT Siskin

\SE{pla}{ani} Lots of wood \TT Spruce

\AN No wood \TT Daisy

\bigskip\hrule\bigskip

The biggest advantage of this type of key is that it is much easier to correct. It is possible to convert ``ordinary'' key to ``automatic'' key and further to HTML, with the help of \texttt{biokey2html} scripts (see documentation). See also how hyper-references working here.

\section{Leveled keys}

And, finally, the different key layout---so-called ``English'', or leveled keys:

\bigskip\hrule

\begin{verbatim}
\Z A. It is an animal

\begin{LE}

\Z AA. It is more or less spiny

\begin{LE}[2]

\Z AAA. It is very spiny \TT Hedgehog

\Z BBB.  It is not very spiny \TT Swift

\end{LE}

\Z BB. It is not spiny at all \TT Siskin

\end{LE}

\Z B. It is a plant

\begin{LE}

\Z CC. Lots of wood \TT Spruce

\Z DD. No wood \TT Daisy

\end{LE}
\end{verbatim}

\hrule\bigskip

\Z A. It is an animal

\begin{LE}

\Z AA. It is more or less spiny

\begin{LE}[2]

\Z AAA. It is very spiny \TT Hedgehog

\Z BBB.  It is not very spiny \TT Swift

\end{LE}

\Z BB. It is not spiny at all \TT Siskin

\end{LE}

\Z B. It is a plant

\begin{LE}

\Z CC. Lots of wood \TT Spruce

\Z DD. No wood \TT Daisy

\end{LE}

\bigskip\hrule\bigskip

It is more complicated then previous examples, so one may to consider \texttt{dichokey} package, but it is much less flexible.

\end{document}