[Tugindia] new environment

Radhakrishnan CV cvr at river-valley.org
Wed Dec 10 04:42:20 CET 2003


>>>>> "Badri" == Badri T Natarajan <tbadri at mail.tapmi.org> writes:

    Badri> Hello Tex Users, This is my first post to the mailing list.

    Badri> I want a new environment of the form

    Badri> \begin{exhibit}....\end{exhibit}

    Badri> that subsumes both

    Badri> \begin{figure}.....\end{figure} and
    Badri> \begin{table}....\end{table}

    Badri> i.e. the all figures and tables should appear as Exhibit 1
    Badri> <caption>, Exhibit 2 <caption> etc. This would be great
    Badri> macro for writing a business case.

\makeatletter
\newcounter{exhibit}
\renewcommand\theexhibit{\@arabic\c at exhibit}
\def\fps at exhibit{tbp}
\def\ftype at exhibit{1}
\def\ext at exhibit{loe}
\def\exhibitname{Exhibit}
\def\fnum at exhibit{\exhibitname\nobreakspace\theexhibit}
\newenvironment{exhibit}
               {\@float{exhibit}}
               {\end at float}

\def\listexhibitname{List of Exhibits}
\newcommand\listofexhibits{%
    \section*{\listexhibitname}%
      \@mkboth{\listexhibitname}%
         {\listexhibitname}%
    \@starttoc{loe}%
    }
\makeatother


This would achieve what you needed. \listofexhibits would give you a
list like \listoffigures.

Best

Radhakrishnan


More information about the tugindia mailing list