sw3quant wrote:[…] I now try and modify this, as suggested by localghost to use newfloat. The documentation does not seem to have any examples for the case I need to apply. In summary I can't get it to work. […]
No offense. But in situations like this I always wonder what is so difficult in
just reading a package manual and
then applying the stuff to personal needs. The manuals must be written so bad that even people with academic background seem to be presented with insoluble problems. m(
The below code should solve all the issues. Since a starred environment
exhibit*
is defined automatically (but seemingly not documented), there should be no further issues in documents with multiple columns.
Code: Select all
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mwe} % loads »graphicx«
\usepackage{caption}
\captionsetup{%
font=small,
labelfont=bf
}
\usepackage{subcaption}
\usepackage{newfloat}
\DeclareFloatingEnvironment[%
fileext=loe,
name=Exhibit
]{exhibit}
% see UK TeX FAQ: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wholerow
\usepackage{array}
\newcolumntype{_}{>{\global\let\currentrowstyle\relax}}
\newcolumntype{^}{>{\currentrowstyle}}
\newcommand{\rowstyle}[1]{%
\gdef\currentrowstyle{#1}%
#1\ignorespaces
}
\usepackage[super]{nth} % Generate English ordinal numbers
\usepackage{booktabs} % nice looking tables
\begin{document}
\listofexhibits
\newpage
If I want to use the word ``Exhibit'' rather than ``Figure'' and ``Table'' then \LaTeX\ can't count properly.
\medskip
In \exhibitname~\ref{exh:sample-figure} I show an image.
\begin{exhibit}[!ht]
\centering
\includegraphics{example-image-a}
\caption{My graph is very nice, though I would like this to say ``Exhibit 1:'' and not ``Figure 1:'' }
\label{exh:sample-figure}
\end{exhibit}
In \exhibitname~\ref{exh:sample-table} I put some data,
\begin{exhibit}[!ht]
\caption{A Table}
\label{exh:sample-table}
\centering
\begin{tabular}{_c^c^c^c} \toprule
\rowstyle{\bfseries} % make (only) the whole following row bold faced
Statistic & Value & Statistic & Value \\ \midrule
Mean & 5 & Maximum & 1,069 \\
Mode & 1 & \nth{95} Percentile & 21 \\ \bottomrule
\end{tabular}
\end{exhibit}
My table is also very nice, though I would like this to say ``Exhibit 2:'' and not ``Table 1:''
\end{document}
The environments
{figure}
and
{table}
still exist. Please note the
mwe package which is only used here and
not in the actual document. Furthermore it is recommendable to take a look at all other involved packages.
You can instantly test the code by clicking "Open in writeLaTeX" in the head of the above code box.