Debian Codegraph @

texmf-dist/doc/latex/bullcntr/bullcntr-man.tex

raw
1 %
2 % Copyright (C) 2007 by Gustavo MEZZETTI <[email protected]>.
3 %
4 % This file is part of a work named "bullcntr package".
5 %
6 % The bullcntr package may be distributed and/or modified under the
7 % conditions of the LaTeX Project Public License, either version 1.3 of
8 % this license or (at your option) any later version.
9 % The latest version of this license is in
10 % http://www.latex-project.org/lppl.txt
11 % and version 1.3 or later is part of all distributions of LaTeX
12 % version 2005/12/01 or later.
13 %
14 % The bullcntr package has the LPPL maintenance status
15 % "author-maintained".
16 %
17 % The file `manifest.txt' that comes along with this file specifies what
18 % the bullcntr package consists of; more precisely, it explains how the
19 % locutions "Work" and "Compiled Work", used in the LaTeX Project Public
20 % License, are to be interpreted in the case of this work.
21 %
22 % Note that the distribution of this file alone is "distribution of only
23 % part of the Work" in the sense of the LaTeX Project Public License,
24 % and should be avoided (see the LaTeX Project Public Licence for
25 % details).
26 %
27 \documentclass[a4paper]{article}
28 \usepackage{bullenum}
29 \usepackage[bookmarksnumbered]{hyperref}
30
31 \title{Overview\\of \tbull
32 \thanks{This document describes version \bullvers\ (\bulldate).
33 Copyright \copyright~2007 by G.~Mezzetti
34 (see page~\pageref{S:Copyright} for details).}}
35 \author{G.~Mezzetti\\{\ttfamily\normalsize
36 [email protected]}}
37 \date{October~10, 2008}
38
39 \newcommand*{\bullvers}{0.04}
40 \newcommand*{\bulldate}{2007/04/02}
41 \newcommand*{\filename}{bullcntr-man.tex}
42
43 \DeclareRobustCommand*{\command}[1]{%
44 {\texorpdfstring{\normalfont\ttfamily \char\escapechar}{\pdfbslash}#1}%
45 }
46 \DeclareRobustCommand*{\packlass}[1]{%
47 {\texorpdfstring{\normalfont \sffamily}{}#1}%
48 }
49 \DeclareRobustCommand*{\meta}[1]{\mbox{\(\langle\textit{#1}\rangle\)}}
50 \DeclareRobustCommand*{\filedir}[1]{{\normalfont\ttfamily #1}}
51 \DeclareRobustCommand*{\env}[1]{\texttt{#1}}
52 \DeclareRobustCommand*{\cnt}[1]{\texttt{#1}}
53 \DeclareRobustCommand*{\opt}[1]{{\normalfont\ttfamily #1}}
54 \newcommand*{\Bullcntr}{bullcntr}
55 \newcommand*{\bull}{\packlass{\Bullcntr}}
56 \newcommand*{\tbull}{the \bull\ package}
57 \newcommand*{\Bullenum}{bullenum}
58 \newcommand*{\benu}{\packlass{\Bullenum}}
59 \newcommand*{\tbenu}{the \benu\ package}
60 \newcommand*{\hreff}[1]{\href{#1}{\texttt{#1}}}
61 \newcommand*{\Enumerat}{enumerate}
62 \newcommand*{\beenv}{\env{\Bullenum}}
63 \newcommand*{\enenv}{\env{\Enumerat}}
64
65 \newcommand*{\pdfbslash}{}
66 {\catcode`\|=0 |catcode`|\=12 |gdef|pdfbslash{\\}}
67
68 \makeatletter
69 \newcommand*\hyref[1]{% actually two arguments, <label> and <text>
70 \@ifundefined{r@#1}{% #1 is <label>
71 \G@refundefinedtrue % \protect seems superfluous in our context
72 \@latex@warning{Reference `#1' on page \thepage \space undefined}%
73 \@firstofone % returns <text> (removing braces)
74 }{%
75 \expandafter\@hyref\expandafter{\csname r@#1\endcsname}%
76 }%
77 }
78 \@ifdefinable\@hyref{\def\@hyref#1{%
79 \expandafter\@@hyref#1%
80 }}
81 \@ifdefinable\@@hyref{\def\@@hyref#1#2#3#4#5{%
82 \hyperlink{#4}% <text> follows and becomes the second argument
83 }}
84 \makeatother
85
86 \hfuzz = 0pt
87 \vfuzz = 0pt
88
89
90
91 \begin{document}
92
93 \maketitle
94
95 \begin{abstract}
96 We describe a \LaTeX\ package which defines a new command, similar
97 to \verb|\fnsymbol|, for displaying the value of a counter: this
98 command typesets a number of bullets equal to the value of the
99 counter, in a nice arrangement. The value of the counter must lie
100 between 1 and~9, inclusive.
101
102 We also present an ancillary package which defines a new
103 environment, similar to \enenv, for creating lists of items
104 numbered in this way.
105 \end{abstract}
106
107
108
109 \tableofcontents
110
111
112
113 \begingroup
114
115 \setlength{\parskip}{\medskipamount}
116 \setlength{\parindent}{0pt}
117
118 \section*{Copyright notice}
119 \label{S:Copyright}
120 \vspace{-\parskip}
121
122 Copyright \copyright~2007 by Gustavo \textsc{Mezzetti}. All rights
123 are reserved, except as noted below.
124
125 This document has been produced by feeding to a \LaTeX\ typesetting
126 engine the file \filedir{\filename}. This file is part of a work
127 named ``\bull\ package'', and may be distributed and/or modified only
128 as a part thereof. Subsection~\ref{SS:License} on
129 page~\pageref{SS:License} explains the conditions under which \tbull\
130 may be distributed and/or modified.
131
132 Permission is granted to make printed copies of this document, by any
133 means (\emph{e.g.}, photocopying, direct printing from the electronic
134 version, and so on).
135
136 Note, though, that distribution of this document alone is
137 ``distribution of only part of the Work'' in the sense of the
138 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public
139 License}, and should be avoided: please distribute, in addition, the
140 source file \filedir{\filename} together with all other files listed
141 in \filedir{manifest.txt}, as explained as well in
142 Subsection~\ref{SS:License} and in the file \filedir{manifest.txt}
143 itself.
144
145 \endgroup
146
147
148
149 \clearpage
150 \setcounter{secnumdepth}{0}
151
152 \section{Introduction}
153 \label{S:Intro}
154
155 I~can't remember exactly where the idea of this package arose from,
156 but I~am pretty sure that the first time I~saw a list of items
157 numbered with an increasing number of bullets was in certain
158 handwritten notes about sheaves cohomology, may be a decade or so ago.
159 Since then, I~had repeatedly thought of writing a \LaTeX\ package to
160 implement this kind of numbering, but I~had never resolved to actually
161 do so, until very recently, when I~suddenly decided to sit down and
162 % ( paren match
163 write the code!~:-)
164
165 Regrettably, I~had to discover a major bug in the macros I~had dashed
166 off in such a haste, which required extensive (and more careful!)\
167 redesign of the code. I~took this opportunity to thoroughly
168 reorganize the package, making it easier, for the user, to switch from
169 one style of bullets to another, and also adding an ancillary package
170 that simplifies the creation of lists numbered with bullets.
171
172 This document describes \tbull\ version \textbf{\bullvers}
173 (\textbf{\bulldate}).
174
175
176
177 \setcounter{secnumdepth}{3}
178
179 \section{Installing \tbull}
180
181 As usual for \LaTeX\ distributions, \tbull\ is distributed in the form
182 of a \filedir{.dtx} file, namely \filedir{\Bullcntr.dtx}, and an
183 accompanying \filedir{.ins} file, namely \filedir{\Bullcntr.ins}.
184
185
186
187 \subsection{Installation}
188
189 To install the package, run \LaTeX\ (or Plain \TeX) once on the file
190 \filedir{\Bullcntr.ins}. This will generate the following \LaTeX\
191 input files:
192 %
193 \begin{quote}
194 \ttfamily
195 \Bullcntr.sty\\
196 \Bullenum.sty
197 \end{quote}
198 %
199 To finish the installation, move them into a \LaTeX\ input directory.
200 The above listing of the files you need to move is also displayed on
201 the terminal at the end of the run of the file
202 \filedir{\Bullcntr.ins}. The documentation of your \TeX\ installation
203 should tell you how to find the \LaTeX\ input directory/ies, and
204 probably also how to create new \LaTeX\ input directories reserved to
205 contain your private classes and packages. If your \TeX\ installation
206 offers you the chance of defining your private \LaTeX\ input
207 directories, I~recommend you exploit this possibility and place the
208 generated files into such a directory.
209
210 Please note that before using \tbull\ you must read the license (see
211 Subsection~\ref{SS:License}) to see whether its terms are acceptable
212 for you, especially for what concerns the lack of any warranty; if
213 they are not, don't use it.
214
215
216
217 \subsection{Documentation}
218
219 To produce the documentation, run \LaTeX\ three times (for the table
220 of contents to be correct) on the file \filedir{\Bullcntr.dtx}. This
221 won't produce the index and the change history, however: for those,
222 you have to run \emph{MakeIndex} on the files \filedir{\Bullcntr.idx}
223 and \filedir{\Bullcntr.glo}, produced during the last of the aforesaid
224 three \LaTeX\ runs, with the styles \filedir{gind.ist} and
225 \filedir{gglo.ist}, respectively (these styles are part of the
226 standard \LaTeX\ distribution); then pass \filedir{\Bullcntr.dtx}
227 through \LaTeX\ twice more.
228
229
230
231 \subsection{License}
232 \label{SS:License}
233
234 The \bull\ package is \emph{not} in the public domain: its author,
235 Gustavo \textsc{Mezzetti}, owns the copyright, and in general retains
236 all the rights therein; but as a special exception, the author grants
237 you the permissions indicated below.
238
239
240
241 \subsubsection{Distribution and/or modification}
242
243 The \bull\ package may be distributed and/or modified under the
244 conditions of the \href{http://www.latex-project.org/lppl.txt}{\LaTeX\
245 Project Public License}, either version~1.3 of this license or (at
246 your option) any later version. The latest version of this license is
247 in
248 %
249 \begin{quote}
250 \hreff{http://www.latex-project.org/lppl.txt}
251 \end{quote}
252 %
253 and version~1.3 or later is part of all distributions of \LaTeX\
254 version 2005/12/01 or later.
255
256 The \bull\ package has the LPPL maintenance status
257 ``author-maintained''.
258 % Switching to the ``maintained'' status (which
259 % is the status recommended by the \TeX\ community) is currently being
260 % considered, but for now I~still prefer to keep my tiny unfledged
261 % % ( paren match
262 % creation under my protecting wing\ldots~:-)\spacefactor=\sfcode`.
263 % \space Leaving jokes apart, I'm waiting to see if other ``disastrous''
264 % mistakes are still lurking in the code, and whether there is an
265 % interest of the \LaTeX\ community into this silly package that
266 % justifies maintaining it in a more efficient way.
267
268 The file \filedir{manifest.txt} included in \tbull\ specifies what
269 this package consists of; more precisely, it explains how the
270 locutions ``Work'' and ``Compiled Work'', used in the \LaTeX\ Project
271 Public License, are to be interpreted in the case of this work.
272
273
274
275 \subsubsection{Use}
276
277 The use of \tbull\ is unrestricted, provided that you accept the terms
278 and conditions of the
279 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public
280 License} and of the \hyref{SSS:NoWarranty}{following subsection} for
281 what concerns the absence of any warranty.
282
283
284
285 \subsubsection{No warranty}
286 \label{SSS:NoWarranty}
287
288 There is absolutely no warranty for \tbull. The Copyright Holder
289 provides \tbull\ ``as is'', without warranty of any kind, either
290 expressed or implied, including, but not limited to, the implied
291 warranties of merchantability and fitness for a particular purpose.
292 The entire risk as to the quality and performance of \tbull\ is with
293 you. Should \tbull\ prove defective, you assume the cost of all
294 necessary servicing, repair, or correction.
295
296 In no event will The Copyright Holder, or any other party who may
297 distribute and/or modify \tbull\ as permitted by the \LaTeX\ Project
298 Public License, be liable to you for damages, including any general,
299 special, incidental or consequential damages arising out of any use of
300 \tbull\ or out of inability to use it (including, but not limited to,
301 loss of data, data being rendered inaccurate, or losses sustained by
302 anyone as a result of any failure of \tbull\ to operate with any other
303 programs), even if The Copyright Holder or said other party has been
304 advised of the possibility of such damages.
305
306
307
308 \subsection{Your comments}
309
310 If you have comments, suggestions, etc.\ about \tbull, please let me
311 know them: I'll be happy to read what you think. My e-mail address is
312 indicated under the title of this document. Please include the
313 \emph{exact} phrase \verb*|bullcntr package| in the \emph{subject} of
314 your message; otherwise, it could be thrown away by a mail filter.
315
316
317
318 \section{Using \tbull}
319
320 Version \bullvers\ of \tbull\ is a bit more elaborate than its
321 predecessor: in addition to the
322 \hyref{SS:bullcntr}{\command{\Bullcntr} main command} and to the
323 \hyref{SS:Hooks}{hooks for the bullets}, it now features
324 \hyref{SS:CntrInvo}{options} and \hyref{SS:BullStyl}{predefined bullet
325 styles}.
326
327
328
329 \subsection{Package invocation and options}
330 \label{SS:CntrInvo}
331
332 You load \tbull\ by means of the usual \verb|\usepackage| declaration:
333 %
334 \begin{flushleft}
335 \verb|\usepackage|\meta{options}\verb|{bullcntr}|
336 \end{flushleft}
337 %
338 You may specify one of the following, mutually exclusive options,
339 which affect the size (or the type) of the bullets used by
340 \verb|\bullcntr| command:
341 %
342 \begin{description}
343 %
344 \item[\opt{largectrbull}]
345 (Relatively) ``large'' bullets are used for all values from 1 to~9.
346 This has exactly the same effect as a \verb|\largectrbull| global
347 declaration (see Subsection~\ref{SS:BullStyl}).
348 %
349 \item[\opt{smallctrbull}]
350 The opposite: ``small'' bullets are used for all values from 1 to~9.
351 This has exactly the same effect as a \verb|\smallctrbull| global
352 declaration (see Subsection~\ref{SS:BullStyl}).
353 %
354 \item[\opt{smartctrbull}]
355 (Relatively) ``large'' bullets are used for values from 1 through~5
356 (inclusive), while ``small'' ones are used for those greater than or
357 equal to~6. This has exactly the same effect as a
358 \verb|\smartctrbull| global declaration (see
359 Subsection~\ref{SS:BullStyl}).
360 %
361 \item[\opt{heartctrbull}]
362 Hearts are used (instead of bullets) for all values from 1 to~9. This
363 has exactly the same effect as a \verb|\heartctrbull| global
364 declaration (see Subsection~\ref{SS:BullStyl}).
365 %
366 \end{description}
367 %
368 If you don't specify any, the default option is \opt{smartctrbull}.
369
370
371
372
373 \subsection{The \command{\Bullcntr} command}
374 \label{SS:bullcntr}
375
376 This is a command analogous to the \verb|\fnsymbol| command (see the
377 \textsl{\LaTeX book} \cite[Subsection~C.8.4]{LaTeXbook}): you may use
378 it directly in the text, as in
379 %
380 \begin{flushleft}
381 \ldots\texttt{the counter value displays as}\verb|~\bullcntr{|\meta{ctr}\verb|}|\ldots
382 \end{flushleft}
383 %
384 (where \meta{ctr} is a counter name, defined with \verb|\newcounter|),
385 or you may redefine the \verb|\the|\meta{ctr} command, as in
386 %
387 \begin{flushleft}
388 \verb|\renewcommand*{\the|\meta{ctr}\verb|}{\bullcntr{|\meta{ctr}\verb|}}|
389 \end{flushleft}
390 %
391 By way of example, in the case of a counter named \cnt{myctr}, you
392 would write
393 %
394 \begin{verbatim}
395 The counter value displays as~\bullcntr{myctr}.
396 \end{verbatim}
397 %
398 directly in the text, or the following to redefine the
399 \verb|\themyctr| command:
400 %
401 \begin{verbatim}
402 \renewcommand*{\themyctr}{\bullcntr{myctr}}
403 \end{verbatim}
404 %
405
406 When \( \verb|\value{|\meta{ctr}\verb|}|=0 \), the command
407 \verb|\bullcntr{|\meta{ctr}\verb|}| silently typesets nothing (not
408 even a space); but when \( \verb|\value{|\meta{ctr}\verb|}|<0 \) or \(
409 \verb|\value{|\meta{ctr}\verb|}|>9 \), an error is generated.
410
411
412
413 \subsection{Hooks for the bullets}
414 \label{SS:Hooks}
415
416 The main task of \tbull\ is to calculate the position of the
417 ``bullets'' used to display the value of the given counter; but you
418 are free to decide what characters are actually drawn in these
419 positions: they need not necessarily be ``bullets''. Indeed, two
420 ``hooks'' are provided in the package to define the actual characters
421 employed, and the package simply invokes these hooks.
422
423 If the value of the counter being displayed is less than~6 (less
424 than~6 bullets need to be drawn), the \verb|\bullcntr| command invokes
425 the \verb|\counterlargebullet| macro to draw each of them. If you
426 want, you should redefine this macro (using \verb|\renewcommand|) so
427 that it generates a symbol suitable for arrangements in which the
428 ``bullets'' are relatively spaced out. For example,
429 %
430 \begin{verbatim}
431 \renewcommand*{\counterlargebullet}{\textbullet}
432 \end{verbatim}
433 %
434
435 You don't \emph{need} to redefine this command: a convenient default
436 definition is already set by \tbull\ itself.
437
438 When, on the other hand, the value of the counter being displayed is
439 greater than or equal to~6 (6~or more bullets need to be drawn), the
440 \verb|\bullcntr| command calls the \verb|\countersmallbullet| macro.
441 It is intended that this macro typeset a character suitable for
442 situations in which the ``bullets'' have to be grouped in a compact
443 cluster; typically, this means that a smaller ``bullet'' is used than
444 the one typeset by \verb|\counterlargebullet|, although it is
445 perfectly in order to use the same character in both situations. If
446 you want (but you don't \emph{need} to do this, since \tbull\ already
447 defines this macro) you may change the definition with
448 \verb|\renewcommand|, \emph{e.g.}:
449 %
450 \begin{verbatim}
451 \renewcommand*{\countersmallbullet}{\textperiodcentered}
452 \end{verbatim}
453 %
454
455 For both hooks, it is best to \verb|\protect| fragile commands that
456 appear in the code used in their (re)definition.
457
458 ``Macho \TeX\ programmers'' may also use \verb|\def| instead of
459 \verb|\renewcommand|; for example:
460 %
461 \begin{verbatim}
462 \def\counterlargebullet{\textbullet}
463 \def\countersmallbullet{\textperiodcentered}
464 \end{verbatim}
465 %
466 (Actually, in a case like this, even \verb|\let| could be used.)
467
468
469
470 \subsection{Predefined bullet styles}
471 \label{SS:BullStyl}
472
473 To spare you the nuisance of redefining the hooks mentioned in
474 Subsection~\ref{SS:Hooks}, at least in normal situations, four
475 ``bullet styles'' are already predefined by \tbull, covering what the
476 author believes are the most common cases. You can switch to any of
477 these predefined styles by means of the following four declarations.
478
479 \begin{description}
480
481 \item[\command{largectrbull}]
482 This declaration causes (relatively) ``large'' bullets to be used for
483 all values from 1 to~9.
484
485 \item[\command{smallctrbull}]
486 This declaration causes ``small'' bullets to be used for all values
487 from 1 to~9.
488
489 \item[\command{smartctrbull}]
490 This declaration causes (relatively) ``large'' bullets to be used for
491 values from 1 to~5 (inclusive), and ``small'' bullets for values equal
492 to or above~6.
493
494 \item[\command{heartctrbull}]
495 This declaration causes little hearts (instead of bullets) to be used
496 for all values from 1 to~9.
497
498 \end{description}
499
500 These are in all respects normal declarations, obeying to ordinary
501 scoping rules. The corresponding options described in
502 Subsection~\ref{SS:CntrInvo} simply set the style at the outer
503 (global, or document-wide) level.
504
505
506
507 \subsection{Cross-references}
508 \label{SS:CrossRef}
509
510 Cross-references now work fine with the \verb|\bullcntr| command. You
511 may use \verb|\label| (preceded by \verb|\refstepcounter| if
512 necessary) in the usual way to label, for example, an item in a list
513 numbered via \verb|\bullcntr| (recall that \verb|\item| calls
514 \verb|\refstepcounter| by itself), and elsewhere cross-reference that
515 item with \verb|\ref|: the reference will be typeset correctly, using
516 the same bullet style that was in effect at the spot where
517 \verb|\label| (and not \verb|\ref|) was used.
518
519 Examples of such cross-references are shown later, in
520 Subsection~\ref{SS:CrossXmp}.
521
522
523
524 \section{Using \tbenu}
525
526 The \bull\ package was conceived for the purpose of imitating in print
527 an unusual way of numbering items in a list, that the author saw in
528 certain handwritten notes (see the \hyref{S:Intro}{Introduction}).
529 With the \verb|\bullcntr| command at hand, this could be achieved
530 simply by saying something like
531 %
532 \begin{verbatim}
533 \begin{enumerate}
534 \renewcommand*{\theenumi}{\bullcntr{enumi}}
535 \renewcommand*{\labelenumi}{\theenumi}
536 \end{verbatim}
537 \begin{flushleft}
538 \texttt{\ \ \ \ }\meta{items}
539 \end{flushleft}
540 \begin{verbatim}
541 \end{enumerate}
542 \end{verbatim}
543 %
544 This, nonetheless, is not perfect, since it breaks if the \enenv\
545 environment is moved inside another \enenv, because of the explicit
546 mention of \verb|\theenumi| and of \verb|\labelenumi|.
547
548 For this reason, and also to facilitate the use of the
549 \verb|\bullcntr| command for numbering list items, a new package has
550 been added to \tbull; this helper package, called \benu, simply
551 defines the \beenv\ environment, a variation of \enenv\ that numbers
552 its items using the \verb|\bullcntr| command. Indeed,
553 %
554 \begin{verbatim}
555 \begin{bullenum}
556 \end{verbatim}
557 \begin{flushleft}
558 \texttt{\ \ \ \ }\meta{items}
559 \end{flushleft}
560 \begin{verbatim}
561 \end{bullenum}
562 \end{verbatim}
563 %
564 is equivalent to
565 \begin{flushleft}
566 \verb|\begin{enumerate}|\\
567 \verb| \renewcommand*{\theenum|\meta{lvl}\verb|}{\bullcntr{enum|\meta{lvl}\verb|}}|\\
568 \verb| \renewcommand*{\labelenum|\meta{lvl}\verb|}{\theenum|\meta{lvl}\verb|}|
569 \end{flushleft}
570 \begin{flushleft}
571 \texttt{\ \ \ \ }\meta{items}\\[\topsep]
572 \end{flushleft}
573 \begin{verbatim}
574 \end{enumerate}
575 \end{verbatim}
576 %
577 where \meta{lvl} is \texttt{i}, \texttt{ii}, \texttt{iii},
578 or~\texttt{iv}, depending on the current level of the \enenv\
579 environment.
580
581 In other words, \beenv\ can be used in every place where \enenv\ can,
582 and numbers its items with an increasing number of bullets, regardless
583 of the definition of \verb|\theenum|\meta{lvl} and
584 \verb|\labelenum|\meta{lvl}. Of course, the environment must contain
585 no more than 9~items. Moreover, if you use \verb|\label| to set up a
586 reference, subsequent \verb|\ref|'s will typeset the reference as a
587 ``bulletted'' number, using, for the ``bullets'', the character that
588 was current at the time the \verb|\label| was encountered (in brief,
589 they will do the right thing).
590
591 Notice that you should \emph{not} load \tbull\ if you invoke \benu,
592 because the latter calls the former. As explained below, you may pass
593 to \tbenu\ the options that you would require from \bull: the outer
594 package will forward them to the inner one. Actually, most users will
595 just use \tbenu, and never call \bull\ directly.
596
597
598
599 \subsection{Package invocation and options}
600 \label{SS:EnumInvo}
601
602 You invoke \tbenu\ with the usual \verb|\usepackage| declaration put
603 in the preamble of your document. In this declaration you may specify
604 exactly the same options that you would pass to \tbull, with the same
605 meaning (see Subsection~\ref{SS:CntrInvo}). The \benu\ package then
606 calls \bull\ for you, just passing on to it the options, if any, you
607 asked for.
608
609 % For example, if, when preparing a valentine, you want to use the
610 % \beenv\ environment to create list numbered with hearts, you might
611 % say
612 % %
613 % \begin{verbatim}
614 % \usepackage[heartctrbull]{bullenum}
615 % \end{verbatim}
616 % %
617 % at the beginning of your preamble.
618
619
620
621 \subsection{The \beenv\ environment}
622 \label{SS:EnumEnvi}
623
624 This environment is syntactically analogous to \enenv, but numbers its
625 items with an increasing number of bullets (using the \verb|\bullcntr|
626 command). You must include no more than 9~items in this environment.
627 The style of the bullets is governed by the declarations described in
628 Subsection~\ref{SS:BullStyl}, according to ordinary scoping rules. A
629 change local to the environment being employed can be obtained by
630 enclosing the relevant declaration inside the environment itself; for
631 example,
632 %
633 \begin{verbatim}
634 \begin{bullenum}
635 \smallctrbull
636 \end{verbatim}
637 \begin{flushleft}
638 \texttt{\ \ \ \ }\meta{items}
639 \end{flushleft}
640 \begin{verbatim}
641 \end{bullenum}
642 \end{verbatim}
643 %
644 will use ``small'' bullets regardless of whatever style might have
645 been in force outside the \beenv\ environment.
646
647 \pagebreak[2]
648
649 If you want finer control over the appearance of the ``bullets'', just
650 redefine the hooks of Subsection~\ref{SS:Hooks}; doing this inside the
651 environment itself will keep changes to the hooks local. For example,
652 you might say:
653 %
654 \begin{verbatim}
655 \begin{bullenum}
656 \renewcommand*{\counterlargebullet}
657 {$\scriptscriptstyle \diamondsuit$}
658 \renewcommand*{\countersmallbullet}{\counterlargebullet}
659 \end{verbatim}
660 \begin{flushleft}
661 \texttt{\ \ \ \ }\meta{items}
662 \end{flushleft}
663 \begin{verbatim}
664 \end{bullenum}
665 \end{verbatim}
666 %
667 (yes, ``macho \TeX\ programmers'' may also use \verb|\def|, or
668 \verb|\let| where appropriate).
669
670 Of course, this environment respects the definitions of
671 \verb|\theenum|\meta{lvl} and of \verb|\labelenum|\meta{lvl} in force
672 outside the environment itself, for \( \meta{lvl} =
673 \texttt{i},\ldots,\texttt{iv} \).
674
675
676
677 \subsection{Nesting \beenv\ environments}
678 \label{SS:Nesting}
679
680 Because a \beenv\ environment is nothing more than a modified \enenv,
681 it can be nested in the same way, up to four levels deep.
682
683 For what concerns the syntax, it is perfectly in order to nest one
684 \beenv\ environment inside another; it is from the viewpoint of the
685 resulting visual appearance that this is not recommendable, unless
686 quite different bullet styles are used for the two enumerations, so as
687 to sharply mark the visual distinction between their respective
688 labels. Of course, this problem does not arise if you nest a \beenv\
689 environment inside an \enenv, or viceversa.
690
691 Examples of such nested environments will be presented in
692 Subsection~\ref{SS:NestXmp}.
693
694
695
696 \section{Examples}
697
698 A few examples follow, illustrating the usage of the \bull\slash\benu\
699 packages.
700
701
702
703 \subsection{A sample list}
704
705 Here we illustrate the use of the \beenv\ environment to produce lists
706 whose items are numbered with the \verb|\bullcntr| command.
707
708 The lists in the various examples are produced by the following source
709 code:
710 %
711 \begin{verbatim}
712 \begin{bullenum}
713 \end{verbatim}
714 \begin{flushleft}
715 \texttt{\ \ \ \ }\meta{items}
716 \end{flushleft}
717 \begin{verbatim}
718 \end{bullenum}
719 \end{verbatim}
720 %
721
722 We shall now show a few variations of a list of the above kind,
723 changing the definition of the commands \verb|\counterlargebullet| and
724 \verb|\countersmallbullet| among the various examples, so as to
725 illustrate the use of several bullet sizes. In three examples out of
726 five, however, this will be actually done by means of the declarations
727 described in Subsection~\ref{SS:BullStyl}, thus falling back on one of
728 the predefined bullet styles.
729
730
731
732 \subsubsection{The standard sizes (\command{smartctrbull})}
733 \label{SSS:Xmp-Standard}
734
735 In our first example, actually, we do not alter the default
736 definitions of the two hooks that typeset the bullets (see
737 Subsection~\ref{SS:Hooks}). The following is the output the
738 \bull\slash\benu\ packages will produce by themselves, if you invoke
739 either of them without options and do not alter the default bullet
740 style; in any case, it corresponds to the style selected by
741 \verb|\smartctrbull|.
742
743 \begin{bullenum}
744 \item
745 This is the first item of the list, that is, item~\#1. It is
746 therefore numbered with a single bullet. Poor bullet! How
747 lonely it must feel!
748
749 \item
750 This is the second item of the list, that is, item~\#2. It is
751 therefore numbered with two bullets, one on the left and one
752 on the right. If you are a romantic nature, you might even
753 think of them as Romeo and Juliet\ldots
754
755 \item\label{Standard-3}
756 This is the third item of the list, that is---guess
757 what?---item~\#3. Not surprisingly, it is numbered with three
758 bullets neatly arranged in the shape of an equilateral
759 triangle.
760
761 \item
762 This is the fourth item, item~\#4. A square has exactly four
763 vertices, so it seems quite appropriate to lay out the four
764 bullets that must be used to number this item exactly in this
765 form, as you can see in the label.
766
767 \item
768 If you have not lost the track, you will agree that this is
769 the fifth item of the list. A regular pentagon would probably
770 have been the optimal choice for displaying this value of the
771 counter, but for some reason the arrangement shown in the
772 label of this item has been preferred by the author of \tbull.
773
774 \item\label{Standard-6}
775 Sixth item! Item~\#6! A regular hexagon is used here! Note,
776 however, that the bullets have shrunk to a smaller size,
777 because the size used so far would have made the bullet
778 cluster look a bit too crowded.
779
780 \item
781 In the opinion of the author, the shape used to display the
782 value~7 is even more pleasant than the regular hexagon used
783 for the value~6; indeed, this is a regular hexagon too, but
784 with the center marked by an additional bullet, which makes
785 the figure look more symmetric.
786
787 \item
788 If 7~was the perfect number of bullets, here we face the
789 disruption of this perfection. The solution adopted for
790 arranging 8~bullets, which you can see here, is, in the
791 author's opinion, the less inelegant among all possibilities.
792
793 \item
794 Item~\#9, the last value that the \verb|\bullcntr| command can
795 display. The bullets are just stacked in a $3\times3$ square
796 pattern---the obvious choice!
797 \end{bullenum}
798
799
800
801 \subsubsection{Big bullets}
802 \label{SSS:Xmp-Big}
803
804 You might think that the \verb|\textbullet| character is fitter for
805 labelling list items; this is probably true for item numbers that do
806 not exceede three, but begins to become questionable for higher
807 values. In any case, here is an extreme example: \verb|\textbullets|
808 is used for all values from 1 to~9. To achieve this, the following
809 source code should be used:
810 %
811 \begin{verbatim}
812 \begin{bullenum}
813 \renewcommand*{\counterlargebullet}{\textbullet}
814 \renewcommand*{\countersmallbullet}{\textbullet}
815 \end{verbatim}
816 \begin{flushleft}
817 \texttt{\ \ \ \ }\meta{items}
818 \end{flushleft}
819 \begin{verbatim}
820 \end{bullenum}
821 \end{verbatim}
822 %
823 This is what we write below.
824
825 \begin{bullenum}
826 \renewcommand*{\counterlargebullet}{\textbullet}
827 \renewcommand*{\countersmallbullet}{\textbullet}
828
829 \item
830 This is the first item of the list, that is, item~\#1. It is
831 therefore numbered with a single bullet. Poor bullet! How
832 lonely it must feel!
833
834 \item\label{Big-2}
835 This is the second item of the list, that is, item~\#2. It is
836 therefore numbered with two bullets, one on the left and one
837 on the right. If you are a romantic nature, you might even
838 think of them as Romeo and Juliet\ldots
839
840 \item\label{Big-3}
841 This is the third item of the list, that is---guess
842 what?---item~\#3. Not surprisingly, it is numbered with three
843 bullets neatly arranged in the shape of an equilateral
844 triangle.
845
846 \item
847 This is the fourth item, item~\#4. A square has exactly four
848 vertices, so it seems quite appropriate to lay out the four
849 bullets that must be used to number this item exactly in this
850 form, as you can see in the label.
851
852 \item
853 If you have not lost the track, you will agree that this is
854 the fifth item of the list. A regular pentagon would probably
855 have been the optimal choice for displaying this value of the
856 counter, but for some reason the arrangement shown in the
857 label of this item has been preferred by the author of \tbull.
858
859 \item\label{Big-6}
860 Sixth item! Item~\#6! A regular hexagon is used here! Note,
861 this time, that the bullets have \emph{not} shrunk to a
862 smaller size, and that the resulting picture looks very
863 crowded---pretty awful, I~would say!
864
865 \item
866 In the opinion of the author, the shape used to display the
867 value~7 is even more pleasant than the regular hexagon used
868 for the value~6; indeed, this is a regular hexagon too, but
869 with the center marked by an additional bullet, which makes
870 the figure look more symmetric.
871
872 \item
873 If 7~was the perfect number of bullets, here we face the
874 disruption of this perfection. The solution adopted for
875 arranging 8~bullets, which you can see here, is, in the
876 author's opinion, the less inelegant among all possibilities.
877
878 \item\label{Big-9}
879 Item~\#9, the last value that the \verb|\bullcntr| command can
880 display. The bullets are just stacked in a $3\times3$ square
881 pattern---the obvious choice!
882 \end{bullenum}
883
884 A cross-reference to an item run into the main text may look really
885 bad with bullets thus large: for instance, referencing the second item
886 produces~\ref{Big-2} (quite acceptable), referencing the third one
887 gives~\ref{Big-3} (just about acceptable), but a reference to the
888 sixth item is typeset as~\ref{Big-6}, and the ninth one even
889 yields~\ref{Big-9}! Note, however, that lines are not spaced out any
890 further than usual.
891
892
893
894 \subsubsection{Moderately large bullets (\command{largectrbull})}
895 \label{SSS:Xmp-Large}
896
897 Our next example illustrates the output produced by the style selected
898 with a \verb|\largectrbull| declaration; this style continues to use,
899 for the values over~5, the same bullet size adopted for the first five
900 values. So, we say
901 %
902 \begin{verbatim}
903 \begin{bullenum}
904 \largectrbull
905 \end{verbatim}
906 \begin{flushleft}
907 \texttt{\ \ \ \ }\meta{items}
908 \end{flushleft}
909 \begin{verbatim}
910 \end{bullenum}
911 \end{verbatim}
912 %
913 to produce the desired list.
914
915 \begin{bullenum}
916 \largectrbull
917
918 \item
919 This is the first item of the list, that is, item~\#1. It is
920 therefore numbered with a single bullet. Poor bullet! How
921 lonely it must feel!
922
923 \item
924 This is the second item of the list, that is, item~\#2. It is
925 therefore numbered with two bullets, one on the left and one
926 on the right. If you are a romantic nature, you might even
927 think of them as Romeo and Juliet\ldots
928
929 \item\label{Large-3}
930 This is the third item of the list, that is---guess
931 what?---item~\#3. Not surprisingly, it is numbered with three
932 bullets neatly arranged in the shape of an equilateral
933 triangle.
934
935 \item
936 This is the fourth item, item~\#4. A square has exactly four
937 vertices, so it seems quite appropriate to lay out the four
938 bullets that must be used to number this item exactly in this
939 form, as you can see in the label.
940
941 \item
942 If you have not lost the track, you will agree that this is
943 the fifth item of the list. A regular pentagon would probably
944 have been the optimal choice for displaying this value of the
945 counter, but for some reason the arrangement shown in the
946 label of this item has been preferred by the author of \tbull.
947
948 \item\label{Large-6}
949 Sixth item! Item~\#6! A regular hexagon is used here! Note,
950 once again, that the bullets have \emph{not} shrunk to a
951 smaller size, so that the resulting picture looks pretty
952 crowded, although not intolerably bad-looking. Compare the
953 label of this item with a reference to the corresponding
954 item~\ref{Standard-6} under~\ref{SSS:Xmp-Standard}, and with a
955 reference to the corresponding item~\ref{Big-6}
956 under~\ref{SSS:Xmp-Big}.
957
958 \item
959 In the opinion of the author, the shape used to display the
960 value~7 is even more pleasant than the regular hexagon used
961 for the value~6; indeed, this is a regular hexagon too, but
962 with the center marked by an additional bullet, which makes
963 the figure look more symmetric.
964
965 \item
966 If 7~was the perfect number of bullets, here we face the
967 disruption of this perfection. The solution adopted for
968 arranging 8~bullets, which you can see here, is, in the
969 author's opinion, the less inelegant among all possibilities.
970
971 \item
972 Item~\#9, the last value that the \verb|\bullcntr| command can
973 display. The bullets are just stacked in a $3\times3$ square
974 pattern---the obvious choice!
975 \end{bullenum}
976
977
978
979 \subsubsection{Small bullets (\command{smallctrbull})}
980 \label{SSS:Xmp-Small}
981
982 The reciprocal example is to use small bullets throughout, from 1 to~9.
983 Thus, we use the following source code:
984 %
985 \begin{verbatim}
986 \begin{bullenum}
987 \smallctrbull
988 \end{verbatim}
989 \begin{flushleft}
990 \texttt{\ \ \ \ }\meta{items}
991 \end{flushleft}
992 \begin{verbatim}
993 \end{bullenum}
994 \end{verbatim}
995 %
996 And here is the output it yields.
997
998 \begin{bullenum}
999 \smallctrbull
1000
1001 \item
1002 This is the first item of the list, that is, item~\#1. It is
1003 therefore numbered with a single bullet. Poor bullet! How
1004 lonely it must feel!
1005
1006 \item
1007 This is the second item of the list, that is, item~\#2. It is
1008 therefore numbered with two bullets, one on the left and one
1009 on the right. If you are a romantic nature, you might even
1010 think of them as Romeo and Juliet\ldots
1011
1012 \item\label{Small-3}
1013 This is the third item of the list, that is---guess
1014 what?---item~\#3. Not surprisingly, it is numbered with three
1015 bullets neatly arranged in the shape of an equilateral
1016 triangle.
1017
1018 \item
1019 This is the fourth item, item~\#4. A square has exactly four
1020 vertices, so it seems quite appropriate to lay out the four
1021 bullets that must be used to number this item exactly in this
1022 form, as you can see in the label.
1023
1024 \item
1025 If you have not lost the track, you will agree that this is
1026 the fifth item of the list. A regular pentagon would probably
1027 have been the optimal choice for displaying this value of the
1028 counter, but for some reason the arrangement shown in the
1029 label of this item has been preferred by the author of \tbull.
1030
1031 \item\label{Small-6}
1032 Sixth item! Item~\#6! A regular hexagon is used here! Note,
1033 once more, that the bullets have \emph{not} shrunk to a
1034 smaller size, because they were \emph{already} small in the
1035 items shown thus far.
1036
1037 \item
1038 In the opinion of the author, the shape used to display the
1039 value~7 is even more pleasant than the regular hexagon used
1040 for the value~6; indeed, this is a regular hexagon too, but
1041 with the center marked by an additional bullet, which makes
1042 the figure look more symmetric.
1043
1044 \item
1045 If 7~was the perfect number of bullets, here we face the
1046 disruption of this perfection. The solution adopted for
1047 arranging 8~bullets, which you can see here, is, in the
1048 author's opinion, the less inelegant among all possibilities.
1049
1050 \item
1051 Item~\#9, the last value that the \verb|\bullcntr| command can
1052 display. The bullets are just stacked in a $3\times3$ square
1053 pattern---the obvious choice!
1054 \end{bullenum}
1055
1056 Again, compare the references to items \#3 and~\#6 from different
1057 examples: standard bullets (\ref{Standard-3} and~\ref{Standard-6}),
1058 big bullets (\ref{Big-3} and~\ref{Big-6}), moderately large bullets
1059 (\ref{Large-3} and~\ref{Large-6}), small bullets (\ref{Small-3}
1060 and~\ref{Small-6}).
1061
1062
1063
1064 \subsubsection{Tiny bullets}
1065 \label{SSS:Xmp-Tiny}
1066
1067 We come now to another extreme example: the use of
1068 \verb|\textperiodcentered|. In other words,
1069 %
1070 \begin{verbatim}
1071 \begin{bullenum}
1072 \renewcommand*{\counterlargebullet}{\textperiodcentered}
1073 \renewcommand*{\countersmallbullet}{\textperiodcentered}
1074 \end{verbatim}
1075 \begin{flushleft}
1076 \texttt{\ \ \ \ }\meta{items}
1077 \end{flushleft}
1078 \begin{verbatim}
1079 \end{bullenum}
1080 \end{verbatim}
1081 %
1082 is asserted in order to produce the list.
1083
1084 \begin{bullenum}
1085 \renewcommand*{\counterlargebullet}{\textperiodcentered}
1086 \renewcommand*{\countersmallbullet}{\textperiodcentered}
1087
1088 \item
1089 This is the first item of the list, that is, item~\#1. It is
1090 therefore numbered with a single bullet. Poor bullet! How
1091 lonely it must feel!
1092
1093 \item
1094 This is the second item of the list, that is, item~\#2. It is
1095 therefore numbered with two bullets, one on the left and one
1096 on the right. If you are a romantic nature, you might even
1097 think of them as Romeo and Juliet\ldots
1098
1099 \item
1100 This is the third item of the list, that is---guess
1101 what?---item~\#3. Not surprisingly, it is numbered with three
1102 bullets neatly arranged in the shape of an equilateral
1103 triangle.
1104
1105 \item
1106 This is the fourth item, item~\#4. A square has exactly four
1107 vertices, so it seems quite appropriate to lay out the four
1108 bullets that must be used to number this item exactly in this
1109 form, as you can see in the label.
1110
1111 \item
1112 If you have not lost the track, you will agree that this is
1113 the fifth item of the list. A regular pentagon would probably
1114 have been the optimal choice for displaying this value of the
1115 counter, but for some reason the arrangement shown in the
1116 label of this item has been preferred by the author of \tbull.
1117
1118 \item
1119 Sixth item! Item~\#6! A regular hexagon is used here! Note
1120 that it was really impossible, this time, for the bullets to
1121 shrunk to a still smaller size than the one that has been
1122 adopted in the above items!
1123
1124 \item
1125 In the opinion of the author, the shape used to display the
1126 value~7 is even more pleasant than the regular hexagon used
1127 for the value~6; indeed, this is a regular hexagon too, but
1128 with the center marked by an additional bullet, which makes
1129 the figure look more symmetric.
1130
1131 \item
1132 If 7~was the perfect number of bullets, here we face the
1133 disruption of this perfection. The solution adopted for
1134 arranging 8~bullets, which you can see here, is, in the
1135 author's opinion, the less inelegant among all possibilities.
1136
1137 \item
1138 Item~\#9, the last value that the \verb|\bullcntr| command can
1139 display. The bullets are just stacked in a $3\times3$ square
1140 pattern---the obvious choice!
1141 \end{bullenum}
1142
1143 This bullet style might be employed in a \beenv\ environment nested
1144 inside another one.
1145
1146
1147
1148 \subsubsection{St.\texorpdfstring{\,}{ }Valentine (\command{heartctrbull})}
1149 \label{SSS:Xmp-Hearts}
1150
1151 To end this inventory of variations, let us illustrate the use of a
1152 fancier ``bullet'': a little heart. We obtain this by saying
1153 %
1154 \begin{verbatim}
1155 \begin{bullenum}
1156 \heartctrbull
1157 \end{verbatim}
1158 \begin{flushleft}
1159 \texttt{\ \ \ \ }\meta{items}
1160 \end{flushleft}
1161 \begin{verbatim}
1162 \end{bullenum}
1163 \end{verbatim}
1164 %
1165 % ( paren match
1166 This could be used in valentines to enumerate to your beloved the
1167 terms of your passion\ldots~:-)
1168
1169 \begin{bullenum}
1170 \heartctrbull
1171
1172 \item\label{Hearts-1}
1173 This is the first item of the list, that is, item~\#1. It is
1174 therefore numbered with a single heart. Poor heart! It is a
1175 true lonely heart!
1176
1177 \item
1178 This is the second item of the list, that is, item~\#2. It is
1179 therefore numbered with two hearts, one on the left and one on
1180 the right. Thinking of Romeo and Juliet is absolutely natural
1181 in this context\ldots
1182
1183 \item\label{Hearts-3}
1184 This is the third item of the list, that is---guess
1185 what?---item~\#3. Not surprisingly, it is numbered with three
1186 hearts neatly arranged in the shape of an equilateral
1187 triangle.
1188
1189 \item\label{Hearts-4}
1190 This is the fourth item, item~\#4. A square has exactly four
1191 vertices, so it seems quite appropriate to lay out the four
1192 hearts that must be used to number this item exactly in this
1193 form, as you can see in the label.
1194
1195 \item\label{Hearts-5}
1196 If you have not lost the track, you will agree that this is
1197 the fifth item of the list. A regular pentagon would probably
1198 have been the optimal choice for displaying this value of the
1199 counter, but for some reason the arrangement shown in the
1200 label of this item has been preferred by the author of \tbull.
1201
1202 \item
1203 Sixth item! Item~\#6! A regular hexagon is used here,
1204 adorned with hearts! Of course, the hearts do not shrink, as
1205 doesn't yours, and as doesn't your ardent passion!
1206
1207 \item\label{Hearts-7}
1208 In the opinion of the author, the shape used to display the
1209 value~7 is even more pleasant than the regular hexagon used
1210 for the value~6; indeed, this is a regular hexagon too, but
1211 with the center marked by an additional heart, which makes the
1212 figure look more symmetric.
1213
1214 \item\label{Hearts-8}
1215 If 7~was the perfect number of hearts, here we face the
1216 disruption of this perfection. The solution adopted for
1217 arranging 8~hearts, which you can see here, is, in the
1218 author's opinion, the less inelegant among all possibilities.
1219
1220 \item
1221 Item~\#9, the last value that the \verb|\bullcntr| command can
1222 display. The hearts are just stacked in a $3\times3$ square
1223 pattern---the obvious choice!
1224 \end{bullenum}
1225
1226 Cross-references are a bit funny with this style; they look like this:
1227 \ref{Hearts-1}, \ref{Hearts-3}, \ref{Hearts-4}, \ref{Hearts-5},
1228 \ref{Hearts-7}, and~\ref{Hearts-8}.
1229
1230
1231
1232 \subsection{Nested enumerations}
1233 \label{SS:NestXmp}
1234
1235 Try not to overdo this: carrying it to excess could lead to confused
1236 output.
1237
1238
1239
1240 \subsubsection{Nesting one \beenv\ inside another}
1241 \label{SSS:NestBullBull}
1242
1243 We use ``large'' bullets for the outer environment, and ``tiny''
1244 bullets for the inner one.
1245
1246 \begin{bullenum}
1247 \largectrbull
1248
1249 \item
1250 First item: let this one alone, just to have a term of
1251 comparison.
1252
1253 \item\label{NestBull-2}
1254 Second item. Here we nest another \beenv\ environment:
1255 \begin{bullenum}
1256 \renewcommand*{\counterlargebullet}{\textperiodcentered}
1257 \renewcommand*{\countersmallbullet}{\textperiodcentered}
1258 \item\label{NestBull-2.1}
1259 First sub-item.
1260 \item\label{NestBull-2.2}
1261 Second sub-item.
1262 \item\label{NestBull-2.3}
1263 Third sub-item.
1264 \item\label{NestBull-2.4}
1265 Fourth sub-item. OK, this should suffice.
1266 \end{bullenum}
1267 Don't forget, we are still inside item~\ref{NestBull-2} of
1268 the outer enumeration.
1269
1270 \item\label{NestBull-3}
1271 Third item (of the outer enumeration). Let us repeat exactly
1272 the same nested enumeration as in item~\ref{NestBull-2}.
1273 \begin{bullenum}
1274 \renewcommand*{\counterlargebullet}{\textperiodcentered}
1275 \renewcommand*{\countersmallbullet}{\textperiodcentered}
1276 \item\label{NestBull-3.1}
1277 First sub-item.
1278 \item\label{NestBull-3.2}
1279 Second sub-item.
1280 \item\label{NestBull-3.3}
1281 Third sub-item.
1282 \item\label{NestBull-3.4}
1283 Fourth sub-item. OK, this should suffice.
1284 \end{bullenum}
1285 Back to item~\ref{NestBull-3} of the outer enumeration.
1286 \end{bullenum}
1287
1288 Now the bad news: you might want to refer to, say, item
1289 \ref{NestBull-3.4} under item~\ref{NestBull-3}. As you can see, the
1290 reference comes out wrong, since the label from the outer enumeration
1291 % ( paren match
1292 is typeset with the style of the inner one.~:-(\spacefactor=\sfcode`.
1293 \space This is a known bug: I~chose not to correct it, since doing so
1294 would require to introduce the concept of bullet styles distinguished
1295 by level, which I~deem intolerably burdensome. Be aware of this
1296 limitation when you nest \beenv\ environments inside one another (this
1297 does not apply, however, to \beenv's nested within \enenv's, as we'll
1298 see in the following examples).
1299
1300
1301
1302 \subsubsection{Nesting \beenv\ inside \enenv}
1303 \label{SSS:NestBullEnum}
1304
1305 Let us repeat \hyref{SSS:NestBullBull}{the same example shown above},
1306 but changing the outer environment to \enenv, and suppressing style
1307 variations.
1308
1309 \begin{enumerate}
1310 \item
1311 First item: let this one alone, just to have a term of
1312 comparison.
1313
1314 \item\label{NestBuEn-2}
1315 Second item. Here we nest a \beenv\ environment:
1316 \begin{bullenum}
1317 \item\label{NestBuEn-2.1}
1318 First sub-item.
1319 \item\label{NestBuEn-2.2}
1320 Second sub-item.
1321 \item\label{NestBuEn-2.3}
1322 Third sub-item.
1323 \item\label{NestBuEn-2.4}
1324 Fourth sub-item. OK, this should suffice.
1325 \end{bullenum}
1326 Don't forget, we are still inside item~\ref{NestBuEn-2} of
1327 the outer enumeration.
1328
1329 \item\label{NestBuEn-3}
1330 Third item (of the outer enumeration). Let us repeat exactly
1331 the same nested enumeration as in item~\ref{NestBuEn-2}.
1332 \begin{bullenum}
1333 \item\label{NestBuEn-3.1}
1334 First sub-item.
1335 \item\label{NestBuEn-3.2}
1336 Second sub-item.
1337 \item\label{NestBuEn-3.3}
1338 Third sub-item.
1339 \item\label{NestBuEn-3.4}
1340 Fourth sub-item. OK, this should suffice.
1341 \end{bullenum}
1342 Back to item~\ref{NestBuEn-3} of the outer enumeration.
1343 \end{enumerate}
1344
1345 See Subsection~\ref{SS:CrossXmp} for examples of cross-references to
1346 the items of these lists.
1347
1348
1349
1350 \subsubsection{Nesting \enenv\ inside \beenv}
1351 \label{SSS:NestEnumBull}
1352
1353 As \hyref{SSS:NestBullEnum}{before}, but the other way around: \beenv\
1354 is now the outer environment, and \enenv\ the inner one.
1355
1356 \begin{bullenum}
1357 \item
1358 First item: let this one alone, just to have a term of
1359 comparison.
1360
1361 \item\label{NestEnBu-2}
1362 Second item. Here we nest an \enenv\ environment:
1363 \begin{enumerate}
1364 \item\label{NestEnBu-2.1}
1365 First sub-item.
1366 \item\label{NestEnBu-2.2}
1367 Second sub-item.
1368 \item\label{NestEnBu-2.3}
1369 Third sub-item.
1370 \item\label{NestEnBu-2.4}
1371 Fourth sub-item. OK, this should suffice.
1372 \end{enumerate}
1373 Don't forget, we are still inside item~\ref{NestEnBu-2} of
1374 the outer enumeration.
1375
1376 \item\label{NestEnBu-3}
1377 Third item (of the outer enumeration). Let us repeat exactly
1378 the same nested enumeration as in item~\ref{NestEnBu-2}.
1379 \begin{enumerate}
1380 \item\label{NestEnBu-3.1}
1381 First sub-item.
1382 \item\label{NestEnBu-3.2}
1383 Second sub-item.
1384 \item\label{NestEnBu-3.3}
1385 Third sub-item.
1386 \item\label{NestEnBu-3.4}
1387 Fourth sub-item. OK, this should suffice.
1388 \end{enumerate}
1389 Back to item~\ref{NestEnBu-3} of the outer enumeration.
1390 \end{bullenum}
1391
1392 Again, see Subsection~\ref{SS:CrossXmp} for examples of
1393 cross-references to the items of the above lists.
1394
1395
1396
1397 \subsubsection{Deep nesting}
1398 \label{SSS:DeepNest}
1399
1400 Just to show what the output looks like, here is an example of \enenv\
1401 and \beenv\ environments nested down to the fourth level. We avoid,
1402 however, nesting \beenv\ environments one inside the other, because of
1403 the problem with cross-references outlined
1404 under~\ref{SSS:NestBullBull}.
1405
1406 \begin{enumerate}
1407 \item\label{Invertebrates}
1408 Invertebrates are of many kinds.
1409
1410 \item\label{Vertebrates}
1411 We detail the vertebrates.
1412 \begin{enumerate}
1413 \item\label{Fishes}
1414 Fishes. They include, for instance:
1415 \begin{bullenum}
1416 \item\label{Barracuda} barracuda;
1417 \item\label{Carp} carp;
1418 \item\label{Swordfish} swordfish.
1419 \end{bullenum}
1420 \item\label{Amphibians}
1421 Amphibians. They include, for instance:
1422 \begin{bullenum}
1423 \item\label{Frogs} frogs, among which are
1424 \begin{enumerate}
1425 \item\label{BarkingFrog} the barking frog,
1426 \item\label{FlyingFrog} the flying frog,
1427 \item\label{GreenFrog} the green frog,
1428 \item\label{TreeFrog} the tree frog,
1429 \end{enumerate}
1430 and may others;
1431 \item\label{Toads} toads, that comprise
1432 \begin{enumerate}
1433 \item\label{CaneToad} the cane toad,
1434 \item\label{GiantToad} the giant toad,
1435 \end{enumerate}
1436 just to name a few;
1437 \item\label{Salamanders} salamanders, \emph{e.g.},
1438 \begin{enumerate}
1439 \item\label{GreenSal} the green salamander,
1440 \item\label{SlimySal} the slimy salamander,
1441 \item\label{TigerSal} the tiger salamander.
1442 \end{enumerate}
1443 \end{bullenum}
1444 \item\label{Reptiles}
1445 Reptiles. Among these we find:
1446 \begin{bullenum}
1447 \item\label{Snakes} snakes, for instance
1448 \begin{enumerate}
1449 \item\label{Cobra} cobra,
1450 \item\label{Python} python,
1451 \item\label{Anaconda} anaconda,
1452 \item\label{Viper} viper,
1453 \item\label{Rattlesnake} rattlesnake;
1454 \end{enumerate}
1455 \item\label{Turtles} turtles, of which the following
1456 \begin{enumerate}
1457 \item\label{GreenTurtle} green turtle,
1458 \item\label{PaintedTurtle} painted turtle,
1459 \item\label{SnappingTurtle} snapping turtle
1460 \end{enumerate}
1461 are just a few examples.
1462 \end{bullenum}
1463 \item\label{Birds}
1464 Birds. (I'm a bit bored, now.)
1465 \item\label{Mammals}
1466 Mammals.
1467 \end{enumerate}
1468 \end{enumerate}
1469
1470
1471
1472 \subsection{An example of use in the middle of text}
1473
1474 \newcounter{mytest}
1475 \setcounter{mytest}{3}
1476 \newlength{\W}
1477 \setlength{\W}{\bigskipamount}
1478
1479 We have just defined, in the source file of this document, a new
1480 counter named \cnt{mytest}, and we have set the value of the
1481 \cnt{mytest} counter to~\arabic{mytest}. With the default bullet
1482 sizes, this value is displayed by the command \verb|\bullcntr{mytest}|
1483 as~\bullcntr{mytest}. Other examples:
1484
1485 \begin{tabbing}
1486 \indent\verb|\footnotesize \bullcntr{mytest}|\hspace{2\tabbingsep}\=\kill
1487 \> \verb|\Huge \bullcntr{mytest}|
1488 \' {\Huge produces~\bullcntr{mytest}} \\[\W]
1489 \> \verb|\huge \bullcntr{mytest}|
1490 \' {\huge produces~\bullcntr{mytest}} \\[\W]
1491 \> \verb|\LARGE \bullcntr{mytest}|
1492 \' {\LARGE produces~\bullcntr{mytest}} \\[\W]
1493 \> \verb|\Large \bullcntr{mytest}|
1494 \' {\Large produces~\bullcntr{mytest}} \\[\W]
1495 \> \verb|\large \bullcntr{mytest}|
1496 \' {\large produces~\bullcntr{mytest}} \\[\W]
1497 \> \verb|\normalsize \bullcntr{mytest}|
1498 \' {\normalsize produces~\bullcntr{mytest}} \\[\W]
1499 \> \verb|\small \bullcntr{mytest}|
1500 \' {\small produces~\bullcntr{mytest}} \\[\W]
1501 \> \verb|\footnotesize \bullcntr{mytest}|
1502 \' {\footnotesize produces~\bullcntr{mytest}} \\[\W]
1503 \> \verb|\scriptsize \bullcntr{mytest}|
1504 \' {\scriptsize produces~\bullcntr{mytest}} \\[\W]
1505 \> \verb|\tiny \bullcntr{mytest}|
1506 \' {\tiny produces~\bullcntr{mytest}}
1507 \end{tabbing}
1508
1509 \setcounter{mytest}{7}
1510
1511 Let us repeat this example after assigning to the \cnt{mytest} counter
1512 the value~\arabic{mytest}, which \verb|\bullcntr{mytest}| displays
1513 as~\bullcntr{mytest}:
1514
1515 \begin{tabbing}
1516 \indent\verb|\footnotesize \bullcntr{mytest}|\hspace{2\tabbingsep}\=\kill
1517 \> \verb|\Huge \bullcntr{mytest}|
1518 \' {\Huge produces~\bullcntr{mytest}} \\[\W]
1519 \> \verb|\huge \bullcntr{mytest}|
1520 \' {\huge produces~\bullcntr{mytest}} \\[\W]
1521 \> \verb|\LARGE \bullcntr{mytest}|
1522 \' {\LARGE produces~\bullcntr{mytest}} \\[\W]
1523 \> \verb|\Large \bullcntr{mytest}|
1524 \' {\Large produces~\bullcntr{mytest}} \\[\W]
1525 \> \verb|\large \bullcntr{mytest}|
1526 \' {\large produces~\bullcntr{mytest}} \\[\W]
1527 \> \verb|\normalsize \bullcntr{mytest}|
1528 \' {\normalsize produces~\bullcntr{mytest}} \\[\W]
1529 \> \verb|\small \bullcntr{mytest}|
1530 \' {\small produces~\bullcntr{mytest}} \\[\W]
1531 \> \verb|\footnotesize \bullcntr{mytest}|
1532 \' {\footnotesize produces~\bullcntr{mytest}} \\[\W]
1533 \> \verb|\scriptsize \bullcntr{mytest}|
1534 \' {\scriptsize produces~\bullcntr{mytest}} \\[\W]
1535 \> \verb|\tiny \bullcntr{mytest}|
1536 \' {\tiny produces~\bullcntr{mytest} (Ugh!)}
1537 \end{tabbing}
1538
1539 But look at the output of
1540 %
1541 \begin{verbatim}
1542 \begin{quote}
1543 \renewcommand*{\countersmallbullet}{\textperiodcentered}
1544 \tiny
1545 The value is~\bullcntr{mytest}.
1546 \end{quote}
1547 \end{verbatim}
1548 %
1549 Here it is:
1550 %
1551 \begin{quote}
1552 \renewcommand*{\countersmallbullet}{\textperiodcentered}
1553 \tiny
1554 The value is~\bullcntr{mytest}.
1555 \end{quote}
1556 %
1557 % ( paren match
1558 How cute it looks!~:-)
1559
1560
1561
1562 \subsection{Examples of cross-references}
1563 \label{SS:CrossXmp}
1564
1565 Cross-references are printed using the bullet style that was in
1566 effect when the \verb|\label| command was given. The following
1567 examples illustrate this.
1568
1569 In~\ref{SSS:Xmp-Standard} we had references to~\ref{Standard-3} and
1570 to~\ref{Standard-6}. In~\ref{SSS:Xmp-Hearts}, on the other hand, the
1571 references were to~\ref{Hearts-1}, to~\ref{Hearts-3},
1572 to~\ref{Hearts-4}, to~\ref{Hearts-5}, to~\ref{Hearts-7}, and
1573 to~\ref{Hearts-8}.
1574
1575 We turn now to nested lists. We let alone the example
1576 of~\ref{SSS:NestBullBull}, we already know that references come out
1577 wrong in this case. In~\ref{SSS:NestBullEnum} we had items
1578 \ref{NestBuEn-2.1}, \ref{NestBuEn-2.2}, \ref{NestBuEn-2.3}, and
1579 \ref{NestBuEn-2.4}, all listed under item~\ref{NestBuEn-2}, and
1580 similarly items \ref{NestBuEn-3.1}, \ref{NestBuEn-3.2},
1581 \ref{NestBuEn-3.3}, and \ref{NestBuEn-3.4}, as part of
1582 item~\ref{NestBuEn-3}. In~\ref{SSS:NestEnumBull}, on the other hand,
1583 we had items \ref{NestEnBu-2.1}, \ref{NestEnBu-2.2},
1584 \ref{NestEnBu-2.3}, and \ref{NestEnBu-2.4}, all listed under
1585 item~\ref{NestEnBu-2}: as you can see, the bullets now precede the
1586 reference to the item of \enenv; similarly, items \ref{NestEnBu-3.1},
1587 \ref{NestEnBu-3.2}, \ref{NestEnBu-3.3}, and \ref{NestEnBu-3.4} are now
1588 a part of the ``bulletted'' item~\ref{NestEnBu-3}.
1589
1590 Coming to~\ref{SSS:DeepNest} (the animal kingdom), we see that, for
1591 instance, the green frog is \ref{GreenFrog}, an example of frog (under
1592 \ref{Frogs}), which, in turn, is an example of amphibian
1593 (see~\ref{Amphibians}). On the other hand, the tiger salamander is a
1594 kind of salamander (cf.~\ref{Salamanders}) listed under
1595 \ref{TigerSal}.
1596
1597 And so on\ldots
1598
1599
1600
1601 \setcounter{secnumdepth}{0}
1602
1603 \begin{thebibliography}{9}
1604 \providecommand*{\bysame}{\leavevmode\hbox to3em{\hrulefill}\thinspace}
1605 \addcontentsline{toc}{section}{\refname}
1606
1607 \bibitem{LaTeXbook}
1608 L.~Lamport, \emph{\LaTeX---A Document Preparation
1609 System---User's Guide and Reference Manual}, 2nd~edition,
1610 Addison-Wesley, Reading, 1994.
1611
1612 \end{thebibliography}
1613
1614 \end{document}