# SLUG Mailing List Archives

## [chat] That LaTeX biz.

• To: slug-chat@xxxxxxxxxxx
• Subject: [chat] That LaTeX biz.
• From: Bill Bennett <wbennett@xxxxxxxxxxxxxxxxx>
• Date: Wed Aug 21 17:50:03 2002
• User-agent: Mutt/1.2.5.1i

For the people who helped me when last I asked for it on this
matter, many thanks. I *will* elaborate further.

I append a LaTeX programme. It works. The coloured boxes are
what's the matter. I've padded some text around the boxes and
included text references to the boxes.

Which work only partially. They *do* refer to something, but
rather than (see Box 1), which repeats itself, no matter what
box you refer to, I'd like the reference to be (see Box 1.1)
and (see Bob 1.2), which is Box Chapter 1 Number 1, Box Chapter 1
Number 2 and so forth.

Obviously, I'm missing something in the definition of the
box command, or the reference to them in the text. The best
information that I have is that the \refsetcounter is missing,
although I don't know where.

Can anyone help?

Regards,

Bill Bennett.

-----------------------------------------------
\documentclass[11pt]{report}
\usepackage{calc,color,palatino,}
\fboxsep=8pt
\fboxrule=1.25pt
\setlength{\parsep}{10pt}
\definecolor{MyRed}{cmyk}{0,0.91,0.87,0}%chart number Red032
\definecolor{MyPaleBlue}{cmyk}{0.18,0,0,0.06}%chart number 642
\definecolor{MyPaleGreen}{cmyk}{0.18,0,0.18,0}%between 351 and 352
\definecolor{MyFrame}{cmyk}{0,0.11,0.61,1.00}%listed as Proc Black
\definecolor{MyContents}{cmyk}{0,0,0,0.10}%own creation, but see the greys
\newcounter{RonsBoxCounter}
\newcommand{\BoxIt}[3]{\label{#1}\fcolorbox{MyRed}{MyContents}{
\begin{minipage}{0.9\textwidth}
\raggedright
\stepcounter{RonsBoxCounter}
\begin{center}{\bfseries Box~\thechapter.\theRonsBoxCounter:~#2}\end{center}
#3
\end{minipage}
\begin{document}
\chapter{Trial Piece}

The inability to use forages by pigs, poultry and
humans resides in the chemical structure of the
complex carbohydrates that strengthen and support
the leaves and stems of grasses; these carbohydrates
are not digested by intestinal enzymes

\vspace{10pt}
\BoxIt{ch1box01}{Toxic plants: natives and
others}{From the time of settlement of
the~Australian continent, native poisonous plants
have played a significant part in the management of
farms and farm animals."}

\vspace{10pt}
Sugars are also transformed into other compounds
(see Box~\ref{ch1box01}) including the precursors of
proteins~(amino~acids) when combined with the minerals and
ammonia that are taken up by the plant from the soil.

\vspace{10pt}
\BoxIt{ch1box02}{Unpalatable grasses: a different
view}{Unpalatable" describes a grass that
ruminants are reluctant to consume. However, grasses are
unpalatable for many more reasons then simply taste.}

\vspace{10pt}
Most grass leaves are flat, which exposes a maximum surface area
to the sun. They are green from the presence of chlorophyll
which captures radiant energy of sunlight and provides the
energy for photosynthesis (see Box~\ref{ch1box02}). The sugars
which accumulate in leaves and stems are used to synthesise
the more complex components of plants.

\end{document}