biocon.nw1 1

The biocon package

Pieter Edelman

September 2, 2001

Abstract

The biocon package handles the typesetting of scientific species names. There are different modes of showing these names. Multiple occurances in the same document are taken care of.

Contents

1 The built-up of the package

According to [?], each package foolows a standard built-up, which is: 2biocon.styIdentification part Declaration of options Execution of options Package loading Main code 3The identification part is easy. This package is designed exclusively for L^{A}TEX 2ε, and it provides the biocon package. 4Identification part NeedsTeXFormat{LaTeX2e} ProvidesPackage{biocon}[2001/08/18] 5

2 The user interface

2.1 Brief syntax

6Main codeDeclarations The user interface Internal workings 7The biocon package automates the process of typesetting biological species names. Different conventions are followed for animals, bacteria, plants and fungi (the latter two follow the same conventions). These four main groups are used in this package. The amount of information the user provides is variable, for example the user should be able to typeset the full name with genus, old genus, author etc., but also just the normal binomial name.

Two kinds of commands are provided to reach this goal, the first is for quick-n-dirty use-only-once names. The other is a set of commands were first the species is declared, and then used throughout the document.

The quick-n-dirty commands look like:

• \plantlike [how]{parameters}
• \funguslike[how]{parameters}
• \animallike[how]{parameters}

• \bactlike [how]{parameters}

The declaration commands look like:

• \newplant {identifier}{parameters}

• \newfungus{identifier}{parameters}

• \newanimal{identifier}{parameters}

• \newbact {identifier}{parameters}

Declarated species can be used with

• \plant [how]{identifier} • \fungus[how]{identifier}

• \animal[how]{identifier}

• \bact [how]{identifier}

In these commands, parameters define the actual species. They can consist of genus, oldgenus, epithet, oldepithet, author, year, oldauthor, and oldyear, and follow a key=value syntax. Furthermore, more parameters can be defined by the user. The identifier is the identifier by which a species is recognized by the user. The commands to declare species are discussed below, while the commands to use them are discussed later.

The declaration commands are all piped through a single command. The quick-n-dirty commands also declare a new species, but always with the same identifier. This command is the \n@wsp@cies{type}{identifier}{parameters} command, where type is P, F, A, B for plant, fungus, animal or bacterium.

2.2 The implementation for the declaration part

As described above, all the declaration commands are piped through a single command (the quick-n-dirty commands don’t get a type identifier, only a single identifier is needed): 8The user interface newcommand{ newplant}[2]{ n@wsp@cies{P}{1}{2}} newcommand{ newfungus}[2]{ n@wsp@cies{F}{1}{2}} newcommand{ newanimal}[2]{ n@wsp@cies{A}{1}{2}} newcommand{ newbact}[2]{ n@wsp@cies{B}{1}{2}}

newcommand{ plantlike}[2][] { n@wsp@cies{}{Q@D}{2} plant[1]{Q@D} expandafter Q@DCleanup Q@DCleanList+} newcommand{ funguslike}[2][] { n@wsp@cies{}{Q@D}{2} fungus[1]{Q@D} expandafter Q@DCleanup Q@DCleanList+} newcommand{ animallike}[2][] { n@wsp@cies{}{Q@D}{2} animal[1]{Q@D} expandafter Q@DCleanup Q@DCleanList+} newcommand{ bactlike}[2][] { n@wsp@cies{}{Q@D}{2} bact[1]{Q@D} expandafter Q@DCleanup Q@DCleanList+} 9