| 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 |
% Non-metric paper sizes have no right to exist! (;-) |
| 29 |
\usepackage{bullenum} |
| 30 |
% Of course, there is no need to load the hyperref package, but we |
| 31 |
% like to use it: |
| 32 |
\usepackage[bookmarksnumbered]{hyperref} |
| 33 |
|
| 34 |
\title{Using \tbenu:\\an example} |
| 35 |
\author{G.~Mezzetti} |
| 36 |
\date{October~10, 2008} |
| 37 |
|
| 38 |
% The following command definitions has nothing to do with the |
| 39 |
% bullcntr package: you may ignore them. |
| 40 |
|
| 41 |
\DeclareRobustCommand*{\command}[1]{% |
| 42 |
{\texorpdfstring{\normalfont\ttfamily \char\escapechar}{\pdfbslash}#1}% |
| 43 |
} |
| 44 |
\DeclareRobustCommand*{\packlass}[1]{% |
| 45 |
{\texorpdfstring{\normalfont \sffamily}{}#1}% |
| 46 |
} |
| 47 |
\DeclareRobustCommand*{\meta}[1]{% |
| 48 |
\texorpdfstring |
| 49 |
{\mbox{\normalfont \(\langle\textit{#1}\rangle\)}}% |
| 50 |
{<#1>}% |
| 51 |
} |
| 52 |
\DeclareRobustCommand*{\filedir}[1]{{\normalfont\ttfamily #1}} |
| 53 |
\DeclareRobustCommand*{\cnt}[1]{\texttt{#1}} |
| 54 |
\DeclareRobustCommand*{\env}[1]{\texttt{#1}} |
| 55 |
\newcommand*{\Bullcntr}{bullcntr} |
| 56 |
\newcommand*{\bull}{\packlass{\Bullcntr}} |
| 57 |
\newcommand*{\tbull}{the \bull\ package} |
| 58 |
\newcommand*{\Bullenum}{bullenum} |
| 59 |
\newcommand*{\benu}{\packlass{\Bullenum}} |
| 60 |
\newcommand*{\tbenu}{the \benu\ package} |
| 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 |
% End of command definitions. |
| 69 |
|
| 70 |
% The following is just a neurotic symptom of the author: |
| 71 |
\hfuzz = 0pt |
| 72 |
\vfuzz = 0pt |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
\begin{document} |
| 77 |
|
| 78 |
\maketitle |
| 79 |
|
| 80 |
\begin{abstract} |
| 81 |
This document illustrates, by means of practical examples, the use |
| 82 |
of \tbenu. You should read the \LaTeX\ source of this document |
| 83 |
and compare it with the output it produces; you may also find it |
| 84 |
useful as a starting base for your own coding. |
| 85 |
\end{abstract} |
| 86 |
|
| 87 |
\tableofcontents |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
\setcounter{secnumdepth}{0} |
| 92 |
|
| 93 |
\section{Introduction} |
| 94 |
|
| 95 |
If you are reading this document, you will probably know what \tbenu\ |
| 96 |
is and what purpose it fulfills. In the sequel, we shall assume no |
| 97 |
other knowledge about \tbenu\ besides this; in particular, we assume |
| 98 |
that you did not bother reading the documentation, and prefer to learn |
| 99 |
how to use this package by looking at some sample code. We also take |
| 100 |
for granted that you are reading the \LaTeX\ source of this document, |
| 101 |
and comparing it with the output it produces. |
| 102 |
|
| 103 |
You might find it useful to read also~\cite{bull-sam}, which contains |
| 104 |
sample code that theaches you how to use \tbull. |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
\setcounter{secnumdepth}{3} |
| 109 |
|
| 110 |
\section{Basic usage} |
| 111 |
|
| 112 |
Here we illustrate the use of the \beenv\ environment to produce lists |
| 113 |
whose items are numbered with the \verb|\bullcntr| command. Different |
| 114 |
``bullet styles'' are obtained by means of some declarations that |
| 115 |
affects the size (or even the shape) of the bullets employed. |
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
\subsection{The standard sizes (\command{smartctrbull})} |
| 120 |
\label{SS:Xmp-Standard} |
| 121 |
|
| 122 |
In our first example, actually, we do not alter the default bullet |
| 123 |
style, that is, the output \tbenu\ will produce by itself, if you |
| 124 |
invoke it without options and do not declare any style by your own; in |
| 125 |
any case, it corresponds to the style selected by a |
| 126 |
\verb|\smartctrbull| declaration. |
| 127 |
|
| 128 |
\begin{bullenum} |
| 129 |
\item |
| 130 |
This is the first item of the list, that is, item~\#1. It is |
| 131 |
therefore numbered with a single bullet. Poor bullet! How |
| 132 |
lonely it must feel! |
| 133 |
|
| 134 |
\item |
| 135 |
This is the second item of the list, that is, item~\#2. It is |
| 136 |
therefore numbered with two bullets, one on the left and one |
| 137 |
on the right. If you are a romantic nature, you might even |
| 138 |
think of them as Romeo and Juliet\ldots |
| 139 |
|
| 140 |
\item\label{Standard-3} |
| 141 |
This is the third item of the list, that is---guess |
| 142 |
what?---item~\#3. Not surprisingly, it is numbered with three |
| 143 |
bullets neatly arranged in the shape of an equilateral |
| 144 |
triangle. |
| 145 |
|
| 146 |
\item |
| 147 |
This is the fourth item, item~\#4. A square has exactly four |
| 148 |
vertices, so it seems quite appropriate to lay out the four |
| 149 |
bullets that must be used to number this item exactly in this |
| 150 |
form, as you can see in the label. |
| 151 |
|
| 152 |
\item |
| 153 |
If you have not lost the track, you will agree that this is |
| 154 |
the fifth item of the list. A regular pentagon would probably |
| 155 |
have been the optimal choice for displaying this value of the |
| 156 |
counter, but for some reason the arrangement shown in the |
| 157 |
label of this item has been preferred by the author of \tbull. |
| 158 |
|
| 159 |
\item\label{Standard-6} |
| 160 |
Sixth item! Item~\#6! A regular hexagon is used here! Note, |
| 161 |
however, that the bullets have shrunk to a smaller size, |
| 162 |
because the size used so far would have made the bullet |
| 163 |
cluster look a bit too crowded. |
| 164 |
|
| 165 |
\item |
| 166 |
In the opinion of the author, the shape used to display the |
| 167 |
value~7 is even more pleasant than the regular hexagon used |
| 168 |
for the value~6; indeed, this is a regular hexagon too, but |
| 169 |
with the center marked by an additional bullet, which makes |
| 170 |
the figure look more symmetric. |
| 171 |
|
| 172 |
\item |
| 173 |
If 7~was the perfect number of bullets, here we face the |
| 174 |
disruption of this perfection. The solution adopted for |
| 175 |
arranging 8~bullets, which you can see here, is, in the |
| 176 |
author's opinion, the less inelegant among all possibilities. |
| 177 |
|
| 178 |
\item |
| 179 |
Item~\#9, the last value that the \verb|\bullcntr| command can |
| 180 |
display. The bullets are just stacked in a $3\times3$ square |
| 181 |
pattern---the obvious choice! |
| 182 |
\end{bullenum} |
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
\subsection{Moderately large bullets (\command{largectrbull})} |
| 187 |
|
| 188 |
Our next example illustrates the output produced by the style selected |
| 189 |
with a \verb|\largectrbull| declaration; this style continues to use, |
| 190 |
for the values over~5, the same bullet size adopted for the first five |
| 191 |
values. So, we say |
| 192 |
|
| 193 |
\begin{bullenum} |
| 194 |
\largectrbull |
| 195 |
|
| 196 |
\item |
| 197 |
This is the first item of the list, that is, item~\#1. It is |
| 198 |
therefore numbered with a single bullet. Poor bullet! How |
| 199 |
lonely it must feel! |
| 200 |
|
| 201 |
\item |
| 202 |
This is the second item of the list, that is, item~\#2. It is |
| 203 |
therefore numbered with two bullets, one on the left and one |
| 204 |
on the right. If you are a romantic nature, you might even |
| 205 |
think of them as Romeo and Juliet\ldots |
| 206 |
|
| 207 |
\item\label{Large-3} |
| 208 |
This is the third item of the list, that is---guess |
| 209 |
what?---item~\#3. Not surprisingly, it is numbered with three |
| 210 |
bullets neatly arranged in the shape of an equilateral |
| 211 |
triangle. |
| 212 |
|
| 213 |
\item |
| 214 |
This is the fourth item, item~\#4. A square has exactly four |
| 215 |
vertices, so it seems quite appropriate to lay out the four |
| 216 |
bullets that must be used to number this item exactly in this |
| 217 |
form, as you can see in the label. |
| 218 |
|
| 219 |
\item |
| 220 |
If you have not lost the track, you will agree that this is |
| 221 |
the fifth item of the list. A regular pentagon would probably |
| 222 |
have been the optimal choice for displaying this value of the |
| 223 |
counter, but for some reason the arrangement shown in the |
| 224 |
label of this item has been preferred by the author of \tbull. |
| 225 |
|
| 226 |
\item\label{Large-6} |
| 227 |
Sixth item! Item~\#6! A regular hexagon is used here! Note, |
| 228 |
once again, that the bullets have \emph{not} shrunk to a |
| 229 |
smaller size, so that the resulting picture looks pretty |
| 230 |
crowded, although not intolerably bad-looking. Compare the |
| 231 |
label of this item with a reference to the corresponding |
| 232 |
item~\ref{Standard-6} under~\ref{SS:Xmp-Standard}. |
| 233 |
|
| 234 |
\item |
| 235 |
In the opinion of the author, the shape used to display the |
| 236 |
value~7 is even more pleasant than the regular hexagon used |
| 237 |
for the value~6; indeed, this is a regular hexagon too, but |
| 238 |
with the center marked by an additional bullet, which makes |
| 239 |
the figure look more symmetric. |
| 240 |
|
| 241 |
\item |
| 242 |
If 7~was the perfect number of bullets, here we face the |
| 243 |
disruption of this perfection. The solution adopted for |
| 244 |
arranging 8~bullets, which you can see here, is, in the |
| 245 |
author's opinion, the less inelegant among all possibilities. |
| 246 |
|
| 247 |
\item |
| 248 |
Item~\#9, the last value that the \verb|\bullcntr| command can |
| 249 |
display. The bullets are just stacked in a $3\times3$ square |
| 250 |
pattern---the obvious choice! |
| 251 |
\end{bullenum} |
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
\subsection{Small bullets (\command{smallctrbull})} |
| 256 |
|
| 257 |
The reciprocal example is to use small bullets throughout, from 1 to~9. |
| 258 |
Thus, we use the following source code: |
| 259 |
|
| 260 |
\begin{bullenum} |
| 261 |
\smallctrbull |
| 262 |
|
| 263 |
\item |
| 264 |
This is the first item of the list, that is, item~\#1. It is |
| 265 |
therefore numbered with a single bullet. Poor bullet! How |
| 266 |
lonely it must feel! |
| 267 |
|
| 268 |
\item |
| 269 |
This is the second item of the list, that is, item~\#2. It is |
| 270 |
therefore numbered with two bullets, one on the left and one |
| 271 |
on the right. If you are a romantic nature, you might even |
| 272 |
think of them as Romeo and Juliet\ldots |
| 273 |
|
| 274 |
\item\label{Small-3} |
| 275 |
This is the third item of the list, that is---guess |
| 276 |
what?---item~\#3. Not surprisingly, it is numbered with three |
| 277 |
bullets neatly arranged in the shape of an equilateral |
| 278 |
triangle. |
| 279 |
|
| 280 |
\item |
| 281 |
This is the fourth item, item~\#4. A square has exactly four |
| 282 |
vertices, so it seems quite appropriate to lay out the four |
| 283 |
bullets that must be used to number this item exactly in this |
| 284 |
form, as you can see in the label. |
| 285 |
|
| 286 |
\item |
| 287 |
If you have not lost the track, you will agree that this is |
| 288 |
the fifth item of the list. A regular pentagon would probably |
| 289 |
have been the optimal choice for displaying this value of the |
| 290 |
counter, but for some reason the arrangement shown in the |
| 291 |
label of this item has been preferred by the author of \tbull. |
| 292 |
|
| 293 |
\item\label{Small-6} |
| 294 |
Sixth item! Item~\#6! A regular hexagon is used here! Note, |
| 295 |
once more, that the bullets have \emph{not} shrunk to a |
| 296 |
smaller size, because they were \emph{already} small in the |
| 297 |
items shown thus far. |
| 298 |
|
| 299 |
\item |
| 300 |
In the opinion of the author, the shape used to display the |
| 301 |
value~7 is even more pleasant than the regular hexagon used |
| 302 |
for the value~6; indeed, this is a regular hexagon too, but |
| 303 |
with the center marked by an additional bullet, which makes |
| 304 |
the figure look more symmetric. |
| 305 |
|
| 306 |
\item |
| 307 |
If 7~was the perfect number of bullets, here we face the |
| 308 |
disruption of this perfection. The solution adopted for |
| 309 |
arranging 8~bullets, which you can see here, is, in the |
| 310 |
author's opinion, the less inelegant among all possibilities. |
| 311 |
|
| 312 |
\item |
| 313 |
Item~\#9, the last value that the \verb|\bullcntr| command can |
| 314 |
display. The bullets are just stacked in a $3\times3$ square |
| 315 |
pattern---the obvious choice! |
| 316 |
\end{bullenum} |
| 317 |
|
| 318 |
Again, compare the references to items \#3 and~\#6 from different |
| 319 |
examples: standard bullets (\ref{Standard-3} and~\ref{Standard-6}), |
| 320 |
moderately large bullets (\ref{Large-3} and~\ref{Large-6}), small |
| 321 |
bullets (\ref{Small-3} and~\ref{Small-6}). |
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
\subsection{Tiny bullets} |
| 326 |
|
| 327 |
We come now to a sort of extreme example: the use of |
| 328 |
\verb|\textperiodcentered|. Since there is no predefined declaration |
| 329 |
for this style, it is necessary to manually redefine the two |
| 330 |
``hooks'', \verb|\counterlargebullet| and \verb|\countersmallbullet|, |
| 331 |
that \tbull\ (and therefore, indirectly, also \tbenu) call when they |
| 332 |
want to typeset a bullet. |
| 333 |
|
| 334 |
\begin{bullenum} |
| 335 |
\renewcommand*{\counterlargebullet}{\textperiodcentered} |
| 336 |
\renewcommand*{\countersmallbullet}{\textperiodcentered} |
| 337 |
|
| 338 |
\item |
| 339 |
This is the first item of the list, that is, item~\#1. It is |
| 340 |
therefore numbered with a single bullet. Poor bullet! How |
| 341 |
lonely it must feel! |
| 342 |
|
| 343 |
\item |
| 344 |
This is the second item of the list, that is, item~\#2. It is |
| 345 |
therefore numbered with two bullets, one on the left and one |
| 346 |
on the right. If you are a romantic nature, you might even |
| 347 |
think of them as Romeo and Juliet\ldots |
| 348 |
|
| 349 |
\item |
| 350 |
This is the third item of the list, that is---guess |
| 351 |
what?---item~\#3. Not surprisingly, it is numbered with three |
| 352 |
bullets neatly arranged in the shape of an equilateral |
| 353 |
triangle. |
| 354 |
|
| 355 |
\item |
| 356 |
This is the fourth item, item~\#4. A square has exactly four |
| 357 |
vertices, so it seems quite appropriate to lay out the four |
| 358 |
bullets that must be used to number this item exactly in this |
| 359 |
form, as you can see in the label. |
| 360 |
|
| 361 |
\item |
| 362 |
If you have not lost the track, you will agree that this is |
| 363 |
the fifth item of the list. A regular pentagon would probably |
| 364 |
have been the optimal choice for displaying this value of the |
| 365 |
counter, but for some reason the arrangement shown in the |
| 366 |
label of this item has been preferred by the author of \tbull. |
| 367 |
|
| 368 |
\item |
| 369 |
Sixth item! Item~\#6! A regular hexagon is used here! Note |
| 370 |
that it was really impossible, this time, for the bullets to |
| 371 |
shrunk to a still smaller size than the one that has been |
| 372 |
adopted in the above items! |
| 373 |
|
| 374 |
\item |
| 375 |
In the opinion of the author, the shape used to display the |
| 376 |
value~7 is even more pleasant than the regular hexagon used |
| 377 |
for the value~6; indeed, this is a regular hexagon too, but |
| 378 |
with the center marked by an additional bullet, which makes |
| 379 |
the figure look more symmetric. |
| 380 |
|
| 381 |
\item |
| 382 |
If 7~was the perfect number of bullets, here we face the |
| 383 |
disruption of this perfection. The solution adopted for |
| 384 |
arranging 8~bullets, which you can see here, is, in the |
| 385 |
author's opinion, the less inelegant among all possibilities. |
| 386 |
|
| 387 |
\item |
| 388 |
Item~\#9, the last value that the \verb|\bullcntr| command can |
| 389 |
display. The bullets are just stacked in a $3\times3$ square |
| 390 |
pattern---the obvious choice! |
| 391 |
\end{bullenum} |
| 392 |
|
| 393 |
This bullet style might be employed in a \beenv\ environment nested |
| 394 |
inside another one. |
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
\subsection{St.\texorpdfstring{\,}{ }Valentine (\command{heartctrbull})} |
| 399 |
\label{SS:Xmp-Hearts} |
| 400 |
|
| 401 |
To end this inventory of variations, let us illustrate the use of a |
| 402 |
fancier ``bullet'': a little heart. We obtain this with a |
| 403 |
\verb|\heartctrbull| declaration. |
| 404 |
|
| 405 |
\begin{bullenum} |
| 406 |
\heartctrbull |
| 407 |
|
| 408 |
\item\label{Hearts-1} |
| 409 |
This is the first item of the list, that is, item~\#1. It is |
| 410 |
therefore numbered with a single heart. Poor heart! It is a |
| 411 |
true lonely heart! |
| 412 |
|
| 413 |
\item |
| 414 |
This is the second item of the list, that is, item~\#2. It is |
| 415 |
therefore numbered with two hearts, one on the left and one on |
| 416 |
the right. Thinking of Romeo and Juliet is absolutely natural |
| 417 |
in this context\ldots |
| 418 |
|
| 419 |
\item\label{Hearts-3} |
| 420 |
This is the third item of the list, that is---guess |
| 421 |
what?---item~\#3. Not surprisingly, it is numbered with three |
| 422 |
hearts neatly arranged in the shape of an equilateral |
| 423 |
triangle. |
| 424 |
|
| 425 |
\item\label{Hearts-4} |
| 426 |
This is the fourth item, item~\#4. A square has exactly four |
| 427 |
vertices, so it seems quite appropriate to lay out the four |
| 428 |
hearts that must be used to number this item exactly in this |
| 429 |
form, as you can see in the label. |
| 430 |
|
| 431 |
\item\label{Hearts-5} |
| 432 |
If you have not lost the track, you will agree that this is |
| 433 |
the fifth item of the list. A regular pentagon would probably |
| 434 |
have been the optimal choice for displaying this value of the |
| 435 |
counter, but for some reason the arrangement shown in the |
| 436 |
label of this item has been preferred by the author of \tbull. |
| 437 |
|
| 438 |
\item |
| 439 |
Sixth item! Item~\#6! A regular hexagon is used here, |
| 440 |
adorned with hearts! Of course, the hearts do not shrink, as |
| 441 |
doesn't yours, and as doesn't your ardent passion! |
| 442 |
|
| 443 |
\item\label{Hearts-7} |
| 444 |
In the opinion of the author, the shape used to display the |
| 445 |
value~7 is even more pleasant than the regular hexagon used |
| 446 |
for the value~6; indeed, this is a regular hexagon too, but |
| 447 |
with the center marked by an additional heart, which makes the |
| 448 |
figure look more symmetric. |
| 449 |
|
| 450 |
\item\label{Hearts-8} |
| 451 |
If 7~was the perfect number of hearts, here we face the |
| 452 |
disruption of this perfection. The solution adopted for |
| 453 |
arranging 8~hearts, which you can see here, is, in the |
| 454 |
author's opinion, the less inelegant among all possibilities. |
| 455 |
|
| 456 |
\item |
| 457 |
Item~\#9, the last value that the \verb|\bullcntr| command can |
| 458 |
display. The hearts are just stacked in a $3\times3$ square |
| 459 |
pattern---the obvious choice! |
| 460 |
\end{bullenum} |
| 461 |
|
| 462 |
% ( paren match |
| 463 |
This could be used in valentines to enumerate to your beloved the |
| 464 |
terms of your passion\ldots~:-) |
| 465 |
|
| 466 |
Cross-references are a bit funny with this style; they look like this: |
| 467 |
\ref{Hearts-1}, \ref{Hearts-3}, \ref{Hearts-4}, \ref{Hearts-5}, |
| 468 |
\ref{Hearts-7}, and~\ref{Hearts-8}. |
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
\section{Nested enumerations} |
| 473 |
|
| 474 |
Try not to overdo this: carrying it to excess could lead to confused |
| 475 |
output. |
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
\subsection{Nesting one \beenv\ inside another} |
| 480 |
\label{SS:NestBullBull} |
| 481 |
|
| 482 |
We use ``large'' bullets for the outer environment, and ``tiny'' |
| 483 |
bullets for the inner one. |
| 484 |
|
| 485 |
\begin{bullenum} |
| 486 |
\largectrbull |
| 487 |
|
| 488 |
\item |
| 489 |
First item: let this one alone, just to have a term of |
| 490 |
comparison. |
| 491 |
|
| 492 |
\item\label{NestBull-2} |
| 493 |
Second item. Here we nest another \beenv\ environment: |
| 494 |
\begin{bullenum} |
| 495 |
\renewcommand*{\counterlargebullet}{\textperiodcentered} |
| 496 |
\renewcommand*{\countersmallbullet}{\textperiodcentered} |
| 497 |
\item\label{NestBull-2.1} |
| 498 |
First sub-item. |
| 499 |
\item\label{NestBull-2.2} |
| 500 |
Second sub-item. |
| 501 |
\item\label{NestBull-2.3} |
| 502 |
Third sub-item. |
| 503 |
\item\label{NestBull-2.4} |
| 504 |
Fourth sub-item. OK, this should suffice. |
| 505 |
\end{bullenum} |
| 506 |
Don't forget, we are still inside item~\ref{NestBull-2} of |
| 507 |
the outer enumeration. |
| 508 |
|
| 509 |
\item\label{NestBull-3} |
| 510 |
Third item (of the outer enumeration). Let us repeat exactly |
| 511 |
the same nested enumeration as in item~\ref{NestBull-2}. |
| 512 |
\begin{bullenum} |
| 513 |
\renewcommand*{\counterlargebullet}{\textperiodcentered} |
| 514 |
\renewcommand*{\countersmallbullet}{\textperiodcentered} |
| 515 |
\item\label{NestBull-3.1} |
| 516 |
First sub-item. |
| 517 |
\item\label{NestBull-3.2} |
| 518 |
Second sub-item. |
| 519 |
\item\label{NestBull-3.3} |
| 520 |
Third sub-item. |
| 521 |
\item\label{NestBull-3.4} |
| 522 |
Fourth sub-item. OK, this should suffice. |
| 523 |
\end{bullenum} |
| 524 |
Back to item~\ref{NestBull-3} of the outer enumeration. |
| 525 |
\end{bullenum} |
| 526 |
|
| 527 |
Now the bad news: you might want to refer to, say, item |
| 528 |
\ref{NestBull-3.4} under item~\ref{NestBull-3}. As you can see, the |
| 529 |
reference comes out wrong, since the label from the outer enumeration |
| 530 |
% ( paren match |
| 531 |
is typeset with the style of the inner one.~:-(\spacefactor=\sfcode`. |
| 532 |
\space This is a known bug: I\@ decided not to correct it, since doing |
| 533 |
so would require to introduce the concept of bullet styles |
| 534 |
distinguished by level, which I\@ deem intolerably burdensome. Be |
| 535 |
aware of this limitation when you nest \beenv\ environments inside one |
| 536 |
another (this does not apply, however, to \beenv's nested within |
| 537 |
\enenv's, as we'll see in the following examples). |
| 538 |
|
| 539 |
|
| 540 |
|
| 541 |
\subsection{Nesting \beenv\ inside \enenv} |
| 542 |
\label{SS:NestBullEnum} |
| 543 |
|
| 544 |
Let us repeat the same example shown above, but changing the outer |
| 545 |
environment to \enenv, and suppressing style variations. |
| 546 |
|
| 547 |
\begin{enumerate} |
| 548 |
\item |
| 549 |
First item: let this one alone, just to have a term of |
| 550 |
comparison. |
| 551 |
|
| 552 |
\item\label{NestBuEn-2} |
| 553 |
Second item. Here we nest a \beenv\ environment: |
| 554 |
\begin{bullenum} |
| 555 |
\item\label{NestBuEn-2.1} |
| 556 |
First sub-item. |
| 557 |
\item\label{NestBuEn-2.2} |
| 558 |
Second sub-item. |
| 559 |
\item\label{NestBuEn-2.3} |
| 560 |
Third sub-item. |
| 561 |
\item\label{NestBuEn-2.4} |
| 562 |
Fourth sub-item. OK, this should suffice. |
| 563 |
\end{bullenum} |
| 564 |
Don't forget, we are still inside item~\ref{NestBuEn-2} of |
| 565 |
the outer enumeration. |
| 566 |
|
| 567 |
\item\label{NestBuEn-3} |
| 568 |
Third item (of the outer enumeration). Let us repeat exactly |
| 569 |
the same nested enumeration as in item~\ref{NestBuEn-2}. |
| 570 |
\begin{bullenum} |
| 571 |
\item\label{NestBuEn-3.1} |
| 572 |
First sub-item. |
| 573 |
\item\label{NestBuEn-3.2} |
| 574 |
Second sub-item. |
| 575 |
\item\label{NestBuEn-3.3} |
| 576 |
Third sub-item. |
| 577 |
\item\label{NestBuEn-3.4} |
| 578 |
Fourth sub-item. OK, this should suffice. |
| 579 |
\end{bullenum} |
| 580 |
Back to item~\ref{NestBuEn-3} of the outer enumeration. |
| 581 |
\end{enumerate} |
| 582 |
|
| 583 |
See Subsection~\ref{S:CrossXmp} for examples of cross-references to |
| 584 |
the items of these lists. |
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
\subsection{Nesting \enenv\ inside \beenv} |
| 589 |
\label{SS:NestEnumBull} |
| 590 |
|
| 591 |
As before, but the other way around: \beenv\ is now the outer |
| 592 |
environment, and \enenv\ the inner one. |
| 593 |
|
| 594 |
\begin{bullenum} |
| 595 |
\item |
| 596 |
First item: let this one alone, just to have a term of |
| 597 |
comparison. |
| 598 |
|
| 599 |
\item\label{NestEnBu-2} |
| 600 |
Second item. Here we nest an \enenv\ environment: |
| 601 |
\begin{enumerate} |
| 602 |
\item\label{NestEnBu-2.1} |
| 603 |
First sub-item. |
| 604 |
\item\label{NestEnBu-2.2} |
| 605 |
Second sub-item. |
| 606 |
\item\label{NestEnBu-2.3} |
| 607 |
Third sub-item. |
| 608 |
\item\label{NestEnBu-2.4} |
| 609 |
Fourth sub-item. OK, this should suffice. |
| 610 |
\end{enumerate} |
| 611 |
Don't forget, we are still inside item~\ref{NestEnBu-2} of |
| 612 |
the outer enumeration. |
| 613 |
|
| 614 |
\item\label{NestEnBu-3} |
| 615 |
Third item (of the outer enumeration). Let us repeat exactly |
| 616 |
the same nested enumeration as in item~\ref{NestEnBu-2}. |
| 617 |
\begin{enumerate} |
| 618 |
\item\label{NestEnBu-3.1} |
| 619 |
First sub-item. |
| 620 |
\item\label{NestEnBu-3.2} |
| 621 |
Second sub-item. |
| 622 |
\item\label{NestEnBu-3.3} |
| 623 |
Third sub-item. |
| 624 |
\item\label{NestEnBu-3.4} |
| 625 |
Fourth sub-item. OK, this should suffice. |
| 626 |
\end{enumerate} |
| 627 |
Back to item~\ref{NestEnBu-3} of the outer enumeration. |
| 628 |
\end{bullenum} |
| 629 |
|
| 630 |
Again, see Subsection~\ref{S:CrossXmp} for examples of |
| 631 |
cross-references to the items of the above lists. |
| 632 |
|
| 633 |
|
| 634 |
|
| 635 |
\section{Examples of cross-references} |
| 636 |
\label{S:CrossXmp} |
| 637 |
|
| 638 |
Cross-references are printed using the bullet style that was in effect |
| 639 |
when the \verb|\label| command was given. The following examples |
| 640 |
illustrate this. |
| 641 |
|
| 642 |
In~\ref{SS:Xmp-Standard} we had references to~\ref{Standard-3} and |
| 643 |
to~\ref{Standard-6}. In~\ref{SS:Xmp-Hearts}, on the other hand, the |
| 644 |
references were to~\ref{Hearts-1}, to~\ref{Hearts-3}, |
| 645 |
to~\ref{Hearts-4}, to~\ref{Hearts-5}, to~\ref{Hearts-7}, and |
| 646 |
to~\ref{Hearts-8}. |
| 647 |
|
| 648 |
We turn now to nested lists. We let alone the example |
| 649 |
of~\ref{SS:NestBullBull}, we already know that references come out |
| 650 |
wrong in this case. In~\ref{SS:NestBullEnum} we had items |
| 651 |
\ref{NestBuEn-2.1}, \ref{NestBuEn-2.2}, \ref{NestBuEn-2.3}, and |
| 652 |
\ref{NestBuEn-2.4}, all listed under item~\ref{NestBuEn-2}, and |
| 653 |
similarly items \ref{NestBuEn-3.1}, \ref{NestBuEn-3.2}, |
| 654 |
\ref{NestBuEn-3.3}, and \ref{NestBuEn-3.4}, as part of |
| 655 |
item~\ref{NestBuEn-3}. In~\ref{SS:NestEnumBull}, on the other hand, |
| 656 |
we had items \ref{NestEnBu-2.1}, \ref{NestEnBu-2.2}, |
| 657 |
\ref{NestEnBu-2.3}, and \ref{NestEnBu-2.4}, all listed under |
| 658 |
item~\ref{NestEnBu-2}: as you can see, the bullets now precede the |
| 659 |
reference to the item of \enenv; similarly, items \ref{NestEnBu-3.1}, |
| 660 |
\ref{NestEnBu-3.2}, \ref{NestEnBu-3.3}, and \ref{NestEnBu-3.4} are now |
| 661 |
a part of the ``bulletted'' item~\ref{NestEnBu-3}. |
| 662 |
|
| 663 |
|
| 664 |
|
| 665 |
\setcounter{secnumdepth}{0} |
| 666 |
|
| 667 |
\begin{thebibliography}{9} |
| 668 |
\providecommand*{\bysame}{\leavevmode\hbox to3em{\hrulefill}\thinspace} |
| 669 |
\addcontentsline{toc}{section}{\refname} |
| 670 |
|
| 671 |
\bibitem{dtx} |
| 672 |
G.~Mezzetti, \emph{The \bull\ package}, documented \TeX\ |
| 673 |
source (dtx), included in every distribution of \tbull\ (in |
| 674 |
the file \filedir{\Bullcntr.dtx}). |
| 675 |
|
| 676 |
\bibitem{overview} |
| 677 |
\bysame, \emph{Overview of \tbull}, included in every |
| 678 |
distribution of \tbull, surely as \LaTeX\ source (in the file |
| 679 |
\filedir{\Bullcntr-man.tex}) and perhaps in precompiled PDF |
| 680 |
format too (in the file \filedir{\Bullcntr-man.pdf}). |
| 681 |
|
| 682 |
\bibitem{bull-sam} |
| 683 |
\bysame, \emph{Using \tbull: an example}, \LaTeX\ source, |
| 684 |
included in every distribution of \tbull\ (in the file |
| 685 |
\filedir{\Bullcntr-sam.tex}). |
| 686 |
\end{thebibliography} |
| 687 |
|
| 688 |
\end{document} |