Debian Codegraph @

texmf-dist/doc/latex/biocon/source.tex

raw
1 \documentclass{article}% ===> this file was generated automatically by noweave --- better not edit it
2 \usepackage{noweb}
3 \usepackage{hyperref}
4 \usepackage[a4paper,margin=1.5cm]{geometry}
5
6 \newcommand{\biocon}{\texttt{biocon}}
7
8 \title{The \biocon\ package}
9 \author{Pieter Edelman}
10
11 \bibliographystyle{plain}
12
13 \begin{document}
14 \nwfilename{biocon.nw}\nwbegindocs{1}\nwdocspar
15 \maketitle
16
17 \begin{abstract}
18 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.
19 \end{abstract}
20 \tableofcontents
21 \section{The built-up of the package}
22 According to \cite{Goossens1994}, each package foolows a standard built-up, which is:
23 \nwenddocs{}\nwbegincode{2}\moddef{biocon.sty}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
24 \LA{}Identification part\RA{}
25 \LA{}Declaration of options\RA{}
26 \LA{}Execution of options\RA{}
27 \LA{}Package loading\RA{}
28 \LA{}Main code\RA{}
29 \nwendcode{}\nwbegindocs{3}\nwdocspar
30 The identification part is easy. This package is designed exclusively for \LaTeXe, and it provides the \biocon\ package.
31 \nwenddocs{}\nwbegincode{4}\moddef{Identification part}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
32 \\NeedsTeXFormat\{LaTeX2e\}
33 \\ProvidesPackage\{biocon\}[2001/08/18]
34 \nwendcode{}\nwbegindocs{5}\nwdocspar
35 \section{The user interface}
36 \subsection{Brief syntax}
37 \nwenddocs{}\nwbegincode{6}\moddef{Main code}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
38 \LA{}Declarations\RA{}
39 \LA{}The user interface\RA{}
40 \LA{}Internal workings\RA{}
41 \nwendcode{}\nwbegindocs{7}\nwdocspar
42 The \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.
43
44 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.
45
46 The quick-n-dirty commands look like:
47 \begin{itemize}
48 \item\verb!\plantlike [!\textit{how}\verb!]{!\textit{parameters}\verb!}!
49 \item\verb!\funguslike[!\textit{how}\verb!]{!\textit{parameters}\verb!}!
50 \item\verb!\animallike[!\textit{how}\verb!]{!\textit{parameters}\verb!}!
51 \item\verb!\bactlike [!\textit{how}\verb!]{!\textit{parameters}\verb!}!
52 \end{itemize}
53
54 The declaration commands look like:
55 \begin{itemize}
56 \item\verb!\newplant {!\textit{identifier}\verb!}{!\textit{parameters}\verb!}!
57 \item\verb!\newfungus{!\textit{identifier}\verb!}{!\textit{parameters}\verb!}!
58 \item\verb!\newanimal{!\textit{identifier}\verb!}{!\textit{parameters}\verb!}!
59 \item\verb!\newbact {!\textit{identifier}\verb!}{!\textit{parameters}\verb!}!
60 \end{itemize}
61
62 Declarated species can be used with
63 \begin{itemize}
64 \item\verb!\plant [!\textit{how}\verb!]{!\textit{identifier}\verb!}!
65 \item\verb!\fungus[!\textit{how}\verb!]{!\textit{identifier}\verb!}!
66 \item\verb!\animal[!\textit{how}\verb!]{!\textit{identifier}\verb!}!
67 \item\verb!\bact [!\textit{how}\verb!]{!\textit{identifier}\verb!}!
68 \end{itemize}
69
70 In these commands, \textit{parameters} define the actual species. They can consist of genus, oldgenus, epithet, oldepithet, author, year, oldauthor, and oldyear, and follow a \verb!key=value! syntax. Furthermore, more parameters can be defined by the user. The \textit{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.
71
72 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 \verb!\n@wsp@cies{!\textit{type}\verb!}{!\textit{identifier}\verb!}{!\textit{parameters}\verb!}! command, where \textit{type} is P, F, A, B for plant, fungus, animal or bacterium.
73 \subsection{The implementation for the declaration part}
74 As described above, all the declaration commands are piped through a single command (the quick-n-dirty commands don't get a \textit{type} identifier, only a single identifier is needed):
75 \nwenddocs{}\nwbegincode{8}\moddef{The user interface}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
76 \\newcommand\{\\newplant\}[2]\{\\n@wsp@cies\{P\}\{#1\}\{#2\}\}
77 \\newcommand\{\\newfungus\}[2]\{\\n@wsp@cies\{F\}\{#1\}\{#2\}\}
78 \\newcommand\{\\newanimal\}[2]\{\\n@wsp@cies\{A\}\{#1\}\{#2\}\}
79 \\newcommand\{\\newbact\}[2]\{\\n@wsp@cies\{B\}\{#1\}\{#2\}\}
80
81 \\newcommand\{\\plantlike\}[2][]
82 \{\\n@wsp@cies\{\}\{Q@D\}\{#2\}\\plant[#1]\{Q@D\}\\expandafter\\Q@DCleanup\\Q@DCleanList+\}
83 \\newcommand\{\\funguslike\}[2][]
84 \{\\n@wsp@cies\{\}\{Q@D\}\{#2\}\\fungus[#1]\{Q@D\}\\expandafter\\Q@DCleanup\\Q@DCleanList+\}
85 \\newcommand\{\\animallike\}[2][]
86 \{\\n@wsp@cies\{\}\{Q@D\}\{#2\}\\animal[#1]\{Q@D\}\\expandafter\\Q@DCleanup\\Q@DCleanList+\}
87 \\newcommand\{\\bactlike\}[2][]
88 \{\\n@wsp@cies\{\}\{Q@D\}\{#2\}\\bact[#1]\{Q@D\}\\expandafter\\Q@DCleanup\\Q@DCleanList+\}
89 \nwendcode{}\nwbegindocs{9}\nwdocspar
90 \section{The internal workings}
91 For now, we ignore the commands to use the declared species, and instead define the internal workings of the \verb!\n@wsp@cies! command.
92
93 Since the \verb!key=value! syntax is used, the \texttt{keyval} package is needed:
94 \nwenddocs{}\nwbegincode{10}\moddef{Package loading}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
95 \\RequirePackage\{keyval\}
96 \nwendcode{}\nwbegindocs{11}\nwdocspar
97 The \verb!\n@wsp@cies! command creates a command for all the different parameters it gets, which name is of \textit{TypeIdentifier@Parametername}, for example, if the command would be \verb!\n@wsp@cies{A}{Hs}{genus=homo,epithet=sapiens}!, it would define the commands \verb!\AHs@genus! and \verb!\AHs@epiteth!.
98 \nwenddocs{}\nwbegincode{12}\moddef{Internal workings}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
99 \LA{}The n@wsp@cies command\RA{}
100 \nwendcode{}\nwbegindocs{13}\nwdocspar
101 \nwenddocs{}\nwbegincode{14}\moddef{The n@wsp@cies command}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
102 \\newcommand\{\\n@wsp@cies\}[3]\{%
103 \nwendcode{}\nwbegindocs{15}\nwdocspar
104 First this function determines what the first part of all the commands should be. It stores this in a parameter called \verb!\curr@ntid!.
105 \nwenddocs{}\nwbegincode{16}\moddef{Declarations}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
106 \\newcommand\{\\curr@ntid\}\{\}
107 \nwendcode{}\nwbegindocs{17}\nwdocspar
108 \nwenddocs{}\nwbegincode{18}\moddef{The n@wsp@cies command}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
109 \\renewcommand\{\\curr@ntid\}\{#1#2@\}%
110 \nwendcode{}\nwbegindocs{19}\nwdocspar
111 This command also adds a counter with name \textit{Curr@ntID}\verb!counter!, which will be used to track whether this command has been used before (0 for no, 1 for yes) (for Q@D an exception is made).
112 \nwenddocs{}\nwbegincode{20}\moddef{Declarations}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
113 \\newcounter\{Q@D@counter\}
114 \nwendcode{}\nwbegindocs{21}\nwdocspar
115 The \verb!\n@wsp@cies! command uses the \texttt{ifthen} package.
116 \nwenddocs{}\nwbegincode{22}\moddef{Package loading}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
117 \\RequirePackage\{ifthen\}
118 \nwendcode{}\nwbegindocs{23}\nwdocspar
119 \nwenddocs{}\nwbegincode{24}\moddef{The n@wsp@cies command}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
120 \\ifthenelse\{\\equal\{#2\}\{Q@D\}\}%
121 \{\\relax\}%
122 \{\\newcounter\{\\curr@ntid counter\}\}%
123 \\setcounter\{\\curr@ntid counter\}\{0\}%
124 \nwendcode{}\nwbegindocs{25}\nwdocspar
125 Then it goes forth by processing all the parameters. According to \cite{Carlisle1999}, for every key an apart function should exist. For the quick-n-dirty commands a \verb!\Q@DCleanList! command is created to which holds all the possible keys with \verb!\relax! associated. The \verb!\Q@DCleanup! commands sets these keys (this is to prevent old values from being used when a value is not given).
126 \nwenddocs{}\nwbegincode{26}\moddef{Internal workings}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
127 \LA{}The key=value functions\RA{}
128 \nwendcode{}\nwbegindocs{27}\nwdocspar
129 \nwenddocs{}\nwbegincode{28}\moddef{The key=value functions}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
130 \\def\\Q@DCleanup#1+\{\\n@wsp@cies\{\}\{Q@D\}\{#1\}\}
131
132 \\newcommand\{\\add@species@key\}[2]\{%
133 \\define@key\{SpeciesParams\}\{#1\}\{#2\}
134 \\expandafter\\ifx\\csname Q@DCleanList\\endcsname\\relax%
135 \\def\\Q@DCleanList\{#1=\\relax\}%
136 \\else%
137 \\edef\\Q@DCleanList\{\\Q@DCleanList,#1=\\relax\}%
138 \\fi%
139 \}
140 \nwendcode{}\nwbegindocs{29}\nwdocspar
141 \nwenddocs{}\nwbegincode{30}\moddef{The n@wsp@cies command}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
142 \\setkeys\{SpeciesParams\}\{#3\}%
143 \}
144 \nwendcode{}\nwbegindocs{31}\nwdocspar
145 The handler for the genus should make sure it is written capitalized. Therefore a function is made which splits the first letter of a word. It used more often in this package.
146 \nwenddocs{}\nwbegincode{32}\moddef{Declarations}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
147 \\newcommand\{\\T@mpFirst\}\{\}
148 \\newcommand\{\\T@mpRest\}\{\}
149 \nwendcode{}\nwbegincode{33}\moddef{The key=value functions}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
150 \\def\\SplitG@nusL@tters(#1#2)\{%
151 \\uppercase\{\\renewcommand\{\\T@mpFirst\}\{#1\}\}\\lowercase\{\\renewcommand\{\\T@mpRest\}\{#2\}\}\}
152 \nwendcode{}\nwbegindocs{34}\nwdocspar
153 Then the genus is processed and stored in the right way.
154 \nwenddocs{}\nwbegincode{35}\moddef{The key=value functions}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
155 \\add@species@key\{genus\}\{%
156 \\SplitG@nusL@tters(#1)%
157 \\expandafter\\edef\\csname\\curr@ntid genus\\endcsname\{\\T@mpFirst\\T@mpRest\}%
158 \}
159 \nwendcode{}\nwbegindocs{36}\nwdocspar
160 Of course, this also goes for the old genus.
161 \nwenddocs{}\nwbegincode{37}\moddef{The key=value functions}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
162 \\add@species@key\{oldgenus\}\{%
163 \\SplitG@nusL@tters(#1)%
164 \\expandafter\\edef\\csname\\curr@ntid oldgenus\\endcsname\{\\T@mpFirst\\T@mpRest\}%
165 \}
166 \nwendcode{}\nwbegindocs{38}\nwdocspar
167 The epithet and old epithet all have to be completely lowercase.
168 \nwenddocs{}\nwbegincode{39}\moddef{The key=value functions}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
169 \\add@species@key\{epithet\}\{\\lowercase\{\\expandafter\\edef\\csname\\curr@ntid epithet\\endcsname\{#1\}\}\}
170 \\add@species@key\{oldepithet\}\{\\lowercase\{\\expandafter\\edef\\csname\\curr@ntid oldepithet\\endcsname\{#1\}\}\}
171 \nwendcode{}\nwbegindocs{40}\nwdocspar
172 And there are the author, old author year and the old year.
173 \nwenddocs{}\nwbegincode{41}\moddef{The key=value functions}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
174 \\add@species@key\{author\}\{\\expandafter\\edef\\csname\\curr@ntid author\\endcsname\{#1\}\}
175 \\add@species@key\{year\}\{\\expandafter\\edef\\csname\\curr@ntid year\\endcsname\{#1\}\}
176 \\add@species@key\{oldauthor\}\{\\expandafter\\edef\\csname\\curr@ntid oldauthor\\endcsname\{#1\}\}
177 \\add@species@key\{oldyear\}\{\\expandafter\\edef\\csname\\curr@ntid oldyear\\endcsname\{#1\}\}
178 \nwendcode{}\nwbegindocs{42}\nwdocspar
179 As mentioned, the user should also be able to add own taxonomical structures. Herefore a the \verb!\newtaxon{!\textit{name}\verb!}! is used.
180 \nwenddocs{}\nwbegincode{43}\moddef{Internal workings}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
181 \\newcommand\{\\newtaxon\}[1]\{\\add@species@key\{#1\}\{\\expandafter\\edef\\csname\\curr@ntid #1\\endcsname\{##1\}\}\}
182 \nwendcode{}\nwbegindocs{44}\nwdocspar
183 Two special keys are for the default full style and the default abbreviation.
184 \nwenddocs{}\nwbegincode{45}\moddef{The key=value functions}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
185 \\define@key\{SpeciesParams\}\{fullstyle\}
186 \{\\expandafter\\def\\csname\\curr@ntid fullstyle\\endcsname\{\\csname Sp@cies#1\\endcsname\}\}
187 \\define@key\{SpeciesParams\}\{abbrstyle\}
188 \{\\expandafter\\def\\csname\\curr@ntid abbrstyle\\endcsname\{\\csname Sp@cies#1\\endcsname\}\}
189 \nwendcode{}\nwbegindocs{46}\nwdocspar
190 \subsection{The implementation for the use part part}
191 There's a lot to do with the actual showing of a species. This package was born from the the desire to automagically show \textit{Genus epithet} the first time a species was used, but us \textit{G. epithet} all subsequent times. However, sometimes an abbreviation should just be \textit{Genus}, and someimes the full name is required. Even more, writing the complete species names with subspecies and old genus stuff etc. is better left to the computer. By default, four different modes of typesetting are provided; the \textit{how} parameter specifies how the name should be typeset, this can be \textbf{e}xtended, which gives all available information, \textbf{l}ong, which gives genus and epithet, \textbf{a}bbreviated, which gives the first letter of the genus followed by the epithet, and \textbf{g}enus, which gives the genus only. It is also possible for the user to create typesetting schemes, and to set the default full name and abbreviation per species or globally.
192
193 Let's start with the commands used to write out the names stored in \LaTeX' memory. These are accesible by the user and are already discussed:
194 \begin{itemize}
195 \item\verb!\plant [!\textit{how}\verb!]{!\textit{identifier}\verb!}!
196 \item\verb!\fungus[!\textit{how}\verb!]{!\textit{identifier}\verb!}!
197 \item\verb!\animal[!\textit{how}\verb!]{!\textit{identifier}\verb!}!
198 \item\verb!\bact [!\textit{how}\verb!]{!\textit{identifier}\verb!}!
199 \end{itemize}
200 These command use ``style'' commands to do the actual typesetting. A ``style'' command contains text and \\\verb!\taxon{!\textit{pre}\verb+!+\textit{name}\verb+!+\textit{post}\verb!}! commands. Text is shown verbatim. The \verb!\taxon! command shows the taxon \textit{name} for the current species enclosed by \textit{pre} and \textit{post} if this taxon exists. So the typesetting is done by \verb!\plant!/\verb!Fungus!/\verb!Animal!/\verb!Bact!$\rightarrow$\textit{style command}$\rightarrow$\verb!\taxon!. Besides the \verb!Taxon! command, there is a similar \verb!FirstTaxon! command, which shows only the first letter of that taxon.
201 \nwenddocs{}\nwbegincode{47}\moddef{Internal workings}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
202 \LA{}The Taxon commands\RA{}
203 \nwendcode{}\nwbegindocs{48}\nwdocspar
204 Both the \verb!\taxon! and the \verb!\taxonfirst! command pipe through a single \verb!\Sh@wTax@n! command, which takes its argument in the form of \verb!+(!\textit{pre}\verb.!.\textit{name}\verb.!.\textit{post}\verb!)+!\textit{how}\verb!+!. The unique enclosures are needed to prevent interference with the \textit{pre} and \textit{post} from the user. \textit{how} is either \textit{n} for normal or \textit{a} for abbreviated (first letter only).
205 \nwenddocs{}\nwbegindocs{49}\nwdocspar
206 \nwenddocs{}\nwbegincode{50}\moddef{The Taxon commands}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
207 \\newcommand\{\\taxon\}[1]\{\\Sh@wTax@n+(#1)+n+\}
208 \\newcommand\{\\taxonfirst\}[1]\{\\Sh@wTax@n+(#1)+a+\}
209
210 \\def\\Sh@wTax@n+(#1!#2!#3)+#4+\{%
211 \nwendcode{}\nwbegindocs{51}\nwdocspar
212 \verb!\curr@ntid! is the ID of the species currently treated. This will be discussed later.
213 \nwenddocs{}\nwbegincode{52}\moddef{The Taxon commands}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
214 \\expandafter\\ifx\\csname\\curr@ntid#2\\endcsname%
215 \\relax%
216 \nwendcode{}\nwbegindocs{53}\nwdocspar
217 If the taxon exist, the function checks if it should display normal, and if this is the case it should display \textit{pre}, the taxon, and \textit{post}.
218 \nwenddocs{}\nwbegincode{54}\moddef{The Taxon commands}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
219 \\else%
220 \\ifthenelse\{\\equal\{#4\}\{n\}\}\{%
221 #1\\csname\\curr@ntid#2\\endcsname#3%
222 \nwendcode{}\nwbegindocs{55}\nwdocspar
223 Otherwise, only the first letter should be displayed. This is done by expanding the current taxon into the macro \verb!\T@mpTax@n! which is used as argument for the lettersplitting function.
224 \nwenddocs{}\nwbegincode{56}\moddef{The Taxon commands}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
225 \}\{%
226 \\edef\\T@mpTax@n\{\\csname\\curr@ntid#2\\endcsname\}%
227 #1\\expandafter\\Sh@wFirst\\T@mpTax@n+#3%
228 \}%
229 \\fi%
230 \}
231
232 \\def\\Sh@wFirst#1#2+\{#1\}
233 \nwendcode{}\nwbegindocs{57}\nwdocspar
234 New style can be created with the \verb!\newtaxastyle{!\textit{name}\verb!}{!\textit{style}\verb!}! command, where \textit{name} is an identifier for that style, and \textit{style} is, well, the style.
235 \nwenddocs{}\nwbegincode{58}\moddef{The user interface}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
236 \LA{}The newtaxastyle command\RA{}
237 \nwendcode{}\nwbegindocs{59}\nwdocspar
238 \nwenddocs{}\nwbegincode{60}\moddef{The newtaxastyle command}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
239 \\newcommand\{\\newtaxastyle\}[2]\{\\expandafter\\def\\csname Sp@cies#1\\endcsname\{#2\}\}
240 \nwendcode{}\nwbegindocs{61}\nwdocspar
241 It is often the case that some names should be printed in italics if the rest of the text is upright, or vice versa. Herefore the command \verb!\taxit{}! is provided, which is the same as \verb!\em! in \verb!latex.ltx!.
242 \nwenddocs{}\nwbegincode{62}\moddef{Internal workings}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
243 \\DeclareRobustCommand\\taxitalics
244 \{\\@nomath\\em \\ifdim \\fontdimen\\@ne\\font >\\z@
245 \\upshape \\else \\itshape \\fi\}
246 \\DeclareTextFontCommand\{\\taxit\}\{\\taxitalics\}
247 \nwendcode{}\nwbegindocs{63}\nwdocspar
248 Using this, the default type can be implemented.
249 \nwenddocs{}\nwbegincode{64}\moddef{Internal workings}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
250 \\newtaxastyle\{ePlant\}
251 \{\\taxit\{\\taxon\{!genus!\}\\taxon\{ !epithet!\}\}\\taxon\{ (!oldauthor!)\}\\taxon\{ !author!\}\}
252 \\newtaxastyle\{eAnimal\}
253 \{\\taxit\{\\taxon\{!genus!\}\\taxon\{ (!oldgenus!)\}\\taxon\{ !epithet!\}\}\\taxon\{ (!oldauthor!\}%
254 \\taxon\{, !oldyear!)\}\\taxon\{!author!\}\\taxon\{, !year!\}\}
255 \\newtaxastyle\{f\}
256 \{\\taxit\{\\taxon\{!genus!\}\\taxon\{ !epithet!\}\}\}
257 \\newtaxastyle\{a\}
258 \{\\taxit\{\\taxonfirst\{!genus!.\}\\taxon\{ !epithet!\}\}\}
259 \\newtaxastyle\{g\}
260 \{\\taxit\{\\taxon\{!genus!\}\}\}
261 \nwendcode{}\nwbegindocs{65}\nwdocspar
262 Now the default styles can be set.
263 \nwenddocs{}\nwbegincode{66}\moddef{Declarations}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
264 \\newcommand\{\\Gl@balF@llStyle\}\{\}
265 \\newcommand\{\\Gl@bal@bbrStyle\}\{\}
266 \\newcommand\{\\Gl@balPE@llStyle\}\{\}
267 \\newcommand\{\\Gl@balFE@llStyle\}\{\}
268 \\newcommand\{\\Gl@balAE@llStyle\}\{\}
269 \\newcommand\{\\Gl@balBE@llStyle\}\{\}
270 \nwendcode{}\nwbegindocs{67}\nwdocspar
271 \nwenddocs{}\nwbegincode{68}\moddef{The user interface}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
272 \\newcommand\{\\defaultplante\}[1]
273 \{\\renewcommand\{\\Gl@balPE@llStyle\}\{\\csname Sp@cies#1\\endcsname\}\}
274 \\newcommand\{\\defaultfunguse\}[1]
275 \{\\renewcommand\{\\Gl@balFE@llStyle\}\{\\csname Sp@cies#1\\endcsname\}\}
276 \\newcommand\{\\defaultanimale\}[1]
277 \{\\renewcommand\{\\Gl@balAE@llStyle\}\{\\csname Sp@cies#1\\endcsname\}\}
278 \\newcommand\{\\defaultbacte\}[1]
279 \{\\renewcommand\{\\Gl@balBE@llStyle\}\{\\csname Sp@cies#1\\endcsname\}\}
280 \\newcommand\{\\defaultfull\}[1]
281 \{\\renewcommand\{\\Gl@balF@llStyle\}\{\\csname Sp@cies#1\\endcsname\}\}
282 \\newcommand\{\\defaultabbr\}[1]
283 \{\\renewcommand\{\\Gl@bal@bbrStyle\}\{\\csname Sp@cies#1\\endcsname\}\}
284 \nwendcode{}\nwbegindocs{69}\nwdocspar
285 \nwenddocs{}\nwbegincode{70}\moddef{Internal workings}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
286 \\defaultplante\{ePlant\}
287 \\defaultfunguse\{ePlant\}
288 \\defaultanimale\{eAnimal\}
289 \\defaultbacte\{eAnimal\}
290 \\defaultfull\{f\}
291 \\defaultabbr\{a\}
292 \nwendcode{}\nwbegindocs{71}\nwdocspar
293 The calling commands fisrt set \verb!\curr@ntid! to the current ID (duh!). Furthermore, they have a decision tree: if no style is provided, then it is determined whether or not this is the first use in the document, and action is taken appropiately. This is all done using the \verb!\sh@wsp@cies{!\textit{type}\verb!}{!\textit{ID}\verb!}{!\textit{how}\verb!}!.
294 \nwenddocs{}\nwbegincode{72}\moddef{The user interface}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
295 \LA{}The calling commands\RA{}
296 \nwendcode{}\nwbegindocs{73}\nwdocspar
297 \nwenddocs{}\nwbegincode{74}\moddef{The calling commands}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
298 \\newcommand\{\\plant\}[2][]\{\\sh@wsp@cies\{P\}\{#2\}\{#1\}\}
299 \\newcommand\{\\fungus\}[2][]\{\\sh@wsp@cies\{F\}\{#2\}\{#1\}\}
300 \\newcommand\{\\animal\}[2][]\{\\sh@wsp@cies\{A\}\{#2\}\{#1\}\}
301 \\newcommand\{\\bact\}[2][]\{\\sh@wsp@cies\{B\}\{#2\}\{#1\}\}
302 \nwendcode{}\nwbegindocs{75}\nwdocspar
303 First, the command sets \verb!\curr@ntid! (if it's Q@D no \textit{type} should be set).
304 \nwenddocs{}\nwbegincode{76}\moddef{Internal workings}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
305 \LA{}The sh@wsp@cies command\RA{}
306 \nwendcode{}\nwbegindocs{77}\nwdocspar
307 \nwenddocs{}\nwbegincode{78}\moddef{The sh@wsp@cies command}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
308 \\newcommand\{\\sh@wsp@cies\}[3]\{%
309 \\ifthenelse\{\\equal\{#2\}\{Q@D\}\}%
310 \{\\renewcommand\{\\curr@ntid\}\{#2@\}\}%
311 \{\\renewcommand\{\\curr@ntid\}\{#1#2@\}\}%
312 \nwendcode{}\nwbegindocs{79}\nwdocspar
313 Then there is checked for a provided style.
314 \nwenddocs{}\nwbegincode{80}\moddef{The sh@wsp@cies command}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
315 \\ifthenelse\{\\equal\{#3\}\{\}\}\{%
316 \\ifnum\\value\{\\curr@ntid counter\}=0%
317 \nwendcode{}\nwbegindocs{81}\nwdocspar
318 If this is not the case, it is checked whether this is the first time the species is used. Of it is, for default full style is checked and used.
319 \nwenddocs{}\nwbegincode{82}\moddef{The sh@wsp@cies command}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
320 \\setcounter\{\\curr@ntid counter\}\{1\}%
321 \\expandafter\\ifx\\csname\\curr@ntid fullstyle\\endcsname\\relax%
322 \\csname Gl@balF@llStyle\\endcsname%
323 \\else%
324 \\csname\\curr@ntid fullstyle\\endcsname %
325 \\fi%
326 \nwendcode{}\nwbegindocs{83}\nwdocspar
327 Otherwise, the default abbreviation is checked and used.
328 \nwenddocs{}\nwbegincode{84}\moddef{The sh@wsp@cies command}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
329 \\else%
330 \\expandafter\\ifx\\csname\\curr@ntid abbrstyle\\endcsname\\relax%
331 \\csname Gl@bal@bbrStyle\\endcsname%
332 \\else%
333 \\csname\\curr@ntid abbrstyle\\endcsname%
334 \\fi%
335 \\fi%
336 \nwendcode{}\nwbegindocs{85}\nwdocspar
337 If a style is provided, use this style. If this style is ``extended'', select the appropiate style for the kingdom.
338 \nwenddocs{}\nwbegincode{86}\moddef{The sh@wsp@cies command}\plusendmoddef\nwstartdeflinemarkup\nwenddeflinemarkup
339 \}\{%
340 \\ifthenelse\{\\equal\{#3\}\{e\}\}\{%
341 \\csname Gl@bal#1E@llStyle\\endcsname%
342 \}\{%
343 \\csname Sp@cies#3\\endcsname%
344 \}%
345 \}%
346 \}
347 \nwendcode{}\nwbegindocs{87}\nwdocspar
348 \bibliography{literature}
349 \end{document}
350 \nwenddocs{}