[Tugindia] new environment

Badri T Natarajan tbadri at mail.tapmi.org
Mon Apr 12 13:58:37 CEST 2004


Radhakrishnan Sir,

Thank you once again for the code for the \begin{exhibit}....\end{exhibit} environment that you provided
in response to my first mail. 

Though the exhibits appear without error, the code is causing an error with the numbering of the exhibits and tables (floats?). I have \label{exhibit1} inside the exhibit environment. In the text I say "See Exhibit \ref {exhibit1}". In the output I get "See Exhibit 1". However subsequent references are all numbered incorrectly. 

Best Regards,
Badri

 -----Original Message-----
From: 	Radhakrishnan CV [mailto:cvr at river-valley.org] 
Sent:	Wednesday, December 10, 2003 9:12 AM
To:	TUGIndia Mailing List
Subject:	Re: [Tugindia] new environment

>>>>> "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
_______________________________________________
Home:        http://www.tug.org.in/
unsubscribe: http://tug.org/mailman/listinfo/tugindia




More information about the tugindia mailing list